-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Investigate root cause of overwritten MCap polyfill on Safari #3696
Comments
I'm able to reproduce the original issue on Safari 15.1. Previously, I was unable to reproduce it in Safari 14.1. |
The issue is timing-related. With breakpoints enabled in the polyfill installation, the problem vanishes. |
Delaying the polyfill by 5 seconds seems to work around the issue. With that, content shared with us privately via #3530 gets past the original 6010 error (and instead fails a license request). |
I was trying to determine if/when/how the property for decodingInfo was being overwritten, and I may have stumbled onto a good clue. I first changed the polyfill to:
After 5 seconds, the value had been reset every time (presumably by the platform). But I couldn't be sure if it was decodingInfo or the mediaCapabilities parent of decodingInfo which was being reset. So then I changed the polyfill to:
And magically... both were the same now! And consistently when reloading the page to try again. So here's my theory. It may be that navigator.mediaCapabilities is a getter which returns a new MediaCapabilities object on-demand, which is later garbage-collected when not referenced. Creating a local copy that is used later in a closure seems to keep our modifications in the polyfill from being undone. I'll experiment with this more and see if this could be a viable fix. |
…sers (shaka-project#3668) See also shaka-project#3696 Closes shaka-project#3530 Change-Id: Ied2e644f8a5d170ef70386dc2a39b51fc95a691f
…sers (shaka-project#3668) See also shaka-project#3696 Closes shaka-project#3530 Change-Id: Ied2e644f8a5d170ef70386dc2a39b51fc95a691f
In #3530, the MCap polyfill is being overwritten on Safari. It's not clear what is causing this. @joeyparrish could not reproduce the issue, but @theodab could.
PR #3668 gave us a workaround, but we still haven't addressed the root cause. It would be preferable to find the root cause of the issue, revert the PR, and merge a fix that addresses the root cause.
The text was updated successfully, but these errors were encountered: