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

10
dist/plyr.js vendored
View File

@ -6390,6 +6390,12 @@ var source = {
// License: The MIT License (MIT) // License: The MIT License (MIT)
// ========================================================================== // ==========================================================================
// Private properties
// TODO: Use a WeakMap for private globals
// const globals = new WeakMap();
// Plyr instance
var Plyr = function () { var Plyr = function () {
function Plyr(target, options) { function Plyr(target, options) {
var _this = this; var _this = this;
@ -6758,8 +6764,8 @@ var Plyr = function () {
*/ */
}, { }, {
key: 'fastForward', key: 'forward',
value: function fastForward(seekTime) { value: function forward(seekTime) {
this.currentTime = this.currentTime + (utils.is.number(seekTime) ? seekTime : this.config.seekTime); this.currentTime = this.currentTime + (utils.is.number(seekTime) ? seekTime : this.config.seekTime);
} }

2
dist/plyr.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/plyr.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -12288,6 +12288,12 @@ var source = {
// License: The MIT License (MIT) // License: The MIT License (MIT)
// ========================================================================== // ==========================================================================
// Private properties
// TODO: Use a WeakMap for private globals
// const globals = new WeakMap();
// Plyr instance
var Plyr$1 = function () { var Plyr$1 = function () {
function Plyr(target, options) { function Plyr(target, options) {
var _this = this; var _this = this;
@ -12656,8 +12662,8 @@ var Plyr$1 = function () {
*/ */
}, { }, {
key: 'fastForward', key: 'forward',
value: function fastForward(seekTime) { value: function forward(seekTime) {
this.currentTime = this.currentTime + (utils.is.number(seekTime) ? seekTime : this.config.seekTime); this.currentTime = this.currentTime + (utils.is.number(seekTime) ? seekTime : this.config.seekTime);
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -413,7 +413,7 @@ class Listeners {
on(this.player.elements.buttons.rewind, 'click', this.player.rewind, 'rewind'); on(this.player.elements.buttons.rewind, 'click', this.player.rewind, '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 // Mute toggle
on( on(
@ -491,9 +491,14 @@ class Listeners {
}); });
// Seek // Seek
on(this.player.elements.inputs.seek, inputEvent, event => { on(
this.player.currentTime = event.target.value / event.target.max * this.player.duration; this.player.elements.inputs.seek,
}, 'seek'); inputEvent,
event => {
this.player.currentTime = event.target.value / event.target.max * this.player.duration;
},
'seek',
);
// Current time invert // Current time invert
// Only if one time element is used for both currentTime and duration // Only if one time element is used for both currentTime and duration

View File

@ -405,7 +405,7 @@ class Plyr {
* Fast forward * Fast forward
* @param {number} seekTime - how far to fast forward in seconds. Defaults to the config.seekTime * @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); this.currentTime = this.currentTime + (utils.is.number(seekTime) ? seekTime : this.config.seekTime);
} }