Skip to content
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

onStreamEndedHandler doesn't call connection.onstreamended if mediaElement is not attached #18

Open
killmenot opened this issue Nov 15, 2014 · 1 comment

Comments

@killmenot
Copy link
Contributor

Hi,

I have a need to place user's stream as a video element in different places in DOM in my application. That's why I don't pass e.mediaElement in myconnection.onstream called but just pass stream to my internal function. Instead it, I use getMediaElement lib that provides me with canvas

However, in this case onstreamended isn't called due to this line https://github.com/muaz-khan/RTCMultiConnection/blob/master/RTCMultiConnection.js#L4569

Any workaround? Could we suppress it with solution like https://github.com/muaz-khan/RTCMultiConnection/blob/master/RTCMultiConnection.js#L5247 ?

@muaz-khan
Copy link
Owner

connection.onstream = function(event) {
    // either
    delete event.mediaElement;

    // or
    delete connection.streams[event.streamid].mediaElement;

   // invoke getMediaElement.js here
   var video = getMediaElement(event.stream, options);
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants