-
Notifications
You must be signed in to change notification settings - Fork 273
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
Choose Camera possible? #36
Comments
Yes. See screenshot below. Animated Gif. |
If you want to this more programatically and for example by default use rear camera on mobile phone instead of front camera you can:
|
This looks amazing! |
I've been attempting to get a second camera working for awhile now. I could use a bit of guidance. Help?! |
Hello, I'll need assistance in this question too. I've found out, that the client have to send a new sdp offer or answer in the onnegotiationneeded event but all of my attempts failed. When changing the local camera, that the screen on the other side is always freezing, because there is no more stream data. I've tried this in onnegotiationneeded:
I think there is something missing in the function add_sdp_offer(message). There is a line of code:
So a "reoffer" is always dropped. Commenting out this, results in many "invalid rtc state errors" of the browser. So I really don't know how to change this. Does anyone have some suggestions? |
You can best achieve this by ending the existing session and starting a new one. If you want a Seamless Transition, then start the new stream and connect to your caller, upon success, allow the receiving client to close the old connection. You can overlay the original video feed with the new video feed to make this appear seamless. This simple approach should solve your needs for all WebRTC clients, even older outdated WebRTC Clients will accept this approach. |
Removing and adding a whole connection seems quite complicated. Think about a multi call scenario with many connections to different clients. Is there really no way to use the desired onnegotationneeded event? It's fired on the side where the stream is changed. I'm trying to send an offer/answer to the other side in this case. But the new offer is ignored on the other side. Removing the if-constraint there will result in multiple errors "invalid rtc state errors". I like to have a "modern" solution. I've control over the webbrowser the user uses. So there is no need to support older browsers. Did you ever tried the modern approach or are there other problems involved, which makes this impossible? |
Is it possible to choose what camera this uses?
The text was updated successfully, but these errors were encountered: