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

iOS devices ignoring cue points after NotAllowedError

Open gintermaggio-am opened this issue 1 year ago • 3 comments

Expected Behavior

  • Cue points should be maintained and respected after a NotAllowedError

Actual Behavior

  • Cue points appear to still be maintained in memory but are ignored

Steps to Reproduce

  • Only some versions of iOS are currently exhibiting this error. We've reproduced the issue in Safari on an iPhone 14 Plus running iOS v16.0.
  • Visit https://codepen.io/Broken-Wind/pen/RwqwgQp?editors=1111
  • The code should throw a NotAllowedError in the console. We would expect that clicking the Play button to resume playback, the cue point would still be respected, but it's skipped. If you remove the play() on DOMContentLoaded and try clicking play without triggering the NotAllowedError, the cue point is respected.

gintermaggio-am avatar Jun 07 '23 21:06 gintermaggio-am

@rkrishnan8594 Can you let me know if this is a priority fix for you all? Wondering if we need to code our own workaround as it is likely to affect a substantial portion of our users. Thanks!

gintermaggio-am avatar Jun 09 '23 00:06 gintermaggio-am

Thanks for reporting this issue @gintermaggio-am (and for putting together a Codepen). I'm able to reproduce, but because it's confined to a narrow use case, we likely won't be prioritizing this soon. My recommendation for now would be to avoid attempting to autoplay a non-muted player - browsers almost always prevent this by throwing an error and often it will lead to unexpected behavior.

rkrishnan8594 avatar Jun 09 '23 14:06 rkrishnan8594

Understandable. Thanks for the heads up! If only we could convince the powers that be not to autoplay unmuted videos... :)

gintermaggio-am avatar Jun 09 '23 17:06 gintermaggio-am