video.js icon indicating copy to clipboard operation
video.js copied to clipboard

Webm video is not working in wkwebview with iOS 17/18

Open benoit74 opened this issue 4 months ago • 3 comments

Description

It looks like we have an issue with videos on iPhone since iOS 17 (still not patched on latest iOS 17 and iOS 18) with videos that have a poster attribute and are displayed in a WKWebView.

Problem seems to be linked to the combination of:

  • iOS 17 or iOS 18
  • iPhone
  • webm video
  • page displayed in WKWebView
  • video tag has a poster attribute

The issue is a bit random, but it is very unstable.

Removing the poster attribute seems to solve the issue.

While this issue should ultimately be fixed in iOS itself, we believe it will take long and might even never land. A workaround in video.js would help the whole community. We have already code to dynamically patch HTML in our application (see https://github.com/kiwix/kiwix-apple/pull/924). See https://github.com/kiwix/kiwix-apple/issues/916#issuecomment-2293763915 as well.

Reduced test case

https://codepen.io/benoit74/full/PoMpamE

Steps to reproduce

Open web page. Poster is display. Try to start the video. It doesn't play.

Errors

No error.

What version of Video.js are you using?

8.18.1

Video.js plugins used.

None

What browser(s) including version(s) does this occur with?

WKWebView

What OS(es) and version(s) does this occur with?

iOS 17/18 on iPhone

benoit74 avatar Oct 15 '24 06:10 benoit74