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

Fixes TimeUI update on seek #4754

Merged
merged 3 commits into from
Nov 17, 2017
Merged

Fixes TimeUI update on seek #4754

merged 3 commits into from
Nov 17, 2017

Conversation

shahlabs
Copy link
Contributor

Description

TimeUpdate ui does not fire on seek when paused.

Specific Changes proposed

By manually triggering a timeupdate we force the ui to not use the cache.

Requirements Checklist

  • Feature implemented / Bug fixed
  • If necessary, more likely in a feature request than a bug fix
    • Change has been verified in an actual browser (Chome, Firefox, IE)
    • Unit Tests updated or fixed
    • Docs/guides updated
    • Example created (starter template on JSBin)
  • Reviewed by Two Core Contributors

@@ -244,6 +244,8 @@ class SeekBar extends Slider {
super.handleMouseUp(event);

this.player_.scrubbing(false);
// forces timeui to not use cache
this.player_.tech_.trigger('timeupdate');
Copy link
Member

Choose a reason for hiding this comment

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

is it necessary to trigger on the tech or can we trigger it on the player itself?

Also, we should trigger this event like we do here: https://github.com/videojs/video.js/blob/master/src/js/tech/tech.js#L304-L310
and we should copy over and update the jsdoc as well like there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is necessary to trigger on the tech, I had tried this.player_.trigger, it didn't work. I will update the trigger event.

Copy link
Member

Choose a reason for hiding this comment

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

cool, thanks @shahlabs!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Retested with this.player_.trigger and it worked, so updating the trigger on player @gkatsev

Copy link
Member

@gkatsev gkatsev left a comment

Choose a reason for hiding this comment

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

Seems like this improves things, particularly with Flash but doesn't completely fix it with Html5, still sporadically getting the time displays not updating in html5. This is good to be merged anyway since it improves things.
The whole seeking infrastructure in video.js needs to be overhauled, anyway.

@gkatsev
Copy link
Member

gkatsev commented Nov 16, 2017

Also, I updated the jsdoc comment.

@gkatsev gkatsev added needs: LGTM Needs one or more additional approvals patch This PR can be added to a patch release. labels Nov 16, 2017
@gkatsev gkatsev merged commit 1fcd5ae into videojs:master Nov 17, 2017
@gkatsev gkatsev removed the needs: LGTM Needs one or more additional approvals label Dec 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch This PR can be added to a patch release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants