Skip to content

Commit

Permalink
Fix forward button bug in Vimeo (before playback)
Browse files Browse the repository at this point in the history
  • Loading branch information
terrill committed Feb 22, 2020
1 parent de93728 commit b87d6fc
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
6 changes: 4 additions & 2 deletions build/ableplayer.dist.js
Original file line number Diff line number Diff line change
Expand Up @@ -7776,14 +7776,15 @@ if (thisObj.useTtml && (trackSrc.endsWith('.xml') || trackText.startsWith('<?xml
(function ($) {
AblePlayer.prototype.seekTo = function (newTime) {

var thisObj = this;

// define variables to be used for analytics
// e.g., to measure the extent to which users seek back and forward
this.seekFromTime = this.media.currentTime;
this.seekToTime = newTime;

this.seeking = true;
this.liveUpdatePending = true;

if (this.player === 'html5') {
var seekable;

Expand Down Expand Up @@ -7812,8 +7813,9 @@ if (thisObj.useTtml && (trackSrc.endsWith('.xml') || trackText.startsWith('<?xml
else if (this.player === 'vimeo') {
this.vimeoPlayer.setCurrentTime(newTime).then(function() {
// seek finished.
// could do something here
// successful completion also fires a 'seeked' event (see event.js)
thisObj.elapsed = newTime;
thisObj.refreshControls('timeline');
})
}
this.refreshControls('timeline');
Expand Down
6 changes: 4 additions & 2 deletions build/ableplayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -7776,14 +7776,15 @@ if (thisObj.useTtml && (trackSrc.endsWith('.xml') || trackText.startsWith('<?xml
(function ($) {
AblePlayer.prototype.seekTo = function (newTime) {

var thisObj = this;

// define variables to be used for analytics
// e.g., to measure the extent to which users seek back and forward
this.seekFromTime = this.media.currentTime;
this.seekToTime = newTime;

this.seeking = true;
this.liveUpdatePending = true;

if (this.player === 'html5') {
var seekable;

Expand Down Expand Up @@ -7812,8 +7813,9 @@ if (thisObj.useTtml && (trackSrc.endsWith('.xml') || trackText.startsWith('<?xml
else if (this.player === 'vimeo') {
this.vimeoPlayer.setCurrentTime(newTime).then(function() {
// seek finished.
// could do something here
// successful completion also fires a 'seeked' event (see event.js)
thisObj.elapsed = newTime;
thisObj.refreshControls('timeline');
})
}
this.refreshControls('timeline');
Expand Down
4 changes: 2 additions & 2 deletions build/ableplayer.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ableplayer",
"version": "4.2.5",
"version": "4.2.6",
"description": "fully accessible HTML5 media player",
"homepage": "http://ableplayer.github.io/ableplayer",
"bugs": "https://github.com/ableplayer/ableplayer/issues",
Expand Down
6 changes: 4 additions & 2 deletions scripts/control.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
(function ($) {
AblePlayer.prototype.seekTo = function (newTime) {

var thisObj = this;

// define variables to be used for analytics
// e.g., to measure the extent to which users seek back and forward
this.seekFromTime = this.media.currentTime;
this.seekToTime = newTime;

this.seeking = true;
this.liveUpdatePending = true;

if (this.player === 'html5') {
var seekable;

Expand Down Expand Up @@ -37,8 +38,9 @@
else if (this.player === 'vimeo') {
this.vimeoPlayer.setCurrentTime(newTime).then(function() {
// seek finished.
// could do something here
// successful completion also fires a 'seeked' event (see event.js)
thisObj.elapsed = newTime;
thisObj.refreshControls('timeline');
})
}
this.refreshControls('timeline');
Expand Down

0 comments on commit b87d6fc

Please sign in to comment.