Comparar commits
1 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| bef4c96a4b |
@@ -6,18 +6,6 @@ _(none)_
|
||||
|
||||
--------------------
|
||||
|
||||
## 5.3.0 (2015-11-25)
|
||||
* @forbesjo updated formatTime to not go negative ([view](https://github.com/videojs/video.js/pull/2821))
|
||||
* @imbcmdth added sourceOrder option for source-first ordering in selectSource ([view](https://github.com/videojs/video.js/pull/2847))
|
||||
|
||||
## 5.2.4 (2015-11-25)
|
||||
* @gesinger checked for track changes before tech started listening ([view](https://github.com/videojs/video.js/pull/2835))
|
||||
* @gesinger fixed handler explosion for cuechange events ([view](https://github.com/videojs/video.js/pull/2849))
|
||||
* @mmcc fixed vertical volume ([view](https://github.com/videojs/video.js/pull/2859))
|
||||
|
||||
## 5.2.3 (2015-11-24)
|
||||
* @gkatsev fixed clearing out errors ([view](https://github.com/videojs/video.js/pull/2850))
|
||||
|
||||
## 5.2.2 (2015-11-23)
|
||||
* @DatTran fixed bower paths. Fixes #2740 ([view](https://github.com/videojs/video.js/pull/2775))
|
||||
* @nbibler ensured classes begin with alpha characters. Fixes #2828 ([view](https://github.com/videojs/video.js/pull/2829))
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "video.js",
|
||||
"description": "An HTML5 and Flash video player with a common API and skin for both.",
|
||||
"version": "5.3.0",
|
||||
"version": "5.2.2",
|
||||
"keywords": [
|
||||
"videojs",
|
||||
"html5",
|
||||
|
||||
externo
+46
-128
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @license
|
||||
* Video.js 5.3.0 <http://videojs.com/>
|
||||
* Video.js 5.2.2 <http://videojs.com/>
|
||||
* Copyright Brightcove, Inc. <https://www.brightcove.com/>
|
||||
* Available under Apache License Version 2.0
|
||||
* <https://github.com/videojs/video.js/blob/master/LICENSE>
|
||||
@@ -1782,14 +1782,8 @@ module.exports = function hasSymbols() {
|
||||
var obj = {};
|
||||
var sym = Symbol('test');
|
||||
if (typeof sym === 'string') { return false; }
|
||||
|
||||
// temp disabled per https://github.com/ljharb/object.assign/issues/17
|
||||
// if (sym instanceof Symbol) { return false; }
|
||||
// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
|
||||
// if (!(Object(sym) instanceof Symbol)) { return false; }
|
||||
|
||||
var symVal = 42;
|
||||
obj[sym] = symVal;
|
||||
if (sym instanceof Symbol) { return false; }
|
||||
obj[sym] = 42;
|
||||
for (sym in obj) { return false; }
|
||||
if (keys(obj).length !== 0) { return false; }
|
||||
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
|
||||
@@ -1803,7 +1797,7 @@ module.exports = function hasSymbols() {
|
||||
|
||||
if (typeof Object.getOwnPropertyDescriptor === 'function') {
|
||||
var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
|
||||
if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
|
||||
if (descriptor.value !== 42 || descriptor.enumerable !== true) { return false; }
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -1826,25 +1820,20 @@ var propIsEnumerable = bind.call(Function.call, Object.prototype.propertyIsEnume
|
||||
module.exports = function assign(target, source1) {
|
||||
if (!canBeObject(target)) { throw new TypeError('target must be an object'); }
|
||||
var objTarget = toObject(target);
|
||||
var s, source, i, props, syms, value, key;
|
||||
var s, source, i, props, syms;
|
||||
for (s = 1; s < arguments.length; ++s) {
|
||||
source = toObject(arguments[s]);
|
||||
props = keys(source);
|
||||
if (hasSymbols && Object.getOwnPropertySymbols) {
|
||||
syms = Object.getOwnPropertySymbols(source);
|
||||
for (i = 0; i < syms.length; ++i) {
|
||||
key = syms[i];
|
||||
if (propIsEnumerable(source, key)) {
|
||||
push(props, key);
|
||||
if (propIsEnumerable(source, syms[i])) {
|
||||
push(props, syms[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (i = 0; i < props.length; ++i) {
|
||||
key = props[i];
|
||||
value = source[key];
|
||||
if (propIsEnumerable(source, key)) {
|
||||
objTarget[key] = value;
|
||||
}
|
||||
objTarget[props[i]] = source[props[i]];
|
||||
}
|
||||
}
|
||||
return objTarget;
|
||||
@@ -2153,26 +2142,6 @@ module.exports = function isArguments(value) {
|
||||
|
||||
var implementation = _dereq_('./implementation');
|
||||
|
||||
var lacksProperEnumerationOrder = function () {
|
||||
if (!Object.assign) {
|
||||
return false;
|
||||
}
|
||||
// v8, specifically in node 4.x, has a bug with incorrect property enumeration order
|
||||
// note: this does not detect the bug unless there's 20 characters
|
||||
var str = 'abcdefghijklmnopqrst';
|
||||
var letters = str.split('');
|
||||
var map = {};
|
||||
for (var i = 0; i < letters.length; ++i) {
|
||||
map[letters[i]] = letters[i];
|
||||
}
|
||||
var obj = Object.assign({}, map);
|
||||
var actual = '';
|
||||
for (var k in obj) {
|
||||
actual += k;
|
||||
}
|
||||
return str !== actual;
|
||||
};
|
||||
|
||||
var assignHasPendingExceptions = function () {
|
||||
if (!Object.assign || !Object.preventExtensions) {
|
||||
return false;
|
||||
@@ -2188,16 +2157,7 @@ var assignHasPendingExceptions = function () {
|
||||
};
|
||||
|
||||
module.exports = function getPolyfill() {
|
||||
if (!Object.assign) {
|
||||
return implementation;
|
||||
}
|
||||
if (lacksProperEnumerationOrder()) {
|
||||
return implementation;
|
||||
}
|
||||
if (assignHasPendingExceptions()) {
|
||||
return implementation;
|
||||
}
|
||||
return Object.assign;
|
||||
return !Object.assign || assignHasPendingExceptions() ? implementation : Object.assign;
|
||||
};
|
||||
|
||||
},{"./implementation":44}],52:[function(_dereq_,module,exports){
|
||||
@@ -2208,11 +2168,9 @@ var getPolyfill = _dereq_('./polyfill');
|
||||
|
||||
module.exports = function shimAssign() {
|
||||
var polyfill = getPolyfill();
|
||||
define(
|
||||
Object,
|
||||
{ assign: polyfill },
|
||||
{ assign: function () { return Object.assign !== polyfill; } }
|
||||
);
|
||||
if (Object.assign !== polyfill) {
|
||||
define(Object, { assign: polyfill });
|
||||
}
|
||||
return polyfill;
|
||||
};
|
||||
|
||||
@@ -10750,9 +10708,7 @@ var Player = (function (_Component) {
|
||||
};
|
||||
|
||||
/**
|
||||
* Select source based on tech-order or source-order
|
||||
* Uses source-order selection if `options.sourceOrder` is truthy. Otherwise,
|
||||
* defaults to tech-order selection
|
||||
* Select source based on tech order
|
||||
*
|
||||
* @param {Array} sources The sources for a media asset
|
||||
* @return {Object|Boolean} Object of source and tech order, otherwise false
|
||||
@@ -10760,72 +10716,36 @@ var Player = (function (_Component) {
|
||||
*/
|
||||
|
||||
Player.prototype.selectSource = function selectSource(sources) {
|
||||
// Get only the techs specified in `techOrder` that exist and are supported by the
|
||||
// current platform
|
||||
var techs = this.options_.techOrder.map(_utilsToTitleCaseJs2['default']).map(function (techName) {
|
||||
// `Component.getComponent(...)` is for support of old behavior of techs
|
||||
// being registered as components.
|
||||
// Loop through each playback technology in the options order
|
||||
for (var i = 0, j = this.options_.techOrder; i < j.length; i++) {
|
||||
var techName = _utilsToTitleCaseJs2['default'](j[i]);
|
||||
var tech = _techTechJs2['default'].getTech(techName);
|
||||
// Support old behavior of techs being registered as components.
|
||||
// Remove once that deprecated behavior is removed.
|
||||
return [techName, _techTechJs2['default'].getTech(techName) || _componentJs2['default'].getComponent(techName)];
|
||||
}).filter(function (_ref) {
|
||||
var techName = _ref[0];
|
||||
var tech = _ref[1];
|
||||
|
||||
if (!tech) {
|
||||
tech = _componentJs2['default'].getComponent(techName);
|
||||
}
|
||||
// Check if the current tech is defined before continuing
|
||||
if (tech) {
|
||||
// Check if the browser supports this technology
|
||||
return tech.isSupported();
|
||||
if (!tech) {
|
||||
_utilsLogJs2['default'].error('The "' + techName + '" tech is undefined. Skipped browser support check for that tech.');
|
||||
continue;
|
||||
}
|
||||
|
||||
_utilsLogJs2['default'].error('The "' + techName + '" tech is undefined. Skipped browser support check for that tech.');
|
||||
return false;
|
||||
});
|
||||
// Check if the browser supports this technology
|
||||
if (tech.isSupported()) {
|
||||
// Loop through each source object
|
||||
for (var a = 0, b = sources; a < b.length; a++) {
|
||||
var source = b[a];
|
||||
|
||||
// Iterate over each `innerArray` element once per `outerArray` element and execute
|
||||
// `tester` with both. If `tester` returns a non-falsy value, exit early and return
|
||||
// that value.
|
||||
var findFirstPassingTechSourcePair = function findFirstPassingTechSourcePair(outerArray, innerArray, tester) {
|
||||
var found = undefined;
|
||||
|
||||
outerArray.some(function (outerChoice) {
|
||||
return innerArray.some(function (innerChoice) {
|
||||
found = tester(outerChoice, innerChoice);
|
||||
|
||||
if (found) {
|
||||
return true;
|
||||
// Check if source can be played with this technology
|
||||
if (tech.canPlaySource(source)) {
|
||||
return { source: source, tech: techName };
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
return found;
|
||||
};
|
||||
|
||||
var foundSourceAndTech = undefined;
|
||||
var flip = function flip(fn) {
|
||||
return function (a, b) {
|
||||
return fn(b, a);
|
||||
};
|
||||
};
|
||||
var finder = function finder(_ref2, source) {
|
||||
var techName = _ref2[0];
|
||||
var tech = _ref2[1];
|
||||
|
||||
if (tech.canPlaySource(source)) {
|
||||
return { source: source, tech: techName };
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Depending on the truthiness of `options.sourceOrder`, we swap the order of techs and sources
|
||||
// to select from them based on their priority.
|
||||
if (this.options_.sourceOrder) {
|
||||
// Source-first ordering
|
||||
foundSourceAndTech = findFirstPassingTechSourcePair(sources, techs, flip(finder));
|
||||
} else {
|
||||
// Tech-first ordering
|
||||
foundSourceAndTech = findFirstPassingTechSourcePair(techs, sources, finder);
|
||||
}
|
||||
|
||||
return foundSourceAndTech || false;
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -11216,7 +11136,6 @@ var Player = (function (_Component) {
|
||||
if (err === null) {
|
||||
this.error_ = err;
|
||||
this.removeClass('vjs-error');
|
||||
this.errorDisplay.close();
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -11227,6 +11146,9 @@ var Player = (function (_Component) {
|
||||
this.error_ = new _mediaErrorJs2['default'](err);
|
||||
}
|
||||
|
||||
// fire an error event on the player
|
||||
this.trigger('error');
|
||||
|
||||
// add the vjs-error classname to the player
|
||||
this.addClass('vjs-error');
|
||||
|
||||
@@ -11234,9 +11156,6 @@ var Player = (function (_Component) {
|
||||
// ie8 just logs "[object object]" if you just log the error object
|
||||
_utilsLogJs2['default'].error('(CODE:' + this.error_.code + ' ' + _mediaErrorJs2['default'].errorTypes[this.error_.code] + ')', this.error_.message, this.error_);
|
||||
|
||||
// fire an error event on the player
|
||||
this.trigger('error');
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
@@ -14915,8 +14834,6 @@ var Tech = (function (_Component) {
|
||||
*/
|
||||
|
||||
Tech.prototype.emulateTextTracks = function emulateTextTracks() {
|
||||
var _this = this;
|
||||
|
||||
var tracks = this.textTracks();
|
||||
if (!tracks) {
|
||||
return;
|
||||
@@ -14929,10 +14846,13 @@ var Tech = (function (_Component) {
|
||||
_globalWindow2['default']['WebVTT'] = true;
|
||||
}
|
||||
|
||||
var updateDisplay = function updateDisplay() {
|
||||
return _this.trigger('texttrackchange');
|
||||
};
|
||||
var textTracksChanges = function textTracksChanges() {
|
||||
var textTracksChanges = Fn.bind(this, function () {
|
||||
var _this = this;
|
||||
|
||||
var updateDisplay = function updateDisplay() {
|
||||
return _this.trigger('texttrackchange');
|
||||
};
|
||||
|
||||
updateDisplay();
|
||||
|
||||
for (var i = 0; i < tracks.length; i++) {
|
||||
@@ -14942,9 +14862,8 @@ var Tech = (function (_Component) {
|
||||
track.addEventListener('cuechange', updateDisplay);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
textTracksChanges();
|
||||
tracks.addEventListener('change', textTracksChanges);
|
||||
|
||||
this.on('dispose', function () {
|
||||
@@ -17997,7 +17916,6 @@ exports.__esModule = true;
|
||||
function formatTime(seconds) {
|
||||
var guide = arguments.length <= 1 || arguments[1] === undefined ? seconds : arguments[1];
|
||||
return (function () {
|
||||
seconds = seconds < 0 ? 0 : seconds;
|
||||
var s = Math.floor(seconds % 60);
|
||||
var m = Math.floor(seconds / 60 % 60);
|
||||
var h = Math.floor(seconds / 3600);
|
||||
@@ -18669,7 +18587,7 @@ setup.autoSetupTimeout(1, videojs);
|
||||
*
|
||||
* @type {String}
|
||||
*/
|
||||
videojs.VERSION = '5.3.0';
|
||||
videojs.VERSION = '5.2.2';
|
||||
|
||||
/**
|
||||
* The global options object. These are the settings that take effect
|
||||
|
||||
externo
+8
-8
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
externo
+1
-1
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
Arquivo binário não exibido.
externo
+2
-3
@@ -499,7 +499,7 @@ about what's required to play video. */
|
||||
/* Same as ul background */ }
|
||||
|
||||
/* Button Pop-up Menu */
|
||||
.vjs-menu-button-popup .vjs-menu .vjs-menu-content {
|
||||
.vjs-menu-button-popup .vjs-menu ul {
|
||||
background-color: #2B333F;
|
||||
background-color: rgba(43, 51, 63, 0.7);
|
||||
position: absolute;
|
||||
@@ -911,8 +911,7 @@ width and height to zero. */
|
||||
border-top-color: transparent; }
|
||||
|
||||
.vjs-menu-button-popup.vjs-volume-menu-button-vertical .vjs-menu {
|
||||
left: 0.5em;
|
||||
height: 8em; }
|
||||
left: 0.5em; }
|
||||
|
||||
.vjs-menu-button-popup.vjs-volume-menu-button-horizontal .vjs-menu {
|
||||
left: -2em; }
|
||||
|
||||
externo
+1
-1
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
externo
+46
-128
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @license
|
||||
* Video.js 5.3.0 <http://videojs.com/>
|
||||
* Video.js 5.2.2 <http://videojs.com/>
|
||||
* Copyright Brightcove, Inc. <https://www.brightcove.com/>
|
||||
* Available under Apache License Version 2.0
|
||||
* <https://github.com/videojs/video.js/blob/master/LICENSE>
|
||||
@@ -1786,14 +1786,8 @@ module.exports = function hasSymbols() {
|
||||
var obj = {};
|
||||
var sym = Symbol('test');
|
||||
if (typeof sym === 'string') { return false; }
|
||||
|
||||
// temp disabled per https://github.com/ljharb/object.assign/issues/17
|
||||
// if (sym instanceof Symbol) { return false; }
|
||||
// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
|
||||
// if (!(Object(sym) instanceof Symbol)) { return false; }
|
||||
|
||||
var symVal = 42;
|
||||
obj[sym] = symVal;
|
||||
if (sym instanceof Symbol) { return false; }
|
||||
obj[sym] = 42;
|
||||
for (sym in obj) { return false; }
|
||||
if (keys(obj).length !== 0) { return false; }
|
||||
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
|
||||
@@ -1807,7 +1801,7 @@ module.exports = function hasSymbols() {
|
||||
|
||||
if (typeof Object.getOwnPropertyDescriptor === 'function') {
|
||||
var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
|
||||
if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
|
||||
if (descriptor.value !== 42 || descriptor.enumerable !== true) { return false; }
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -1830,25 +1824,20 @@ var propIsEnumerable = bind.call(Function.call, Object.prototype.propertyIsEnume
|
||||
module.exports = function assign(target, source1) {
|
||||
if (!canBeObject(target)) { throw new TypeError('target must be an object'); }
|
||||
var objTarget = toObject(target);
|
||||
var s, source, i, props, syms, value, key;
|
||||
var s, source, i, props, syms;
|
||||
for (s = 1; s < arguments.length; ++s) {
|
||||
source = toObject(arguments[s]);
|
||||
props = keys(source);
|
||||
if (hasSymbols && Object.getOwnPropertySymbols) {
|
||||
syms = Object.getOwnPropertySymbols(source);
|
||||
for (i = 0; i < syms.length; ++i) {
|
||||
key = syms[i];
|
||||
if (propIsEnumerable(source, key)) {
|
||||
push(props, key);
|
||||
if (propIsEnumerable(source, syms[i])) {
|
||||
push(props, syms[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (i = 0; i < props.length; ++i) {
|
||||
key = props[i];
|
||||
value = source[key];
|
||||
if (propIsEnumerable(source, key)) {
|
||||
objTarget[key] = value;
|
||||
}
|
||||
objTarget[props[i]] = source[props[i]];
|
||||
}
|
||||
}
|
||||
return objTarget;
|
||||
@@ -2157,26 +2146,6 @@ module.exports = function isArguments(value) {
|
||||
|
||||
var implementation = _dereq_('./implementation');
|
||||
|
||||
var lacksProperEnumerationOrder = function () {
|
||||
if (!Object.assign) {
|
||||
return false;
|
||||
}
|
||||
// v8, specifically in node 4.x, has a bug with incorrect property enumeration order
|
||||
// note: this does not detect the bug unless there's 20 characters
|
||||
var str = 'abcdefghijklmnopqrst';
|
||||
var letters = str.split('');
|
||||
var map = {};
|
||||
for (var i = 0; i < letters.length; ++i) {
|
||||
map[letters[i]] = letters[i];
|
||||
}
|
||||
var obj = Object.assign({}, map);
|
||||
var actual = '';
|
||||
for (var k in obj) {
|
||||
actual += k;
|
||||
}
|
||||
return str !== actual;
|
||||
};
|
||||
|
||||
var assignHasPendingExceptions = function () {
|
||||
if (!Object.assign || !Object.preventExtensions) {
|
||||
return false;
|
||||
@@ -2192,16 +2161,7 @@ var assignHasPendingExceptions = function () {
|
||||
};
|
||||
|
||||
module.exports = function getPolyfill() {
|
||||
if (!Object.assign) {
|
||||
return implementation;
|
||||
}
|
||||
if (lacksProperEnumerationOrder()) {
|
||||
return implementation;
|
||||
}
|
||||
if (assignHasPendingExceptions()) {
|
||||
return implementation;
|
||||
}
|
||||
return Object.assign;
|
||||
return !Object.assign || assignHasPendingExceptions() ? implementation : Object.assign;
|
||||
};
|
||||
|
||||
},{"./implementation":44}],52:[function(_dereq_,module,exports){
|
||||
@@ -2212,11 +2172,9 @@ var getPolyfill = _dereq_('./polyfill');
|
||||
|
||||
module.exports = function shimAssign() {
|
||||
var polyfill = getPolyfill();
|
||||
define(
|
||||
Object,
|
||||
{ assign: polyfill },
|
||||
{ assign: function () { return Object.assign !== polyfill; } }
|
||||
);
|
||||
if (Object.assign !== polyfill) {
|
||||
define(Object, { assign: polyfill });
|
||||
}
|
||||
return polyfill;
|
||||
};
|
||||
|
||||
@@ -10754,9 +10712,7 @@ var Player = (function (_Component) {
|
||||
};
|
||||
|
||||
/**
|
||||
* Select source based on tech-order or source-order
|
||||
* Uses source-order selection if `options.sourceOrder` is truthy. Otherwise,
|
||||
* defaults to tech-order selection
|
||||
* Select source based on tech order
|
||||
*
|
||||
* @param {Array} sources The sources for a media asset
|
||||
* @return {Object|Boolean} Object of source and tech order, otherwise false
|
||||
@@ -10764,72 +10720,36 @@ var Player = (function (_Component) {
|
||||
*/
|
||||
|
||||
Player.prototype.selectSource = function selectSource(sources) {
|
||||
// Get only the techs specified in `techOrder` that exist and are supported by the
|
||||
// current platform
|
||||
var techs = this.options_.techOrder.map(_utilsToTitleCaseJs2['default']).map(function (techName) {
|
||||
// `Component.getComponent(...)` is for support of old behavior of techs
|
||||
// being registered as components.
|
||||
// Loop through each playback technology in the options order
|
||||
for (var i = 0, j = this.options_.techOrder; i < j.length; i++) {
|
||||
var techName = _utilsToTitleCaseJs2['default'](j[i]);
|
||||
var tech = _techTechJs2['default'].getTech(techName);
|
||||
// Support old behavior of techs being registered as components.
|
||||
// Remove once that deprecated behavior is removed.
|
||||
return [techName, _techTechJs2['default'].getTech(techName) || _componentJs2['default'].getComponent(techName)];
|
||||
}).filter(function (_ref) {
|
||||
var techName = _ref[0];
|
||||
var tech = _ref[1];
|
||||
|
||||
if (!tech) {
|
||||
tech = _componentJs2['default'].getComponent(techName);
|
||||
}
|
||||
// Check if the current tech is defined before continuing
|
||||
if (tech) {
|
||||
// Check if the browser supports this technology
|
||||
return tech.isSupported();
|
||||
if (!tech) {
|
||||
_utilsLogJs2['default'].error('The "' + techName + '" tech is undefined. Skipped browser support check for that tech.');
|
||||
continue;
|
||||
}
|
||||
|
||||
_utilsLogJs2['default'].error('The "' + techName + '" tech is undefined. Skipped browser support check for that tech.');
|
||||
return false;
|
||||
});
|
||||
// Check if the browser supports this technology
|
||||
if (tech.isSupported()) {
|
||||
// Loop through each source object
|
||||
for (var a = 0, b = sources; a < b.length; a++) {
|
||||
var source = b[a];
|
||||
|
||||
// Iterate over each `innerArray` element once per `outerArray` element and execute
|
||||
// `tester` with both. If `tester` returns a non-falsy value, exit early and return
|
||||
// that value.
|
||||
var findFirstPassingTechSourcePair = function findFirstPassingTechSourcePair(outerArray, innerArray, tester) {
|
||||
var found = undefined;
|
||||
|
||||
outerArray.some(function (outerChoice) {
|
||||
return innerArray.some(function (innerChoice) {
|
||||
found = tester(outerChoice, innerChoice);
|
||||
|
||||
if (found) {
|
||||
return true;
|
||||
// Check if source can be played with this technology
|
||||
if (tech.canPlaySource(source)) {
|
||||
return { source: source, tech: techName };
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
return found;
|
||||
};
|
||||
|
||||
var foundSourceAndTech = undefined;
|
||||
var flip = function flip(fn) {
|
||||
return function (a, b) {
|
||||
return fn(b, a);
|
||||
};
|
||||
};
|
||||
var finder = function finder(_ref2, source) {
|
||||
var techName = _ref2[0];
|
||||
var tech = _ref2[1];
|
||||
|
||||
if (tech.canPlaySource(source)) {
|
||||
return { source: source, tech: techName };
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Depending on the truthiness of `options.sourceOrder`, we swap the order of techs and sources
|
||||
// to select from them based on their priority.
|
||||
if (this.options_.sourceOrder) {
|
||||
// Source-first ordering
|
||||
foundSourceAndTech = findFirstPassingTechSourcePair(sources, techs, flip(finder));
|
||||
} else {
|
||||
// Tech-first ordering
|
||||
foundSourceAndTech = findFirstPassingTechSourcePair(techs, sources, finder);
|
||||
}
|
||||
|
||||
return foundSourceAndTech || false;
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -11220,7 +11140,6 @@ var Player = (function (_Component) {
|
||||
if (err === null) {
|
||||
this.error_ = err;
|
||||
this.removeClass('vjs-error');
|
||||
this.errorDisplay.close();
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -11231,6 +11150,9 @@ var Player = (function (_Component) {
|
||||
this.error_ = new _mediaErrorJs2['default'](err);
|
||||
}
|
||||
|
||||
// fire an error event on the player
|
||||
this.trigger('error');
|
||||
|
||||
// add the vjs-error classname to the player
|
||||
this.addClass('vjs-error');
|
||||
|
||||
@@ -11238,9 +11160,6 @@ var Player = (function (_Component) {
|
||||
// ie8 just logs "[object object]" if you just log the error object
|
||||
_utilsLogJs2['default'].error('(CODE:' + this.error_.code + ' ' + _mediaErrorJs2['default'].errorTypes[this.error_.code] + ')', this.error_.message, this.error_);
|
||||
|
||||
// fire an error event on the player
|
||||
this.trigger('error');
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
@@ -14919,8 +14838,6 @@ var Tech = (function (_Component) {
|
||||
*/
|
||||
|
||||
Tech.prototype.emulateTextTracks = function emulateTextTracks() {
|
||||
var _this = this;
|
||||
|
||||
var tracks = this.textTracks();
|
||||
if (!tracks) {
|
||||
return;
|
||||
@@ -14933,10 +14850,13 @@ var Tech = (function (_Component) {
|
||||
_globalWindow2['default']['WebVTT'] = true;
|
||||
}
|
||||
|
||||
var updateDisplay = function updateDisplay() {
|
||||
return _this.trigger('texttrackchange');
|
||||
};
|
||||
var textTracksChanges = function textTracksChanges() {
|
||||
var textTracksChanges = Fn.bind(this, function () {
|
||||
var _this = this;
|
||||
|
||||
var updateDisplay = function updateDisplay() {
|
||||
return _this.trigger('texttrackchange');
|
||||
};
|
||||
|
||||
updateDisplay();
|
||||
|
||||
for (var i = 0; i < tracks.length; i++) {
|
||||
@@ -14946,9 +14866,8 @@ var Tech = (function (_Component) {
|
||||
track.addEventListener('cuechange', updateDisplay);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
textTracksChanges();
|
||||
tracks.addEventListener('change', textTracksChanges);
|
||||
|
||||
this.on('dispose', function () {
|
||||
@@ -18001,7 +17920,6 @@ exports.__esModule = true;
|
||||
function formatTime(seconds) {
|
||||
var guide = arguments.length <= 1 || arguments[1] === undefined ? seconds : arguments[1];
|
||||
return (function () {
|
||||
seconds = seconds < 0 ? 0 : seconds;
|
||||
var s = Math.floor(seconds % 60);
|
||||
var m = Math.floor(seconds / 60 % 60);
|
||||
var h = Math.floor(seconds / 3600);
|
||||
@@ -18673,7 +18591,7 @@ setup.autoSetupTimeout(1, videojs);
|
||||
*
|
||||
* @type {String}
|
||||
*/
|
||||
videojs.VERSION = '5.3.0';
|
||||
videojs.VERSION = '5.2.2';
|
||||
|
||||
/**
|
||||
* The global options object. These are the settings that take effect
|
||||
|
||||
externo
+8
-8
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
externo
+8
-8
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
externo
+1
-1
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
@@ -49,40 +49,6 @@ When adding additional Tech to a video player, make sure to add the supported te
|
||||
techOrder: ["html5", "flash", "other supported tech"]
|
||||
});
|
||||
|
||||
Technology Ordering
|
||||
==================
|
||||
By default Video.js performs "Tech-first" ordering when it searches for a source/tech combination to play videos. This means that if you have two sources and two techs, video.js will try to play each video with the first tech in the `techOrder` option property before moving on to try the next playback technology.
|
||||
|
||||
Tech-first ordering can present a problem if you have a `sourceHandler` that supports both `Html5` and `Flash` techs such as videojs-contrib-hls.
|
||||
|
||||
For example, given the following video element:
|
||||
|
||||
<video data-setup='{"techOrder": ["html5", "flash"]}'>
|
||||
<source src="http://your.static.provider.net/path/to/video.m3u8" type="application/x-mpegURL">
|
||||
<source src="http://your.static.provider.net/path/to/video.mp4" type="video/mp4">
|
||||
</video>
|
||||
|
||||
There is a good chance that the mp4 source will be selected on platforms that do not have media source extensions. Video.js will try all sources against the first playback technology, in this case `Html5`, and select the first source that can play - in this case MP4.
|
||||
|
||||
In "Tech-first" mode, the tests run something like this:
|
||||
Can video.m3u8 play with Html5? No...
|
||||
Can video.mp4 play with Html5? Yes! Use the second source.
|
||||
|
||||
Video.js now provides another method of selecting the source - "Source-first" ordering. In this mode, Video.js tries the first source against every tech in `techOrder` before moving onto the next source.
|
||||
|
||||
With a player setup as follows:
|
||||
|
||||
<video data-setup='{"techOrder": ["html5", "flash"], "sourceOrder": true}'>
|
||||
<source src="http://your.static.provider.net/path/to/video.m3u8" type="application/x-mpegURL">
|
||||
<source src="http://your.static.provider.net/path/to/video.mp4" type="video/mp4">
|
||||
</video>
|
||||
|
||||
The Flash-based HLS support will be tried before falling back to the MP4 source.
|
||||
|
||||
In "Source-first" mode, the tests run something like this:
|
||||
Can video.m3u8 play with Html5? No...
|
||||
Can video.m3u8 play with Flash? Yes! Use the first source.
|
||||
|
||||
Flash Technology
|
||||
==================
|
||||
The Flash playback tech is a part of the default `techOrder`. You may notice undesirable playback behavior in browsers that are subject to using this playback tech, in particular when scrubbing and seeking within a video. This behavior is a result of Flash's progressive video playback.
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "video.js",
|
||||
"description": "An HTML5 and Flash video player with a common API and skin for both.",
|
||||
"version": "5.3.0",
|
||||
"version": "5.2.2",
|
||||
"copyright": "Copyright Brightcove, Inc. <https://www.brightcove.com/>",
|
||||
"license": "Apache-2.0",
|
||||
"keywords": [
|
||||
|
||||
@@ -96,7 +96,6 @@ width and height to zero. */
|
||||
|
||||
.vjs-menu-button-popup.vjs-volume-menu-button-vertical .vjs-menu {
|
||||
left: 0.5em;
|
||||
height: 8em;
|
||||
}
|
||||
.vjs-menu-button-popup.vjs-volume-menu-button-horizontal .vjs-menu {
|
||||
left: -2em;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
}
|
||||
|
||||
/* Button Pop-up Menu */
|
||||
.vjs-menu-button-popup .vjs-menu .vjs-menu-content {
|
||||
.vjs-menu-button-popup .vjs-menu ul {
|
||||
@include background-color-with-alpha($primary-background-color, $primary-background-transparency);
|
||||
|
||||
position: absolute;
|
||||
|
||||
+30
-63
@@ -1693,75 +1693,43 @@ class Player extends Component {
|
||||
}
|
||||
|
||||
/**
|
||||
* Select source based on tech-order or source-order
|
||||
* Uses source-order selection if `options.sourceOrder` is truthy. Otherwise,
|
||||
* defaults to tech-order selection
|
||||
* Select source based on tech order
|
||||
*
|
||||
* @param {Array} sources The sources for a media asset
|
||||
* @return {Object|Boolean} Object of source and tech order, otherwise false
|
||||
* @method selectSource
|
||||
*/
|
||||
selectSource(sources) {
|
||||
// Get only the techs specified in `techOrder` that exist and are supported by the
|
||||
// current platform
|
||||
let techs =
|
||||
this.options_.techOrder
|
||||
.map(toTitleCase)
|
||||
.map((techName) => {
|
||||
// `Component.getComponent(...)` is for support of old behavior of techs
|
||||
// being registered as components.
|
||||
// Remove once that deprecated behavior is removed.
|
||||
return [techName, Tech.getTech(techName) || Component.getComponent(techName)];
|
||||
})
|
||||
.filter(([techName, tech]) => {
|
||||
// Check if the current tech is defined before continuing
|
||||
if (tech) {
|
||||
// Check if the browser supports this technology
|
||||
return tech.isSupported();
|
||||
}
|
||||
|
||||
log.error(`The "${techName}" tech is undefined. Skipped browser support check for that tech.`);
|
||||
return false;
|
||||
});
|
||||
|
||||
// Iterate over each `innerArray` element once per `outerArray` element and execute
|
||||
// `tester` with both. If `tester` returns a non-falsy value, exit early and return
|
||||
// that value.
|
||||
let findFirstPassingTechSourcePair = function (outerArray, innerArray, tester) {
|
||||
let found;
|
||||
|
||||
outerArray.some((outerChoice) => {
|
||||
return innerArray.some((innerChoice) => {
|
||||
found = tester(outerChoice, innerChoice);
|
||||
|
||||
if (found) {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
return found;
|
||||
};
|
||||
|
||||
let foundSourceAndTech;
|
||||
let flip = (fn) => (a, b) => fn(b, a);
|
||||
let finder = ([techName, tech], source) => {
|
||||
if (tech.canPlaySource(source)) {
|
||||
return {source: source, tech: techName};
|
||||
// Loop through each playback technology in the options order
|
||||
for (var i=0,j=this.options_.techOrder;i<j.length;i++) {
|
||||
let techName = toTitleCase(j[i]);
|
||||
let tech = Tech.getTech(techName);
|
||||
// Support old behavior of techs being registered as components.
|
||||
// Remove once that deprecated behavior is removed.
|
||||
if (!tech) {
|
||||
tech = Component.getComponent(techName);
|
||||
}
|
||||
// Check if the current tech is defined before continuing
|
||||
if (!tech) {
|
||||
log.error(`The "${techName}" tech is undefined. Skipped browser support check for that tech.`);
|
||||
continue;
|
||||
}
|
||||
};
|
||||
|
||||
// Depending on the truthiness of `options.sourceOrder`, we swap the order of techs and sources
|
||||
// to select from them based on their priority.
|
||||
if (this.options_.sourceOrder) {
|
||||
// Source-first ordering
|
||||
foundSourceAndTech = findFirstPassingTechSourcePair(sources, techs, flip(finder));
|
||||
} else {
|
||||
// Tech-first ordering
|
||||
foundSourceAndTech = findFirstPassingTechSourcePair(techs, sources, finder);
|
||||
// Check if the browser supports this technology
|
||||
if (tech.isSupported()) {
|
||||
// Loop through each source object
|
||||
for (var a=0,b=sources;a<b.length;a++) {
|
||||
var source = b[a];
|
||||
|
||||
// Check if source can be played with this technology
|
||||
if (tech.canPlaySource(source)) {
|
||||
return { source: source, tech: techName };
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return foundSourceAndTech || false;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2139,7 +2107,6 @@ class Player extends Component {
|
||||
if (err === null) {
|
||||
this.error_ = err;
|
||||
this.removeClass('vjs-error');
|
||||
this.errorDisplay.close();
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -2150,6 +2117,9 @@ class Player extends Component {
|
||||
this.error_ = new MediaError(err);
|
||||
}
|
||||
|
||||
// fire an error event on the player
|
||||
this.trigger('error');
|
||||
|
||||
// add the vjs-error classname to the player
|
||||
this.addClass('vjs-error');
|
||||
|
||||
@@ -2157,9 +2127,6 @@ class Player extends Component {
|
||||
// ie8 just logs "[object object]" if you just log the error object
|
||||
log.error(`(CODE:${this.error_.code} ${MediaError.errorTypes[this.error_.code]})`, this.error_.message, this.error_);
|
||||
|
||||
// fire an error event on the player
|
||||
this.trigger('error');
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -321,8 +321,9 @@ class Tech extends Component {
|
||||
window['WebVTT'] = true;
|
||||
}
|
||||
|
||||
let updateDisplay = () => this.trigger('texttrackchange');
|
||||
let textTracksChanges = () => {
|
||||
let textTracksChanges = Fn.bind(this, function() {
|
||||
let updateDisplay = () => this.trigger('texttrackchange');
|
||||
|
||||
updateDisplay();
|
||||
|
||||
for (let i = 0; i < tracks.length; i++) {
|
||||
@@ -332,9 +333,8 @@ class Tech extends Component {
|
||||
track.addEventListener('cuechange', updateDisplay);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
textTracksChanges();
|
||||
tracks.addEventListener('change', textTracksChanges);
|
||||
|
||||
this.on('dispose', function() {
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
* @function formatTime
|
||||
*/
|
||||
function formatTime(seconds, guide=seconds) {
|
||||
seconds = seconds < 0 ? 0 : seconds;
|
||||
let s = Math.floor(seconds % 60);
|
||||
let m = Math.floor(seconds / 60 % 60);
|
||||
let h = Math.floor(seconds / 3600);
|
||||
|
||||
+64
-51
@@ -7,8 +7,6 @@ import MediaError from '../../src/js/media-error.js';
|
||||
import Html5 from '../../src/js/tech/html5.js';
|
||||
import TestHelpers from './test-helpers.js';
|
||||
import document from 'global/document';
|
||||
import Tech from '../../src/js/tech/tech.js';
|
||||
import TechFaker from './tech/tech-faker.js';
|
||||
|
||||
q.module('Player', {
|
||||
'setup': function() {
|
||||
@@ -19,6 +17,36 @@ q.module('Player', {
|
||||
}
|
||||
});
|
||||
|
||||
// Compiler doesn't like using 'this' in setup/teardown.
|
||||
// module("Player", {
|
||||
// /**
|
||||
// * @this {*}
|
||||
// */
|
||||
// setup: function(){
|
||||
// window.player1 = true; // using window works
|
||||
// },
|
||||
|
||||
// /**
|
||||
// * @this {*}
|
||||
// */
|
||||
// teardown: function(){
|
||||
// // if (this.player && this.player.el() !== null) {
|
||||
// // this.player.dispose();
|
||||
// // this.player = null;
|
||||
// // }
|
||||
// }
|
||||
// });
|
||||
|
||||
// Object.size = function(obj) {
|
||||
// var size = 0, key;
|
||||
// for (key in obj) {
|
||||
// console.log('key', key)
|
||||
// if (obj.hasOwnProperty(key)) size++;
|
||||
// }
|
||||
// return size;
|
||||
// };
|
||||
|
||||
|
||||
test('should create player instance that inherits from component and dispose it', function(){
|
||||
var player = TestHelpers.makePlayer();
|
||||
|
||||
@@ -311,6 +339,24 @@ test('should set controls and trigger events', function() {
|
||||
player.dispose();
|
||||
});
|
||||
|
||||
// Can't figure out how to test fullscreen events with tests
|
||||
// Browsers aren't triggering the events at least
|
||||
// asyncTest('should trigger the fullscreenchange event', function() {
|
||||
// expect(3);
|
||||
|
||||
// var player = TestHelpers.makePlayer();
|
||||
// player.on('fullscreenchange', function(){
|
||||
// ok(true, 'fullscreenchange event fired');
|
||||
// ok(this.isFullscreen() === true, 'isFullscreen is true');
|
||||
// ok(this.el().className.indexOf('vjs-fullscreen') !== -1, 'vjs-fullscreen class added');
|
||||
|
||||
// player.dispose();
|
||||
// start();
|
||||
// });
|
||||
|
||||
// player.requestFullscreen();
|
||||
// });
|
||||
|
||||
test('should toggle user the user state between active and inactive', function(){
|
||||
var player = TestHelpers.makePlayer({});
|
||||
|
||||
@@ -410,42 +456,27 @@ test('make sure that controls listeners do not get added too many times', functi
|
||||
player.dispose();
|
||||
});
|
||||
|
||||
test('should select the proper tech based on the the sourceOrder option',
|
||||
function() {
|
||||
let fixture = document.getElementById('qunit-fixture');
|
||||
let html =
|
||||
'<video id="example_1">' +
|
||||
'<source src="fake.foo1" type="video/unsupported-format">' +
|
||||
'<source src="fake.foo2" type="video/foo-format">' +
|
||||
'</video>';
|
||||
// test('should use custom message when encountering an unsupported video type',
|
||||
// function() {
|
||||
// videojs.options['notSupportedMessage'] = 'Video no go <a href="">link</a>';
|
||||
// var fixture = document.getElementById('qunit-fixture');
|
||||
|
||||
// Extend TechFaker to create a tech that plays the only mime-type that TechFaker
|
||||
// will not play
|
||||
class PlaysUnsupported extends TechFaker {
|
||||
constructor(options, handleReady){
|
||||
super(options, handleReady);
|
||||
}
|
||||
// Support ONLY "video/unsupported-format"
|
||||
static isSupported() { return true; }
|
||||
static canPlayType(type) { return (type === 'video/unsupported-format' ? 'maybe' : ''); }
|
||||
static canPlaySource(srcObj) { return srcObj.type === 'video/unsupported-format'; }
|
||||
}
|
||||
Tech.registerTech('PlaysUnsupported', PlaysUnsupported);
|
||||
// var html =
|
||||
// '<video id="example_1">' +
|
||||
// '<source src="fake.foo" type="video/foo">' +
|
||||
// '</video>';
|
||||
|
||||
fixture.innerHTML += html;
|
||||
let tag = document.getElementById('example_1');
|
||||
// fixture.innerHTML += html;
|
||||
|
||||
let player = new Player(tag, { techOrder: ['techFaker', 'playsUnsupported'], sourceOrder: true });
|
||||
equal(player.techName_, 'PlaysUnsupported', 'selected the PlaysUnsupported tech when sourceOrder is truthy');
|
||||
player.dispose();
|
||||
// var tag = document.getElementById('example_1');
|
||||
// var player = new Player(tag, { techOrder: ['techFaker'] });
|
||||
|
||||
fixture.innerHTML += html;
|
||||
tag = document.getElementById('example_1');
|
||||
// var incompatibilityMessage = player.el().getElementsByTagName('p')[0];
|
||||
// // ie8 capitalizes tag names
|
||||
// equal(incompatibilityMessage.innerHTML.toLowerCase(), 'video no go <a href="">link</a>');
|
||||
|
||||
player = new Player(tag, { techOrder: ['techFaker', 'playsUnsupported']});
|
||||
equal(player.techName_, 'TechFaker', 'selected the TechFaker tech when sourceOrder is falsey');
|
||||
player.dispose();
|
||||
});
|
||||
// player.dispose();
|
||||
// });
|
||||
|
||||
test('should register players with generated ids', function(){
|
||||
var fixture, video, player, id;
|
||||
@@ -843,21 +874,3 @@ test('createModal() options object', function() {
|
||||
strictEqual(modal.options_.label, 'boo', 'modal options are set properly');
|
||||
modal.close();
|
||||
});
|
||||
|
||||
test('you can clear error in the error event', function() {
|
||||
let player = TestHelpers.makePlayer();
|
||||
|
||||
sinon.stub(log, 'error');
|
||||
|
||||
player.error({code: 4});
|
||||
ok(player.error(), 'we have an error');
|
||||
player.error(null);
|
||||
|
||||
player.one('error', function() {
|
||||
player.error(null);
|
||||
});
|
||||
player.error({code: 4});
|
||||
ok(!player.error(), 'we no longer have an error');
|
||||
|
||||
log.error.restore();
|
||||
});
|
||||
|
||||
@@ -2,7 +2,6 @@ import ChaptersButton from '../../../src/js/control-bar/text-track-controls/chap
|
||||
import SubtitlesButton from '../../../src/js/control-bar/text-track-controls/subtitles-button.js';
|
||||
import CaptionsButton from '../../../src/js/control-bar/text-track-controls/captions-button.js';
|
||||
|
||||
import TextTrack from '../../../src/js/tracks/text-track.js';
|
||||
import TextTrackDisplay from '../../../src/js/tracks/text-track-display.js';
|
||||
import Html5 from '../../../src/js/tech/html5.js';
|
||||
import Flash from '../../../src/js/tech/flash.js';
|
||||
@@ -343,58 +342,3 @@ if (Html5.supportsNativeTextTracks()) {
|
||||
emulatedTt.on('addtrack', addtrack);
|
||||
});
|
||||
}
|
||||
|
||||
test('should check for text track changes when emulating text tracks', function() {
|
||||
let tech = new Tech();
|
||||
let numTextTrackChanges = 0;
|
||||
tech.on('texttrackchange', function() {
|
||||
numTextTrackChanges++;
|
||||
});
|
||||
tech.emulateTextTracks();
|
||||
equal(numTextTrackChanges, 1, 'we got a texttrackchange event');
|
||||
});
|
||||
|
||||
test('removes cuechange event when text track is hidden for emulated tracks', function() {
|
||||
let player = TestHelpers.makePlayer();
|
||||
let tt = new TextTrack({
|
||||
tech: player.tech_,
|
||||
mode: 'showing'
|
||||
});
|
||||
tt.addCue({
|
||||
id: '1',
|
||||
startTime: 2,
|
||||
endTime: 5
|
||||
});
|
||||
player.tech_.textTracks().addTrack_(tt);
|
||||
player.tech_.emulateTextTracks();
|
||||
|
||||
let numTextTrackChanges = 0;
|
||||
player.tech_.on('texttrackchange', function() {
|
||||
numTextTrackChanges++;
|
||||
});
|
||||
|
||||
tt.mode = 'showing';
|
||||
equal(numTextTrackChanges, 1,
|
||||
'texttrackchange should be called once for mode change');
|
||||
tt.mode = 'showing';
|
||||
equal(numTextTrackChanges, 2,
|
||||
'texttrackchange should be called once for mode change');
|
||||
|
||||
player.tech_.currentTime = function() {
|
||||
return 3;
|
||||
};
|
||||
player.tech_.trigger('timeupdate');
|
||||
equal(numTextTrackChanges, 3,
|
||||
'texttrackchange should be triggered once for the cuechange');
|
||||
|
||||
tt.mode = 'hidden';
|
||||
equal(numTextTrackChanges, 4,
|
||||
'texttrackchange should be called once for the mode change');
|
||||
|
||||
player.tech_.currentTime = function() {
|
||||
return 7;
|
||||
};
|
||||
player.tech_.trigger('timeupdate');
|
||||
equal(numTextTrackChanges, 4,
|
||||
'texttrackchange should be not be called since mode is hidden');
|
||||
});
|
||||
|
||||
@@ -20,10 +20,6 @@ test('should format time as a string', function(){
|
||||
// Don't do extra leading zeros for hours
|
||||
ok(formatTime(1,36000) === '0:00:01');
|
||||
ok(formatTime(1,360000) === '0:00:01');
|
||||
|
||||
// Do not display negative time
|
||||
ok(formatTime(-1) === '0:00');
|
||||
ok(formatTime(-1,3600) === '0:00:00');
|
||||
});
|
||||
|
||||
test('should format invalid times as dashes', function(){
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário