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

Optional StartTime is not working properly because of invalid startTime check #1069

Closed
SemihGk opened this issue Oct 16, 2017 · 4 comments
Closed
Assignees
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@SemihGk
Copy link
Contributor

SemihGk commented Oct 16, 2017

Have you read the FAQ and checked for duplicate issues:
Yes
What version of Shaka Player are you using:
latest
Can you reproduce the issue with our latest release version:
yes
Can you reproduce the issue with the latest code from master:
yes

What did you do?
I sent optional startTime paramater to shaka.Player.load() method as 0, but video was not starting from currentTime = 0. After some investigation, I found some invalid checks on your code blocks that handles startTime. Please check
https://github.com/google/shaka-player/blob/master/lib/player.js#L818 .
At this line, PlayHead method recieves null instead of 0.

Also: https://github.com/google/shaka-player/blob/master/lib/media/playhead.js#L201
Same problem exists at this line as well.

After fixing this 2 line, it works well. It should be a quick fix for you since we may need this fix soon. If you prefer a PR, I do not mind to create one as well.

Thanks,
Semih.

@chrisfillmore
Copy link
Contributor

To add more context: we need to be able to set a startTime of 0 in order to support restartable live content.

@TheModMaker
Copy link
Contributor

Thanks for finding this, will have a fix up soon.

@TheModMaker TheModMaker self-assigned this Oct 16, 2017
@TheModMaker TheModMaker added the type: bug Something isn't working correctly label Oct 16, 2017
@TheModMaker TheModMaker added this to the v2.3.0 milestone Oct 16, 2017
joeyparrish pushed a commit that referenced this issue Oct 16, 2017
Closes #1069

Change-Id: I345626ec5418cc3d15935a8a0bc6f1d4449832e7
@joeyparrish
Copy link
Member

Cherry-picked to v2.2.3.

shaka-bot pushed a commit that referenced this issue Oct 18, 2017
Commit 5cb7204 broke the start time calculations for live streams.
We don't need to set the start time with non-0 play-range start
values since Playhead will clamp the start time anyway.

Issue #1069

Change-Id: I40915cc5ecd81085c55149e7267d5025745ddb47
joeyparrish pushed a commit that referenced this issue Oct 23, 2017
Commit 5cb7204 broke the start time calculations for live streams.
We don't need to set the start time with non-0 play-range start
values since Playhead will clamp the start time anyway.

Issue #1069

Change-Id: I40915cc5ecd81085c55149e7267d5025745ddb47
@joeyparrish
Copy link
Member

A follow-up fix (fix of the fix) has been cherry-picked to v2.2.4.

@shaka-project shaka-project locked and limited conversation to collaborators Mar 22, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
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 type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

5 participants