Bug 201216 - Setting currentTime doesn't work on loadedmetadata event
Summary: Setting currentTime doesn't work on loadedmetadata event
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Safari 12
Hardware: Mac macOS 10.14
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-08-28 05:46 PDT by Damjan
Modified: 2019-10-16 00:47 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Damjan 2019-08-28 05:46:53 PDT
I want to implement functionality to play video from some time. 
Sometimes it's working, sometimes not.

Browser: Safari 12.1.2 (14607.3.9)
OS: macOS Mojave 10.14.6 (18G95)
Video stream protocol: HLS
Web player: Safari native player

I implement that in a way that set HTMLMediaElement.currentTime when loadedmetadata event is triggered.

Expected:
Play video from setted currentTime.

Actual:
Sometimes video plays from beginning, sometimes video plays from setted time.

Example could be found on link:
https://codepen.io/index23-the-decoder/pen/ExYmGyd

This example always works fine on other web players like video.js.
Comment 1 Radar WebKit Bug Importer 2019-08-30 09:32:21 PDT
<rdar://problem/54884831>
Comment 2 Jer Noble 2019-08-30 12:13:02 PDT
At the point where loadedmetadata is fired, we have an AVAsset but no AVPlayer or AVPlayerItem yet. I wonder if we're not correctly saving off the seek in order to apply it to the AVPlayerItem once it's created.
Comment 3 Damjan 2019-10-16 00:47:08 PDT
(In reply to Jer Noble from comment #2)
> At the point where loadedmetadata is fired, we have an AVAsset but no
> AVPlayer or AVPlayerItem yet. I wonder if we're not correctly saving off the
> seek in order to apply it to the AVPlayerItem once it's created.

Are there any new information about this issue?