sampotts/plyr

Setting player.currentTime on mobile Safari 11 (iOS)

Open

#857 建立於 2018年4月3日

在 GitHub 查看
 (6 留言) (0 反應) (0 負責人)JavaScript (25,318 star) (2,856 fork)batch import
Browser IssueHelp Wanted

描述

Expected behaviour

Setting player.currentTime after the ready event sets the time at the appropriate position (an arbitrary point in the video).

Actual behaviour

Only on iOS, the video plays from the start instead of the specified position.

Environment

  • Browser: Mobile Safari
  • Version: 11
  • Operating System: iOS
  • Version: 11.2

Steps to reproduce

  • Initialize Plyr on a video element
  • Set up an event listener for the ready event
  • Set player.currentTime to a new time after the ready event has fired

I found a workaround by listening for the playing event, setting player.currentTime, and then removing the event listener. However I'm not sure if this behavior is expected on iOS, or if it's even possible to accomplish.

PS. thanks for the great player, it's a breeze to work with and the new version looks amazing!

貢獻者指南