question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dynamic switching of streams

See original GitHub issue

I have my phone, right in front of me, streaming every move I make.

I have two cameras in my phone, one in the front, one in the back. Would it be possible to change which camera can stream without refreshing the page (using mediaDevices.enumerateDevices to get a list of cameras and then provide a way to change the stream)

Is this possible? Thanks!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:18 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
salwa1234commented, Sep 7, 2020

@jeremija thanks for your help i have just stopped video and audio tracks of previous stream before executing navigator and it worked localVideo.current.srcObject.getTracks().forEach(track => track.stop())

0reactions
jeremijacommented, Sep 7, 2020

If you’d like to reuse existing connections, you’d need to wait for ICE restarts to be supported by simple-peer, see #579.

To help peers behind different NATs to connect, you need to add a STUN or a TURN server. See the config.iceServers parameter: https://developer.mozilla.org/en-US/docs/Web/API/RTCConfiguration/iceServers

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dynamic stream switching - Wowza Community
I have problem with stream switching with on demand (f4v file) content. The switch from stream A to B is extremely slow taking...
Read more >
Publisher - IEEE Xplore
Switching among streams of different bit-rates and/or views is always necessary in. ... A Dynamic Video Streaming Scheme Based on SP/SI Frames of...
Read more >
Dynamic stream handling - Documentation - Akka
It can be materialized multiple times via its flow flow method, and all materialized operators linked to it are controlled by the switch....
Read more >
Dynamic input switching - AWS Elemental Live
The dynamic input switching feature lets you use REST API commands to switch inputs in an event. This method of input switching has...
Read more >
Dynamic streaming - Adobe Support
Stream transitions occur on the server, but the command to switch streams and the determination to do so comes from the client application....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found