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

fix: No requestVideoFrameCallback on Safari with DRM #7854

Merged
merged 1 commit into from
Jul 28, 2022

Conversation

mister-ben
Copy link
Contributor

Description

Safari's requestVideoFrameCallback is (intentionally?) broken when DRM is playing, so in that case use the fallback with requestAnimationFrame instead.

Specific Changes proposed

  • Check for the presence of <video>.webkitKeys, and use fallback if so.
  • This will case false positives in the case that a DRM source is loaded and then a non-DRM source is loaded, becuse webkitKeys remains.
  • The test isn't prefect - rather than set up a test with an actual DRM source, webkitKeys is set to an object, however since Safai doesn't allow the property to be written, the test runs on every other browser.

Requirements Checklist

  • Feature implemented / Bug fixed
  • If necessary, more likely in a feature request than a bug fix
    • Change has been verified in an actual browser (Chrome, Firefox, IE)
    • Unit Tests updated or fixed
    • Docs/guides updated
    • Example created (starter template on JSBin)
  • Reviewed by Two Core Contributors

@codecov
Copy link

codecov bot commented Jul 26, 2022

Codecov Report

Merging #7854 (804e7c5) into main (1be46d4) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #7854   +/-   ##
=======================================
  Coverage   80.93%   80.93%           
=======================================
  Files         116      116           
  Lines        7463     7463           
  Branches     1813     1813           
=======================================
  Hits         6040     6040           
  Misses       1423     1423           
Impacted Files Coverage Δ
src/js/tech/html5.js 67.29% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us.

@gkatsev gkatsev merged commit d178d9a into videojs:main Jul 28, 2022
misteroneill pushed a commit that referenced this pull request Nov 22, 2022
Safari's requestVideoFrameCallback is (intentionally?) broken when DRM is playing, so in that case use the fallback with requestAnimationFrame instead.
edirub pushed a commit to edirub/video.js that referenced this pull request Jun 8, 2023
Safari's requestVideoFrameCallback is (intentionally?) broken when DRM is playing, so in that case use the fallback with requestAnimationFrame instead.
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

Successfully merging this pull request may close these issues.

2 participants