-
Notifications
You must be signed in to change notification settings - Fork 216
Chrome 92 limits the creation of MediaPlayers #1528
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
Comments
Thanks @arunpbk-stayqrious for submitting. We are currently working on this issue. |
@anna-vasilko girts got a note about this |
chrome 92 started [limiting](https://chromium-review.googlesource.com/c/chromium/src/+/2816118) the WebMediaPlayers. This [breaks](https://bugs.chromium.org/p/chromium/issues/detail?id=1232649) lot of webrtc applications. This fix ensures that 1) we do not leak media elements created internally and 2) we clear the `srcObject` before removing media elements. The application that use `RemoteAudioTrack.detach`() method need to ensure that they clear srcObject on the returned elements as well. related github issues: #1367 & #1528
Despite the upcoming improvement in this SDK (PR #1530), the new limit of MediaPlayers in Chrome 92 may still impact group room applications where participants subscribe to many media tracks. Find more in this chrome ticket |
Seeing this issue with automatic track switching enabled with a handful of participants in a room. |
This is impacting our production system, derailing market research video chats, so we will be watching this issue closely. Please keep us updated with any new information. (we know Chrome's update is the actual cause, not Twilio's library, so thank you for your efforts in fixing this) |
@matt-hensley @m-andrew-albright, We are working on a fix that would mitigate this WebMediaPlayer limit somewhat. And looks like chrome will soon be updating to increase this limit as well.
Let me know if this last change helps with your app. |
@makarandp0 we JUST pushed our hotfix out doing exactly that -- it fixes the issue in most circumstances, but I believe when enough people manually stop/start their videos it begins to break again. Thank you! |
@makarandp0 we tested this fix and it did not correct the issue at all. We are still getting the Blocked attempt error at 70 attaches. |
@tonymccallie, The app change (to set srcObject to null) by itself is not expected to fully resolve the issue. You do need an upcoming twilio-video sdk fix as well. I will update here once the fix is released. |
@makarandp0 is there any timeline on this code coming out? I didn't see it in 2.17.0-rc3 |
Looks like a fix for this issue was just released in version 2.15.3 |
Thanks @BrandonMathis, Yes please try 2.15.3, This fixes the sdk side. Please note that you need the application side fix noted in the changelog as well. Another good news is chrome is reverting the change that limited number of media player, and chrome 92 stable should get an update on Aug 3rd. |
@makarandp0 Can you share the source of Aug 3rd date? |
@maciejdudzinski it looks to be from here: https://bugs.chromium.org/p/chromium/issues/detail?id=1232649#c85 Not sure about your second question. |
Heads-up, Chromium is not reverting the limit to MediaPlayer objects, they are only increasing the cap to 1000 for all devices. This will likely resolve this bug for 99.99% of scenarios but failure to properly dispose of video & audio tracks (chrome currently does not distinguish between video and audio streams) could result in this problem arising again. Please let me know if I am mistaken but, from what I am reading, this limit is still in place but is just very very high at the moment until the chromium team implements a proper fix & publishes an article regarding best-practices when working with media streams. another note: This issue is not Chrome only. ALL chromium-based browsers are affected including Microsoft Edge. |
Please note that Chrome version 92.0.4515.131 is released today with the fix for MediaPlayer limit. Please update your chrome to newer version. |
closing as this is no longer applicable with chrome update - Thank you! |
or sensitive account information (API keys, credentials, etc.) when reporting this issue.
Code to reproduce the issue:
Connect to a twilio room, and ask the participants to turn their video on and off for ~ 75 times (in total).
Expected behavior:
Should work as expected
Actual behavior:
Video stops playing with the error
[Intervention] Blocked attempt to create a WebMediaPlayer as there are too many WebMediaPlayers already in existence. See crbug.com/1144736#c27
Software versions:
The culprit seems to be the allocations for dummy media elements created for tracking media track dimensions in mediatrack.js
https://github.com./twilio/twilio-video.js/blob/master/lib/media/track/mediatrack.js#L233
The text was updated successfully, but these errors were encountered: