On 10/23/2013 4:06 PM, Adam Roach wrote:
On 10/23/13 13:38, [email protected] wrote:
Instead of calling GetUserMedia every time a user would like to make a call, I'm trying to access the media as soon as the user loads the page, then use that audio and video track throughout. Plugging in the LocalMediaStream works on the first call, but the call ending causes the MediaStream (and it's tracks) to move to the ended state and that switch seems to occur browser-side, outside of my control, and subsequent calls have no media. Since clone is not available yet, I figured the next best thing to do would be make a new MediaStream with the existing tracks. I realize this may not work, but I'm not sure what else I can do at this point.

Ah, I'm afraid that there's no real way to do what you want to do: you're going to have to re-prompt the user for permission for each call.

I would expect your clone trick to work, once we get cloning working. You may wish to follow this bug to keep abreast of progress:

https://bugzilla.mozilla.org/show_bug.cgi?id=910249

You can keep the MediaStream from gUM active (and that means the camera light on, etc) by just not calling .stop() on it, and keeping a reference to it. It doesn't have to be attached to a video element. Likely you're calling .stop() at the end of the call, which means "I never want to use this MediaStream again".

There are specs for constructing MediaStreams from tracks gotten from other MediaStreams; we have not implemented those yet.

--
Randell Jesup, Mozilla

_______________________________________________
dev-media mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-media

Reply via email to