-
-
Notifications
You must be signed in to change notification settings - Fork 70
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 iPhone video starting with a black screen on iOS 17 iPhone #924
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #924 +/- ##
=========================================
+ Coverage 0 36.43% +36.43%
=========================================
Files 0 108 +108
Lines 0 6230 +6230
=========================================
+ Hits 0 2270 +2270
- Misses 0 3960 +3960 ☔ View full report in Codecov by Sentry. |
I thought we agreed to only touch content (DOM) on last resort. Here there is no explanation. I suppose videojs is not incompatible with posters on iOS or we should have an upstream ticket linked. |
@rgaudin In this case it's the other way around a bit. It seems that iOS 17 broke the video API, and on iPhones the video starts with black screen when a poster is applied. |
Putting it slightly another way, I am not sure what our upstream options could be in this case:
|
9dd48e1
to
8887eac
Compare
@BPerlakiH I'm ready to merge this if:
|
Fixes: #916
It seems it is an iOS 17 iPhone bug:
if we have a poster attribute set, the video starts with a black screen.
Content used:
Currently in the "New" section:
Solution:
TLDR: Remove poster attribute on iPhone iOS 17.
Remove the poster attribute and having a poster displayed:
Looking deeper inside the HTML content we are using, we have the following structures:
TED "I hope" | iPhone 17.5 | BEFORE poster removal
TED "I hope" | iPhone 17.5 | AFTER poster removal
TLDR: the poster is set up in 3 different places. Therefore removing the attribute from the video element only, is not causing any side effects, the poster itself is still displayed, but we are fixing the black screen issue.
Dynamic contents:
Some of the ZIM files, such as Deus ex silicium fr also used in the other issue, creates the
<video>
tag dynamically, eg. via VUE.js routing and XHR requests.To "fix" the
<video>
tags in such dynamic cases, we can observe how the DOM is changing, and if a<video>
tag was inserted we can run the sameremovePoster
function on that.