update device list

This commit is contained in:
TonyChyi 2022-09-30 12:26:02 +08:00
parent acf74153ef
commit dc9b5ce0b1

View File

@ -35,14 +35,13 @@ func New(o *Options) (*Connection, error) {
connection.api = webrtc.NewAPI(webrtc.WithMediaEngine(me)) connection.api = webrtc.NewAPI(webrtc.WithMediaEngine(me))
logrus.Debug("list devices:") logrus.Debug("list devices:")
logrus.Debug("------")
devices := driver.GetManager().Query(func(d driver.Driver) bool { return true }) devices := driver.GetManager().Query(func(d driver.Driver) bool { return true })
for _, device := range devices { for _, device := range devices {
logrus.Debug(device.ID()) logrus.Debug("\t", device.ID())
logrus.Debug(device.Info()) logrus.Debug("\t", device.Info())
logrus.Debug(device.Properties()) logrus.Debug("\t", device.Properties())
logrus.Debug(device.Status()) logrus.Debug("\t", device.Status())
logrus.Debug("------") logrus.Debug("\t------")
} }
s, err := mediadevices.GetUserMedia(mediadevices.MediaStreamConstraints{ s, err := mediadevices.GetUserMedia(mediadevices.MediaStreamConstraints{