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

iPhone video starts with a black screen #916

Closed
BPerlakiH opened this issue Aug 5, 2024 · 14 comments · Fixed by #924
Closed

iPhone video starts with a black screen #916

BPerlakiH opened this issue Aug 5, 2024 · 14 comments · Fixed by #924
Assignees
Milestone

Comments

@BPerlakiH
Copy link
Collaborator

BPerlakiH commented Aug 5, 2024

After pressing play, the video starts in full screen, but the screen is black.
If we close full screen and go fullscreen again or toggle it via picture in picture it works fine. These steps need to be repeated for each video, even if they are on the same “tab”.

Content used (currently in the "New" section):

@kelson42
Copy link
Contributor

kelson42 commented Aug 11, 2024

There is in your report two bugs: the black screen AND the fullscreen. But I can not reproduce this bug with iPadOS on iOS18. What are the exact reproduction steps?

@BPerlakiH
Copy link
Collaborator Author

It is iOS 17 specific and only on the iPhone.

@kelson42
Copy link
Contributor

@BPerlakiH So, this is working on iPhone with iOS18?

@BPerlakiH
Copy link
Collaborator Author

BPerlakiH commented Aug 11, 2024

I am not sure if it's working on iOS18, maybe it's a bit too early for that, as I do not have iOS 18 installed yet, and currently it's not yet released.
I can have a look via Beta (Xcode 16 Beta, and iOS 18 Beta), but that is only on the simulator, which might not be accurate.

@kelson42
Copy link
Contributor

@BPerlakiH Please do, testing with iPadOS 17 as well.

@BPerlakiH
Copy link
Collaborator Author

BPerlakiH commented Aug 13, 2024

This is iPhone only specific (iPadOS 17 works OK). Also reproducible with the latest ZIM file from: #914

@kelson42
Copy link
Contributor

kelson42 commented Aug 13, 2024

Please share here the table of errors for iPadOS/iOS and iOS17 and 18.. The exact step-by step procedure + screencast are needed.

@kelson42
Copy link
Contributor

@BPerlakiH Split also in teo different issues the autofullscreen issue and the black box issue.

@BPerlakiH
Copy link
Collaborator Author

@kelson42 I have updated my PR, that fixes the black screen issue for all (known to me) content. If we are good to go with that solution, the auto-full screen won't be an issue any more, as it seems to be only content related: Depending only on the content loaded it either goes full screen directly or not, so I am not sure if that needs to be "fixed".

Will have a look on iOS 18 as well...

@BPerlakiH
Copy link
Collaborator Author

Well... iOS 18 is still in beta, so many things are not working.
Eg. this code is crashing:
webView.setValue(view.safeAreaInsets, forKey: "_obscuredInsets")
but even if I take that out, the webm videos are not playing, just spinning and loading:
Screenshot 2024-08-15 at 19 27 00
Screenshot 2024-08-15 at 19 19 15

So it's not helpful at all, once we will have a Golden Master release from Apple, it's worth to re-test.

@BPerlakiH
Copy link
Collaborator Author

BPerlakiH commented Aug 15, 2024

TLDR:
this only affects iOS 17 on the iPhone.
iPad on iOS 17 is OK.

The PR is fixing this issue specifically for iPhone on iOS 17.
iOS 18 is still in beta, and unreliable to compare with.

@kelson42
Copy link
Contributor

This is a very serious bug and considering we have been working since May on these topics, it sounds to me we might face a regression here. openzim/ted#185 should have fixed it.

@rgaudin
Copy link
Member

rgaudin commented Aug 16, 2024

Thank you ; I confirm that as far as I can tell, this is an upstream issue in WKWebView+iOS 17+WebM+iPhone (I only tested on iPhone so I trust you guys on the last condition).

Reprocase is very simple as the following doesn't work. Remove the poster attribute and it works…

<html>
<body>
<video poster="thumbnail.png" src="video.webm" />
</body>
</html>

So let's go with the workaround for now.

@BPerlakiH
Copy link
Collaborator Author

Opened a separate issue for the "auto" full screen issue here: #933

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants