Skip to content
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

Provide a way to set the stream start time in the manifestparsed event handler #3491

Merged
merged 4 commits into from
Aug 10, 2021

Conversation

caridley
Copy link
Contributor

Description

Implements #3434

Added method Player.setStartTime(startTime: number) which can be used to update the stream start position in the manifestparsed event handler based on information obtained from the manifest, such as the position and duration of ad breaks. This is done in a way that avoids unnecessary fetching of segments at the beginning of the stream prior to fetching segments at the desired start position.

This change reduces our VOD DAI stream start times from ~4.5 to ~3.5 seconds, which has a measurable effect on our QOS metrics.

Note that I tried to implement this by setting the value of player.getMediaElement().currentTime in the manifestparsed event handler, but that did not work with Safari.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to
    not work as expected)
  • This change requires a documentation update - new function Player.setStartTime(startTime:number)

Checklist:

  • I have signed the Google CLA https://cla.developers.google.com
  • My code follows the style guidelines of this project
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have verified my change on multiple browsers on different platforms
  • I have run ./build/all.py and the build passes
  • I have run ./build/test.py and all tests pass

@caridley
Copy link
Contributor Author

caridley commented Jul 1, 2021

@joeyparrish Hoping to get a code review on this. It is an alternative implementation of #3485 which you reviewed last week.

Copy link
Collaborator

@theodab theodab left a comment

Choose a reason for hiding this comment

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

Sorry for the delay! I forgot to hit the "submit review" button last week.

lib/player.js Outdated Show resolved Hide resolved
lib/player.js Outdated Show resolved Hide resolved
lib/player.js Outdated Show resolved Hide resolved
@shaka-bot
Copy link
Collaborator

All tests passed!

@theodab theodab merged commit 16c1810 into shaka-project:master Aug 10, 2021
caridley added a commit to caridley/shaka-player that referenced this pull request Aug 25, 2022
…roject#3491)

This provides a way to decide on a start time after the manifestparsed event,
but before the load process ends.
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Jul 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants