Skip to content

Conversation

@tykus160
Copy link
Member

@tykus160 tykus160 commented Apr 8, 2025

Closes #8402

This PR introduces ability to pass Date object instead of number to shaka.Player#load() call. Date, together with PDT is used to calculate relative start time.
If stream does not have PDT, nothing will happen.

Additionally, for src= playback, we set current time on canplay event now instead of loadeddata. It seems that Safari goes to live edge on it's own if we set time too soon.

@tykus160 tykus160 added type: enhancement New feature or request priority: P3 Useful but not urgent labels Apr 8, 2025
@tykus160 tykus160 added this to the v4.15 milestone Apr 8, 2025
@shaka-bot
Copy link
Collaborator

shaka-bot commented Apr 8, 2025

Incremental code coverage: 58.65%

Copy link
Contributor

@gkatsev gkatsev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If Date is used on VOD, nothing will happen.

Why limit this to live only? VOD can have PDT data as well. That said, it's less useful for VOD. Either way, not a blocker, as it could be added in later too if we wanted.

LGTM!

@tykus160
Copy link
Member Author

tykus160 commented Apr 8, 2025

Why limit this to live only? VOD can have PDT data as well. That said, it's less useful for VOD. Either way, not a blocker, as it could be added in later too if we wanted.

LGTM!

I updated description. There is no direct limitation for VOD, actually it relies of existence of PDT.

@tykus160 tykus160 merged commit fc59408 into shaka-project:main Apr 8, 2025
30 of 32 checks passed
tykus160 added a commit to sky-hugolima/shaka-player-contrib that referenced this pull request May 20, 2025
Cherrypick from shaka-project#8415

This PR introduces ability to pass Date object instead of number to
`shaka.Player#load()` call. Date, together with PDT is used to calculate
relative start time.
If stream does not have PDT, nothing will happen.

Additionally, for src= playback, we set current time on `canplay` event
now instead of `loadeddata`. It seems that Safari goes to live edge on
it's own if we set time too soon.

Co-authored-by: Wojciech Tyczyński <[email protected]>
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Jun 7, 2025
@shaka-project shaka-project locked as resolved and limited conversation to collaborators Jun 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

priority: P3 Useful but not urgent status: archived Archived and locked; will not be updated type: enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ability to pass in a Date object for playback start time

4 participants