Skip to content

Commit

Permalink
Added missing methods on mouseup event
Browse files Browse the repository at this point in the history
  • Loading branch information
rafa8626 committed Feb 1, 2017
1 parent 24b7fd7 commit eaa6fe4
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
6 changes: 4 additions & 2 deletions build/mediaelement-and-player.js
Expand Up @@ -1810,6 +1810,8 @@ Object.assign(_player2.default.prototype, {
}
if (mouseIsDown && t.newTime.toFixed(4) !== media.currentTime.toFixed(4)) {
media.setCurrentTime(t.newTime);
player.setCurrentRail();
t.updateCurrent(t.newTime);
}
t.forcedHandlePause = false;
};
Expand Down Expand Up @@ -1967,9 +1969,9 @@ Object.assign(_player2.default.prototype, {
// and indicate that is a live broadcast
media.addEventListener('progress', function (e) {
if (media.duration !== Infinity) {
t.setProgressRail(e);
player.setProgressRail(e);
if (!t.forcedHandlePause) {
t.setCurrentRail(e);
player.setCurrentRail(e);
}
} else if (!controls.find('.' + t.options.classPrefix + 'broadcast').length) {
controls.find('.' + t.options.classPrefix + 'time-rail').empty().html('<span class="' + t.options.classPrefix + 'broadcast">' + mejs.i18n.t('mejs.live-broadcast') + '</span>');
Expand Down
2 changes: 1 addition & 1 deletion build/mediaelement-and-player.min.js

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions build/mediaelementplayer.js
Expand Up @@ -1810,6 +1810,8 @@ Object.assign(_player2.default.prototype, {
}
if (mouseIsDown && t.newTime.toFixed(4) !== media.currentTime.toFixed(4)) {
media.setCurrentTime(t.newTime);
player.setCurrentRail();
t.updateCurrent(t.newTime);
}
t.forcedHandlePause = false;
};
Expand Down Expand Up @@ -1967,9 +1969,9 @@ Object.assign(_player2.default.prototype, {
// and indicate that is a live broadcast
media.addEventListener('progress', function (e) {
if (media.duration !== Infinity) {
t.setProgressRail(e);
player.setProgressRail(e);
if (!t.forcedHandlePause) {
t.setCurrentRail(e);
player.setCurrentRail(e);
}
} else if (!controls.find('.' + t.options.classPrefix + 'broadcast').length) {
controls.find('.' + t.options.classPrefix + 'time-rail').empty().html('<span class="' + t.options.classPrefix + 'broadcast">' + mejs.i18n.t('mejs.live-broadcast') + '</span>');
Expand Down
2 changes: 1 addition & 1 deletion build/mediaelementplayer.min.js

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions src/js/features/progress.js
Expand Up @@ -164,6 +164,8 @@ Object.assign(MediaElementPlayer.prototype, {
}
if (mouseIsDown && t.newTime.toFixed(4) !== media.currentTime.toFixed(4)) {
media.setCurrentTime(t.newTime);
player.setCurrentRail();
t.updateCurrent(t.newTime);
}
t.forcedHandlePause = false;
};
Expand Down Expand Up @@ -319,9 +321,9 @@ Object.assign(MediaElementPlayer.prototype, {
// and indicate that is a live broadcast
media.addEventListener('progress', (e) => {
if (media.duration !== Infinity) {
t.setProgressRail(e);
player.setProgressRail(e);
if (!t.forcedHandlePause) {
t.setCurrentRail(e);
player.setCurrentRail(e);
}
} else if (!controls.find(`.${t.options.classPrefix}broadcast`).length) {
controls.find(`.${t.options.classPrefix}time-rail`).empty()
Expand Down

0 comments on commit eaa6fe4

Please sign in to comment.