Skip to content

iPhone: Setting currentTime before playing the video breaks timeupdate events #9018

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

Open
tmldsousa opened this issue Mar 27, 2025 · 1 comment
Labels
needs: triage This issue needs to be reviewed

Comments

@tmldsousa
Copy link

Description

On iPhones, setting the start time (using currentTime(...)) before the video is played breaks the timeupdate events.

After this and the video is playing, further attempts to call currentTime(...) lead to erratic behaviour, where sometimes timeupdate starts working again, other times it gets stuck in the same value (even though the video is playing).

On iPad, Android devices and Desktop it works as expected: When playing the video, the video starts from the requested time and timeupdate events get triggered normally.

Reduced test case

https://codepen.io/tmldsousa/pen/azbaEqm

Steps to reproduce

  1. Initialise the player
  2. Listen to timeupdate events
  3. Set the initial time using currentTime(...)
  4. Play the video (using play() or otherwise click in the play button)
  5. Bug: The video doesn't start from the previously set time, and timeupdate events are not triggered

Errors

No error seems to be displayed on console, or raised in the error event handler.

What version of Video.js are you using?

8.21.1

Video.js plugins used.

none

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

Any browser (tested Safari / Chrome)

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

iOS 18.3.1 (iPhone only, iPad works)

@tmldsousa tmldsousa added the needs: triage This issue needs to be reviewed label Mar 27, 2025
Copy link

welcome bot commented Mar 27, 2025

👋 Thanks for opening your first issue here! 👋

If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: triage This issue needs to be reviewed
Projects
None yet
Development

No branches or pull requests

1 participant