1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 19:42:38 +02:00

update videojs-seek-buttons

This commit is contained in:
Vinzenz Hersche 2018-05-21 03:50:05 +02:00
parent d5324612ed
commit 390b33c921
6 changed files with 66 additions and 18 deletions

View file

@ -0,0 +1,4 @@
videojs.addLanguage('it', {
"Seek forward {{seconds}} seconds": "Avanti di {{seconds}} secondi",
"Seek back {{seconds}} seconds": "Indietro di {{seconds}} secondi"
});

View file

@ -4,7 +4,7 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
var videojs = _interopDefault(require('video.js')); var videojs = _interopDefault(require('video.js'));
var version = "1.1.0"; var version = "1.2.4";
var classCallCheck = function (instance, Constructor) { var classCallCheck = function (instance, Constructor) {
if (!(instance instanceof Constructor)) { if (!(instance instanceof Constructor)) {

View file

@ -1,7 +1,7 @@
/** /**
* videojs-seek-buttons * videojs-seek-buttons
* @version 1.1.0 * @version 1.2.4
* @copyright 2017 Ben Clifford * @copyright 2018 Ben Clifford
* @license Apache-2.0 * @license Apache-2.0
*/ */
@import url(https://fonts.googleapis.com/css?family=Material+Icons);.video-js .vjs-seek-button{font-family:'Material Icons';cursor:pointer}.video-js .vjs-seek-button.skip-back::before{content:'\e042'}.video-js .vjs-seek-button.skip-back.skip-10::before{content:'\e059'}.video-js .vjs-seek-button.skip-back.skip-5::before{content:'\e05b'}.video-js .vjs-seek-button.skip-back.skip-30::before{content:'\e05a'}.video-js .vjs-seek-button.skip-forward::before{content:'\e5d5'}.video-js .vjs-seek-button.skip-forward.skip-10::before{content:'\e056'}.video-js .vjs-seek-button.skip-forward.skip-5::before{content:'\e058'}.video-js .vjs-seek-button.skip-forward.skip-30::before{content:'\e057'}.video-js.vjs-v6 .vjs-seek-button.skip-back::before,.video-js.vjs-v6 .vjs-seek-button.skip-back.skip-10::before,.video-js.vjs-v6 .vjs-seek-button.skip-back.skip-5::before,.video-js.vjs-v6 .vjs-seek-button.skip-back.skip-30::before,.video-js.vjs-v6 .vjs-seek-button.skip-forward::before,.video-js.vjs-v6 .vjs-seek-button.skip-forward.skip-10::before,.video-js.vjs-v6 .vjs-seek-button.skip-forward.skip-5::before,.video-js.vjs-v6 .vjs-seek-button.skip-forward.skip-30::before{content:none}.video-js.vjs-v6 .vjs-seek-button.skip-back .vjs-icon-placeholder::before{content:'\e042'}.video-js.vjs-v6 .vjs-seek-button.skip-back.skip-10 .vjs-icon-placeholder::before{content:'\e059'}.video-js.vjs-v6 .vjs-seek-button.skip-back.skip-5 .vjs-icon-placeholder::before{content:'\e05b'}.video-js.vjs-v6 .vjs-seek-button.skip-back.skip-30 .vjs-icon-placeholder::before{content:'\e05a'}.video-js.vjs-v6 .vjs-seek-button.skip-forward .vjs-icon-placeholder::before{content:'\e5d5'}.video-js.vjs-v6 .vjs-seek-button.skip-forward.skip-10 .vjs-icon-placeholder::before{content:'\e056'}.video-js.vjs-v6 .vjs-seek-button.skip-forward.skip-5 .vjs-icon-placeholder::before{content:'\e058'}.video-js.vjs-v6 .vjs-seek-button.skip-forward.skip-30 .vjs-icon-placeholder::before{content:'\e057'} @import url(https://fonts.googleapis.com/css?family=Material+Icons);.video-js .vjs-seek-button{font-family:'Material Icons';cursor:pointer}.video-js .vjs-seek-button.skip-back::before{content:'\e042'}.video-js .vjs-seek-button.skip-back.skip-10::before{content:'\e059'}.video-js .vjs-seek-button.skip-back.skip-5::before{content:'\e05b'}.video-js .vjs-seek-button.skip-back.skip-30::before{content:'\e05a'}.video-js .vjs-seek-button.skip-forward::before{content:'\e5d5'}.video-js .vjs-seek-button.skip-forward.skip-10::before{content:'\e056'}.video-js .vjs-seek-button.skip-forward.skip-5::before{content:'\e058'}.video-js .vjs-seek-button.skip-forward.skip-30::before{content:'\e057'}.video-js.vjs-v6 .vjs-seek-button.skip-back::before,.video-js.vjs-v6 .vjs-seek-button.skip-back.skip-10::before,.video-js.vjs-v6 .vjs-seek-button.skip-back.skip-5::before,.video-js.vjs-v6 .vjs-seek-button.skip-back.skip-30::before,.video-js.vjs-v6 .vjs-seek-button.skip-forward::before,.video-js.vjs-v6 .vjs-seek-button.skip-forward.skip-10::before,.video-js.vjs-v6 .vjs-seek-button.skip-forward.skip-5::before,.video-js.vjs-v6 .vjs-seek-button.skip-forward.skip-30::before{content:none}.video-js.vjs-v6 .vjs-seek-button.skip-back .vjs-icon-placeholder::before{content:'\e042'}.video-js.vjs-v6 .vjs-seek-button.skip-back.skip-10 .vjs-icon-placeholder::before{content:'\e059'}.video-js.vjs-v6 .vjs-seek-button.skip-back.skip-5 .vjs-icon-placeholder::before{content:'\e05b'}.video-js.vjs-v6 .vjs-seek-button.skip-back.skip-30 .vjs-icon-placeholder::before{content:'\e05a'}.video-js.vjs-v6 .vjs-seek-button.skip-forward .vjs-icon-placeholder::before{content:'\e5d5'}.video-js.vjs-v6 .vjs-seek-button.skip-forward.skip-10 .vjs-icon-placeholder::before{content:'\e056'}.video-js.vjs-v6 .vjs-seek-button.skip-forward.skip-5 .vjs-icon-placeholder::before{content:'\e058'}.video-js.vjs-v6 .vjs-seek-button.skip-forward.skip-30 .vjs-icon-placeholder::before{content:'\e057'}

View file

@ -1,6 +1,6 @@
import videojs from 'video.js'; import videojs from 'video.js';
var version = "1.1.0"; var version = "1.2.4";
var classCallCheck = function (instance, Constructor) { var classCallCheck = function (instance, Constructor) {
if (!(instance instanceof Constructor)) { if (!(instance instanceof Constructor)) {

View file

@ -1,7 +1,7 @@
/** /**
* videojs-seek-buttons * videojs-seek-buttons
* @version 1.1.0 * @version 1.2.4
* @copyright 2017 Ben Clifford * @copyright 2018 Ben Clifford
* @license Apache-2.0 * @license Apache-2.0
*/ */
(function (global, factory) { (function (global, factory) {
@ -12,19 +12,63 @@
videojs = 'default' in videojs ? videojs['default'] : videojs; videojs = 'default' in videojs ? videojs['default'] : videojs;
var version = "1.1.0"; var version = "1.2.4";
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var classCallCheck = function (instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
};
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var inherits = function (subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: false,
writable: true,
configurable: true
}
});
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
};
var possibleConstructorReturn = function (self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return call && (typeof call === "object" || typeof call === "function") ? call : self;
};
var Button = videojs.getComponent('Button'); var Button = videojs.getComponent('Button');
var Component = videojs.getComponent('Component'); var Component = videojs.getComponent('Component');
// Default options for the plugin. // Default options for the plugin.
var defaults = {}; var defaults$$1 = {};
// Cross-compatibility for Video.js 5 and 6. // Cross-compatibility for Video.js 5 and 6.
var registerPlugin = videojs.registerPlugin || videojs.plugin; var registerPlugin = videojs.registerPlugin || videojs.plugin;
@ -81,7 +125,7 @@ var seekButtons = function seekButtons(options) {
var _this = this; var _this = this;
this.ready(function () { this.ready(function () {
onPlayerReady(_this, videojs.mergeOptions(defaults, options)); onPlayerReady(_this, videojs.mergeOptions(defaults$$1, options));
}); });
}; };
@ -95,12 +139,12 @@ var seekButtons = function seekButtons(options) {
*/ */
var SeekButton = function (_Button) { var SeekButton = function (_Button) {
_inherits(SeekButton, _Button); inherits(SeekButton, _Button);
function SeekButton(player, options) { function SeekButton(player, options) {
_classCallCheck(this, SeekButton); classCallCheck(this, SeekButton);
var _this2 = _possibleConstructorReturn(this, _Button.call(this, player, options)); var _this2 = possibleConstructorReturn(this, _Button.call(this, player, options));
if (_this2.options_.direction === 'forward') { if (_this2.options_.direction === 'forward') {
_this2.controlText(_this2.localize('Seek forward {{seconds}} seconds').replace('{{seconds}}', _this2.options_.seconds)); _this2.controlText(_this2.localize('Seek forward {{seconds}} seconds').replace('{{seconds}}', _this2.options_.seconds));

View file

@ -1,7 +1,7 @@
/** /**
* videojs-seek-buttons * videojs-seek-buttons
* @version 1.1.0 * @version 1.2.4
* @copyright 2017 Ben Clifford * @copyright 2018 Ben Clifford
* @license Apache-2.0 * @license Apache-2.0
*/ */
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("video.js")):"function"==typeof define&&define.amd?define(["video.js"],o):e.videojsSeekButtons=o(e.videojs)}(this,function(e){"use strict";function o(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}function t(e,o){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!o||"object"!=typeof o&&"function"!=typeof o?e:o}function n(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function, not "+typeof o);e.prototype=Object.create(o&&o.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(e,o):e.__proto__=o)}var r=(e="default"in e?e.default:e).getComponent("Button"),i=e.getComponent("Component"),s={},c=e.registerPlugin||e.plugin,a=function(e,o){e.addClass("vjs-seek-buttons"),o.forward&&o.forward>0&&(e.controlBar.seekForward=e.controlBar.addChild("seekButton",{direction:"forward",seconds:o.forward}),e.controlBar.el().insertBefore(e.controlBar.seekForward.el(),e.controlBar.el().firstChild.nextSibling)),o.back&&o.back>0&&(e.controlBar.seekBack=e.controlBar.addChild("seekButton",{direction:"back",seconds:o.back}),e.controlBar.el().insertBefore(e.controlBar.seekBack.el(),e.controlBar.el().firstChild.nextSibling))},l=function(o){var t=this;this.ready(function(){a(t,e.mergeOptions(s,o))})},d=function(e){function r(n,i){o(this,r);var s=t(this,e.call(this,n,i));return"forward"===s.options_.direction?s.controlText(s.localize("Seek forward {{seconds}} seconds").replace("{{seconds}}",s.options_.seconds)):"back"===s.options_.direction&&s.controlText(s.localize("Seek back {{seconds}} seconds").replace("{{seconds}}",s.options_.seconds)),s}return n(r,e),r.prototype.buildCSSClass=function(){return"vjs-seek-button skip-"+this.options_.direction+" skip-"+this.options_.seconds+" "+e.prototype.buildCSSClass.call(this)},r.prototype.handleClick=function(){var e=this.player_.currentTime();"forward"===this.options_.direction?this.player_.currentTime(e+this.options_.seconds):"back"===this.options_.direction&&this.player_.currentTime(e-this.options_.seconds)},r}(r);return i.registerComponent("SeekButton",d),c("seekButtons",l),l.VERSION="1.1.0",l}); !function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("video.js")):"function"==typeof define&&define.amd?define(["video.js"],o):e.videojsSeekButtons=o(e.videojs)}(this,function(e){"use strict";var o=function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")},t=function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function, not "+typeof o);e.prototype=Object.create(o&&o.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(e,o):e.__proto__=o)},n=function(e,o){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!o||"object"!=typeof o&&"function"!=typeof o?e:o},r=(e="default"in e?e.default:e).getComponent("Button"),i=e.getComponent("Component"),s={},c=e.registerPlugin||e.plugin,a=function(e,o){e.addClass("vjs-seek-buttons"),o.forward&&o.forward>0&&(e.controlBar.seekForward=e.controlBar.addChild("seekButton",{direction:"forward",seconds:o.forward}),e.controlBar.el().insertBefore(e.controlBar.seekForward.el(),e.controlBar.el().firstChild.nextSibling)),o.back&&o.back>0&&(e.controlBar.seekBack=e.controlBar.addChild("seekButton",{direction:"back",seconds:o.back}),e.controlBar.el().insertBefore(e.controlBar.seekBack.el(),e.controlBar.el().firstChild.nextSibling))},l=function(o){var t=this;this.ready(function(){a(t,e.mergeOptions(s,o))})},d=function(e){function r(t,i){o(this,r);var s=n(this,e.call(this,t,i));return"forward"===s.options_.direction?s.controlText(s.localize("Seek forward {{seconds}} seconds").replace("{{seconds}}",s.options_.seconds)):"back"===s.options_.direction&&s.controlText(s.localize("Seek back {{seconds}} seconds").replace("{{seconds}}",s.options_.seconds)),s}return t(r,e),r.prototype.buildCSSClass=function(){return"vjs-seek-button skip-"+this.options_.direction+" skip-"+this.options_.seconds+" "+e.prototype.buildCSSClass.call(this)},r.prototype.handleClick=function(){var e=this.player_.currentTime();"forward"===this.options_.direction?this.player_.currentTime(e+this.options_.seconds):"back"===this.options_.direction&&this.player_.currentTime(e-this.options_.seconds)},r}(r);return i.registerComponent("SeekButton",d),c("seekButtons",l),l.VERSION="1.2.4",l});