Revert API method change

This commit is contained in:
Sam Potts
2018-03-27 21:15:11 +11:00
parent d96957d086
commit 0cf75eed3f
10 changed files with 32 additions and 15 deletions
+8 -2
View File
@@ -6390,6 +6390,12 @@ var source = {
// License: The MIT License (MIT)
// ==========================================================================
// Private properties
// TODO: Use a WeakMap for private globals
// const globals = new WeakMap();
// Plyr instance
var Plyr = function () {
function Plyr(target, options) {
var _this = this;
@@ -6758,8 +6764,8 @@ var Plyr = function () {
*/
}, {
key: 'fastForward',
value: function fastForward(seekTime) {
key: 'forward',
value: function forward(seekTime) {
this.currentTime = this.currentTime + (utils.is.number(seekTime) ? seekTime : this.config.seekTime);
}
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+8 -2
View File
@@ -12288,6 +12288,12 @@ var source = {
// License: The MIT License (MIT)
// ==========================================================================
// Private properties
// TODO: Use a WeakMap for private globals
// const globals = new WeakMap();
// Plyr instance
var Plyr$1 = function () {
function Plyr(target, options) {
var _this = this;
@@ -12656,8 +12662,8 @@ var Plyr$1 = function () {
*/
}, {
key: 'fastForward',
value: function fastForward(seekTime) {
key: 'forward',
value: function forward(seekTime) {
this.currentTime = this.currentTime + (utils.is.number(seekTime) ? seekTime : this.config.seekTime);
}
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+8 -3
View File
@@ -413,7 +413,7 @@ class Listeners {
on(this.player.elements.buttons.rewind, 'click', this.player.rewind, 'rewind');
// Rewind
on(this.player.elements.buttons.fastForward, 'click', this.player.fastForward, 'fastForward');
on(this.player.elements.buttons.fastForward, 'click', this.player.forward, 'fastForward');
// Mute toggle
on(
@@ -491,9 +491,14 @@ class Listeners {
});
// Seek
on(this.player.elements.inputs.seek, inputEvent, event => {
on(
this.player.elements.inputs.seek,
inputEvent,
event => {
this.player.currentTime = event.target.value / event.target.max * this.player.duration;
}, 'seek');
},
'seek',
);
// Current time invert
// Only if one time element is used for both currentTime and duration
+1 -1
View File
@@ -405,7 +405,7 @@ class Plyr {
* Fast forward
* @param {number} seekTime - how far to fast forward in seconds. Defaults to the config.seekTime
*/
fastForward(seekTime) {
forward(seekTime) {
this.currentTime = this.currentTime + (utils.is.number(seekTime) ? seekTime : this.config.seekTime);
}