Question

I'm building a website where you can open a modal view with a video-tag for the users web cam video.

Now I'm wondering what happens to my video stream/the content of the video-tag when the user closes the modal view (the view is hidden via display: none).

Is webRTC still running? Are the resources still reserved?

Thanks

Was it helpful?

Solution

Yes, even if you don't attach the received stream to any media element, the stream is still being played. This is valid for remote and local streams. Of course, if it has audio, you will only hear it when it is attached to a media tag (audio or video).

You can even remove media elements from the page. When they get back on dom, if you attach the stream, they will continue to play.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top