-
-
Notifications
You must be signed in to change notification settings - Fork 225
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
Play button and resume #605
Conversation
Codecov Report
@@ Coverage Diff @@
## master #605 +/- ##
==========================================
+ Coverage 5.29% 10.20% +4.91%
==========================================
Files 104 106 +2
Lines 2851 2929 +78
Branches 428 447 +19
==========================================
+ Hits 151 299 +148
+ Misses 2693 2614 -79
- Partials 7 16 +9
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I seem unable to resume anything. The video interface just ends up as a black screen. I have checked the source url and it works.
This is linked to streams being unseekable on master, I believe. Since you can't seek in the file, it'll start from the beginning even with the proper position passed to Shaka. |
Ah, that would make sense, I'll roll back to RC2 and see whether it works with that. I'm still getting the same results, playing from the beginning works fine, resuming results in a black screen |
The webm issue is on our end, since web doesn't have the issue :p It's likely due to some change in the profile. Ours is very different compared to jf-web, which it shouldn't be :/ |
@@ -239,28 +238,30 @@ export default Vue.extend({ | |||
this.setLastProgressUpdate({ progress: new Date().getTime() }); | |||
break; | |||
case 'playbackManager/SET_CURRENT_TIME': { | |||
const now = new Date().getTime(); | |||
if (state.playbackManager.status === PlaybackStatus.playing) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for reporting progress. Technically, if we're paused, stopped or in error, there is no progress to report.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are also setting the current time in play()
now, so before playback starts (This is needed to tell Shaka where to start in the stream).
So this also prevents an error when starting playback, due to playback not being started yet when this is called the first time.
|
||
this.setLastProgressUpdate({ progress: new Date().getTime() }); | ||
this.setLastProgressUpdate({ progress: new Date().getTime() }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we use now
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, but that's not really the scope of this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MrTimscampi I don't understand why it's outside the scope. You're already declaring const now
in line 242 (as I mentioned above), why not use that instead? You're getting time two times from Date()
when you already have it in a variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is all untouched code though, it just has an indentation change :)
c80e33d
to
e8eb097
Compare
Kudos, SonarCloud Quality Gate passed!
|
(I forgot to open a PR for this one and the branch has been sitting there for a few days 😆 )
This allows resuming if an item is already in progress, and adds a "Play from the beginning" entry to the item menu, which shows up when you can resume an item.