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

MediaStream 'ended' event deprecation #19

Open
tgabi333 opened this issue Jun 13, 2016 · 8 comments
Open

MediaStream 'ended' event deprecation #19

tgabi333 opened this issue Jun 13, 2016 · 8 comments

Comments

@tgabi333
Copy link
Contributor

I've just run into this:

The MediaStream 'ended' event is deprecated and will be removed in M53, around September 2016. Please use the MediaStream 'inactive' event instead. See https://www.chromestatus.com/features/5730404371791872 for more details.

Do you have any idea how to proceed?
Regarding to firefox:
cd51391

how can i help?

@tgabi333
Copy link
Contributor Author

tgabi333 commented Jul 15, 2016

@fippo Do you think dropping webrtcsupport library in favor of adapter.js is a good idea?

I would like to work on a new version because of the above issue. It could be a new major...

@fippo
Copy link
Member

fippo commented Jul 15, 2016

away with webrtcsupport...

@tgabi333
Copy link
Contributor Author

and what about autoAdjustMic setting and mediastream-gain ?

@samsont
Copy link

samsont commented Oct 30, 2017

In Chrome 62, in Screen Share, the 'ended' event is not firing.

Line 153 of localmedia.js,
The function track.addEventListener('ended', function () {
...
})

is never called. Any thoughts on workarounds?

@samsont
Copy link

samsont commented Oct 31, 2017

If you click on the system popup which typcially reads: "... is sharing a window .. Stop Sharing/Hide", it works. If the user clicks on a button and you call stopScreenShare(), it doesn't work.

The first fix I have done is to just add another function to detect chrome 62 next to the FireFox fix. That seems to work. Though, it is not satisfying.

@fippo
Copy link
Member

fippo commented Oct 31, 2017

@samsont if you call stopScreenShare and that calls track.stop() then track.onended will not be called. That is a general design principle for those event handlers. It should not have changed in Chrome 62 though.

@samsont
Copy link

samsont commented Oct 31, 2017

I agree. My memory is that track.onended is not called. But, the event 'ended' is generated. And, we are still using that event in this code. It works pretty well for disconnecting streams and the like. It even works for screenshare when using the system popup to stop the screenshare. But, hitting a button and telling it to stop no longer works.

Do you have any ideas for replacements for looking for the 'ended' event?

In chrome 62, there is a small note about background video track optimization using media extensions. https://developers.google.com/web/updates/2017/09/chrome-62-media-updates. I don't think it is related -- but it might be.

@stiv-yakovenko
Copy link

ffproblem

Hi! Code contains call to addEventListener. This function is unavailable on my FF (updated to lastest version), so this produces crash, see my screenshot.

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

4 participants