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

feature advanced seeking #12

Open
wants to merge 21 commits into
base: upgrade_to_v4.15.7
Choose a base branch
from

Conversation

boxyardboy
Copy link

Copy link

@CodeStrumpet CodeStrumpet left a comment

Choose a reason for hiding this comment

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

Nice work @boxyardboy -- the new functionality is sweeeeeeeeet!!

See comments below...

js/controller.js Outdated
@@ -1269,6 +1273,10 @@ OO.plugin("Html5Skin", function (OO, _, $, W) {
}
break;
case CONSTANTS.STATE.PAUSE:
if (this.actualVideoObject !== null) {

Choose a reason for hiding this comment

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

@boxyardboy -- this is an example of where the pause state is coupled with the playback rate.

I would personally advocate not changing the playback rate back to 1 when the video is paused. My reasons are:

  1. From a "defensive coding" point of view when working with state machines I like to try not to incur more state changes then are necessary
  2. I think it's a more expected user experience to not change the playback rate when pause is enabled (I could be mistaken about this and would defer to user tests and @steve-schultz here).
  3. I think we are going to want an "enabled" button state for the slow-mo feature so people can easily see when it is enabled. If we are going to change back to 1.0 then we would want to also make sure the button state of any slow-mo buttons gets updated as well.

Another example of decoupling the play/paused state is when you seek backwards 10 seconds. If the video is paused when you press this button, I would advocate not playing the video again. Once again happy to defer to user tests or @steve-schultz here.

},

slowMoOneHalf: function() {
var rate = this.actualVideoObject.playbackRate === 0.5 ? 1 : 0.5;

Choose a reason for hiding this comment

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

Nice! this is exactly what I was talking about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants