Domanda

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

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top