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

Add goToLive method #3527

Merged
merged 1 commit into from
Jul 14, 2021
Merged

Conversation

avelad
Copy link
Member

@avelad avelad commented Jul 14, 2021

Add goToLive method to the Player. This new method is very useful in live streams.

Copy link
Contributor

@michellezhuogg michellezhuogg left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution!

@shaka-bot
Copy link
Collaborator

All tests passed!

if (this.isLive()) {
this.video_.currentTime = this.seekRange().end;
} else {
shaka.log.warning('goToLive is for live streams!');
Copy link
Member

Choose a reason for hiding this comment

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

If you want this to show up in production, then revise this to "alwaysWarn". warning() will be removed in production builds.

If you're happy with this only showing up in debug, then it's fine as-is.

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't have a preference, I do what you prefer...

Copy link
Member

Choose a reason for hiding this comment

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

It's fine with me. Just wanted to make sure you knew you had options.

@joeyparrish joeyparrish merged commit 84b9a89 into shaka-project:master Jul 14, 2021
joeyparrish pushed a commit that referenced this pull request Jul 14, 2021
@avelad avelad deleted the go-to-live-method branch July 15, 2021 05:20
@defnull
Copy link

defnull commented Jul 20, 2021

I notices that with bufferingGoal: 4 (and the default for rebufferingGoal, playing dash with 2s segments) the player will wait (buffer) for 4 seconds after calling this method. Is that intended? The time_and_duration widget will also count backwards to -0:04 before playback continues. Maybe the bufferingGoal (or the manifests minBufferTime) should be subtracted from the seek point?

Edit: I never managed to get the time_and_duration widget to display 'Live' for my live stream. Maybe there is something wrong/odd with the DASH manifests generated by ffmpeg. Or seekRange().end points to the actual live edge, but does not take mandatory buffering goals into account? Not sure.

@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.

5 participants