Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.x] Cannot change video devices in android after initial set up #3201

Closed
rjnpnfigueiredo opened this issue Apr 20, 2023 · 6 comments
Closed
Labels
multistream Related to Janus 1.x

Comments

@rjnpnfigueiredo
Copy link
Contributor

Issue can be quickly verified by using the Janus device selection demo from the main website
1.x - https://janus.conf.meetecho.com/devicetest.html
0.x - https://janus-legacy.conf.meetecho.com/devicetest.html

Steps to reproduce:

  1. Start demo
  2. Select any video device
  3. Press "Change Devices"
  4. Wait for video to start
  5. Select a different video device
  6. Press "Change Devices"
  7. Issue should happen

What version of Janus is this happening on?
This is happening to 1.x but 0.x versions seem to work fine

Have you tested a more recent version of Janus too?
Tested most recent version

Was this working before?
0.x is working, 1.x is not

Is there a gdb or libasan trace of the issue?
From android chrome console logs:

janus.js:2273 DOMException: Could not start video source
replaceTracks @ janus.js:2273
await in replaceTracks (async)
replaceTracks @ janus.js:1359
restartCapture @ devicetest.js:124
(anonymous) @ devicetest.js:88
dispatch @ jquery.min.js:3
v.handle @ jquery.min.js:3
@rjnpnfigueiredo rjnpnfigueiredo added the multistream Related to Janus 1.x label Apr 20, 2023
@lminiero
Copy link
Member

lminiero commented Apr 24, 2023

Could not start video source means the WebRTC stack could not access the webcam, so it doesn't look like a video device change issue to me, but a problem with the device itself.

@rjnpnfigueiredo
Copy link
Contributor Author

Could not start video source means the WebRTC stack could not access the webcam, so it doesn't look like a video device change issue to me, but a problem with the device itself.

I initially though the same, but given that the same example using the 0.x version works fine on the exact same device under the same circumstances, there may be some issue on how it is acquiring access to a different video device after initial capture.

@lminiero
Copy link
Member

I've noticed that the demo behaves weirdly on desktop too, since both webcams remain active in the local box. I suspect that's what may be causing the problem on Android too (maybe you can't capture both webcams at the same time?). I'll check what causes the demo to behave like that and come up with a fix, in case.

@lminiero
Copy link
Member

@rjnpnfigueiredo please refer to the PR above.

@rjnpnfigueiredo
Copy link
Contributor Author

@lminiero Looks all good on my end!

@lminiero
Copy link
Member

Ack, I'll merge then, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
multistream Related to Janus 1.x
Projects
None yet
Development

No branches or pull requests

2 participants