Comparar commits

..

1 Commits

Autor SHA1 Mensagem Data
Gary Katsevman 5f54b95a7a v5.11.2 dist 2016-08-09 11:24:05 -04:00
32 arquivos alterados com 514 adições e 450 exclusões
-2
Ver Arquivo
@@ -24,8 +24,6 @@
"exports",
"process",
"DOMException",
"q",
"asyncTest",
"deepEqual",
-31
Ver Arquivo
@@ -6,37 +6,6 @@ _(none)_
--------------------
## 5.11.9 (2016-10-25)
* greenkeeper updated karma dependencies ([view](https://github.com/videojs/video.js/pull/3523))
* update to latest uglify to fix preserve comments issue. Disable screw ie8 option. ([view](https://github.com/videojs/video.js/pull/3709))
* remove sourcemap generation ([view](https://github.com/videojs/video.js/pull/3710))
## 5.11.8 (2016-10-17)
* @misteroneill restore timeupdate/loadedmetadata listeners for duration display ([view](https://github.com/videojs/video.js/pull/3682))
## 5.11.7 (2016-09-28)
* @gkatsev checked throwIfWhitespace first in hasElClass ([view](https://github.com/videojs/video.js/pull/3640))
* @misteroneill pinned grunt-contrib-uglify to ~0.11 to pin uglify to ~2.6 ([view](https://github.com/videojs/video.js/pull/3634))
* @gkatsev set playerId on new el created for movingMediaElementInDOM. Fixes #3283 ([view](https://github.com/videojs/video.js/pull/3648))
## 5.11.6 (2016-08-25)
* @imbcmdth Added exception handling to event dispatcher ([view](https://github.com/videojs/video.js/pull/3580))
## 5.11.5 (2016-08-25)
* @misteroneill fixed wrapping native and emulated MediaErrors ([view](https://github.com/videojs/video.js/pull/3562))
* @snyderizer fixed switching between audio tracks. Fixes #3510 ([view](https://github.com/videojs/video.js/pull/3538))
* @jbarabander added title attribute to audio button. Fixes #3528 ([view](https://github.com/videojs/video.js/pull/3565))
* @misteroneill fixed IE8 media error test failure ([view](https://github.com/videojs/video.js/pull/3568))
## 5.11.4 (2016-08-16)
_(none)_
## 5.11.3 (2016-08-15)
* @vdeshpande fixed control text for fullscreen button ([view](https://github.com/videojs/video.js/pull/3485))
* @mister-ben fixed android treating swipe as a tap ([view](https://github.com/videojs/video.js/pull/3514))
* @mboles updated duration() method documentation ([view](https://github.com/videojs/video.js/pull/3515))
* @mister-ben silenced chrome's play() request was interrupted by pause() error ([view](https://github.com/videojs/video.js/pull/3518))
## 5.11.2 (2016-08-09)
_(none)_
+13 -1
Ver Arquivo
@@ -16,6 +16,7 @@ module.exports = function(grunt) {
const browserifyGruntDefaults = {
browserifyOptions: {
debug: true,
standalone: 'videojs'
},
plugin: [
@@ -123,8 +124,10 @@ module.exports = function(grunt) {
},
uglify: {
options: {
sourceMap: true,
sourceMapIn: 'build/temp/video.js.map',
sourceMapRoot: '../../src/js',
preserveComments: 'some',
screwIE8: false,
mangle: true,
compress: {
sequences: true,
@@ -372,6 +375,14 @@ module.exports = function(grunt) {
}
}
},
exorcise: {
build: {
options: {},
files: {
'build/temp/video.js.map': ['build/temp/video.js'],
}
}
},
coveralls: {
options: {
// warn instead of failing when coveralls errors
@@ -446,6 +457,7 @@ module.exports = function(grunt) {
'jshint',
'browserify:build',
'exorcise:build',
'concat:novtt',
'concat:vtt',
'usebanner:novtt',
+1 -1
Ver Arquivo
@@ -1,7 +1,7 @@
{
"name": "video.js",
"description": "An HTML5 and Flash video player with a common API and skin for both.",
"version": "5.11.9",
"version": "5.11.2",
"keywords": [
"videojs",
"html5",
+49 -89
Ver Arquivo
@@ -1,6 +1,6 @@
/**
* @license
* Video.js 5.11.9 <http://videojs.com/>
* Video.js 5.11.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>
@@ -25,6 +25,7 @@ if (typeof document !== 'undefined') {
}
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9nbG9iYWwvZG9jdW1lbnQuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6ImdlbmVyYXRlZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgdG9wTGV2ZWwgPSB0eXBlb2YgZ2xvYmFsICE9PSAndW5kZWZpbmVkJyA/IGdsb2JhbCA6XG4gICAgdHlwZW9mIHdpbmRvdyAhPT0gJ3VuZGVmaW5lZCcgPyB3aW5kb3cgOiB7fVxudmFyIG1pbkRvYyA9IHJlcXVpcmUoJ21pbi1kb2N1bWVudCcpO1xuXG5pZiAodHlwZW9mIGRvY3VtZW50ICE9PSAndW5kZWZpbmVkJykge1xuICAgIG1vZHVsZS5leHBvcnRzID0gZG9jdW1lbnQ7XG59IGVsc2Uge1xuICAgIHZhciBkb2NjeSA9IHRvcExldmVsWydfX0dMT0JBTF9ET0NVTUVOVF9DQUNIRUA0J107XG5cbiAgICBpZiAoIWRvY2N5KSB7XG4gICAgICAgIGRvY2N5ID0gdG9wTGV2ZWxbJ19fR0xPQkFMX0RPQ1VNRU5UX0NBQ0hFQDQnXSA9IG1pbkRvYztcbiAgICB9XG5cbiAgICBtb2R1bGUuZXhwb3J0cyA9IGRvY2N5O1xufVxuIl19
},{"min-document":3}],2:[function(_dereq_,module,exports){
(function (global){
if (typeof window !== "undefined") {
@@ -38,6 +39,7 @@ if (typeof window !== "undefined") {
}
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9nbG9iYWwvd2luZG93LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsImZpbGUiOiJnZW5lcmF0ZWQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlc0NvbnRlbnQiOlsiaWYgKHR5cGVvZiB3aW5kb3cgIT09IFwidW5kZWZpbmVkXCIpIHtcbiAgICBtb2R1bGUuZXhwb3J0cyA9IHdpbmRvdztcbn0gZWxzZSBpZiAodHlwZW9mIGdsb2JhbCAhPT0gXCJ1bmRlZmluZWRcIikge1xuICAgIG1vZHVsZS5leHBvcnRzID0gZ2xvYmFsO1xufSBlbHNlIGlmICh0eXBlb2Ygc2VsZiAhPT0gXCJ1bmRlZmluZWRcIil7XG4gICAgbW9kdWxlLmV4cG9ydHMgPSBzZWxmO1xufSBlbHNlIHtcbiAgICBtb2R1bGUuZXhwb3J0cyA9IHt9O1xufVxuIl19
},{}],3:[function(_dereq_,module,exports){
},{}],4:[function(_dereq_,module,exports){
@@ -3216,6 +3218,10 @@ var _utilsToTitleCaseJs = _dereq_('./utils/to-title-case.js');
var _utilsToTitleCaseJs2 = _interopRequireDefault(_utilsToTitleCaseJs);
var _objectAssign = _dereq_('object.assign');
var _objectAssign2 = _interopRequireDefault(_objectAssign);
var _utilsMergeOptionsJs = _dereq_('./utils/merge-options.js');
var _utilsMergeOptionsJs2 = _interopRequireDefault(_utilsMergeOptionsJs);
@@ -4440,11 +4446,8 @@ var Component = (function () {
this.on('touchstart', function (event) {
// If more than one finger, don't consider treating this as a click
if (event.touches.length === 1) {
// Copy pageX/pageY from the object
firstTouch = {
pageX: event.touches[0].pageX,
pageY: event.touches[0].pageY
};
// Copy the touches object to prevent modifying the original
firstTouch = _objectAssign2['default']({}, event.touches[0]);
// Record start time so we can detect a tap vs. "touch and hold"
touchStart = new Date().getTime();
// Reset couldBeTap tracking
@@ -4740,7 +4743,7 @@ Component.registerComponent('Component', Component);
exports['default'] = Component;
module.exports = exports['default'];
},{"./utils/dom.js":142,"./utils/events.js":143,"./utils/fn.js":144,"./utils/guid.js":146,"./utils/log.js":147,"./utils/merge-options.js":148,"./utils/to-title-case.js":151,"global/window":2}],68:[function(_dereq_,module,exports){
},{"./utils/dom.js":142,"./utils/events.js":143,"./utils/fn.js":144,"./utils/guid.js":146,"./utils/log.js":147,"./utils/merge-options.js":148,"./utils/to-title-case.js":151,"global/window":2,"object.assign":45}],68:[function(_dereq_,module,exports){
/**
* @file audio-track-button.js
*/
@@ -4839,7 +4842,6 @@ var AudioTrackButton = (function (_TrackButton) {
return AudioTrackButton;
})(_trackButtonJs2['default']);
AudioTrackButton.prototype.controlText_ = 'Audio Track';
_componentJs2['default'].registerComponent('AudioTrackButton', AudioTrackButton);
exports['default'] = AudioTrackButton;
module.exports = exports['default'];
@@ -4928,7 +4930,9 @@ var AudioTrackMenuItem = (function (_MenuItem) {
for (var i = 0; i < tracks.length; i++) {
var track = tracks[i];
track.enabled = track === this.track;
if (track === this.track) {
track.enabled = true;
}
}
};
@@ -5116,11 +5120,10 @@ var _componentJs2 = _interopRequireDefault(_componentJs);
var FullscreenToggle = (function (_Button) {
_inherits(FullscreenToggle, _Button);
function FullscreenToggle(player, options) {
function FullscreenToggle() {
_classCallCheck(this, FullscreenToggle);
_Button.call(this, player, options);
this.on(player, 'fullscreenchange', this.handleFullscreenChange);
_Button.apply(this, arguments);
}
/**
@@ -5134,20 +5137,6 @@ var FullscreenToggle = (function (_Button) {
return 'vjs-fullscreen-control ' + _Button.prototype.buildCSSClass.call(this);
};
/**
* Handles Fullscreenchange on the component and change control text accordingly
*
* @method handleFullscreenChange
*/
FullscreenToggle.prototype.handleFullscreenChange = function handleFullscreenChange() {
if (this.player_.isFullscreen()) {
this.controlText('Non-Fullscreen');
} else {
this.controlText('Fullscreen');
}
};
/**
* Handles click for full screen
*
@@ -5157,8 +5146,10 @@ var FullscreenToggle = (function (_Button) {
FullscreenToggle.prototype.handleClick = function handleClick() {
if (!this.player_.isFullscreen()) {
this.player_.requestFullscreen();
this.controlText('Non-Fullscreen');
} else {
this.player_.exitFullscreen();
this.controlText('Fullscreen');
}
};
@@ -7751,12 +7742,6 @@ var DurationDisplay = (function (_Component) {
_Component.call(this, player, options);
this.on(player, 'durationchange', this.updateContent);
// Also listen for timeupdate and loadedmetadata because removing those
// listeners could have broken dependent applications/libraries. These
// can likely be removed for 6.0.
this.on(player, 'timeupdate', this.updateContent);
this.on(player, 'loadedmetadata', this.updateContent);
}
/**
@@ -8890,45 +8875,25 @@ var _objectAssign = _dereq_('object.assign');
var _objectAssign2 = _interopRequireDefault(_objectAssign);
/*
* Custom MediaError class which mimics the standard HTML5 MediaError class.
* Custom MediaError to mimic the HTML5 MediaError
*
* @param {Number|String|Object|MediaError} value
* This can be of multiple types:
* - Number: should be a standard error code
* - String: an error message (the code will be 0)
* - Object: arbitrary properties
* - MediaError (native): used to populate a video.js MediaError object
* - MediaError (video.js): will return itself if it's already a
* video.js MediaError object.
* @param {Number} code The media error code
*/
function MediaError(value) {
// Allow redundant calls to this constructor to avoid having `instanceof`
// checks peppered around the code.
if (value instanceof MediaError) {
return value;
}
if (typeof value === 'number') {
this.code = value;
} else if (typeof value === 'string') {
var MediaError = function MediaError(code) {
if (typeof code === 'number') {
this.code = code;
} else if (typeof code === 'string') {
// default code is zero, so this is a custom error
this.message = value;
} else if (typeof value === 'object') {
// We assign the `code` property manually because native MediaError objects
// do not expose it as an own/enumerable property of the object.
if (typeof value.code === 'number') {
this.code = value.code;
}
_objectAssign2['default'](this, value);
this.message = code;
} else if (typeof code === 'object') {
// object
_objectAssign2['default'](this, code);
}
if (!this.message) {
this.message = MediaError.defaultMessages[this.code] || '';
}
}
};
/*
* The error code that refers two one of the defined
@@ -11604,8 +11569,7 @@ var Player = (function (_Component) {
};
/**
* Normally gets the length in time of the video in seconds;
* in all but the rarest use cases an argument will NOT be passed to the method
* Get the length in time of the video in seconds
* ```js
* var lengthOfVideo = myPlayer.duration();
* ```
@@ -12499,7 +12463,12 @@ var Player = (function (_Component) {
return this;
}
this.error_ = new _mediaErrorJs2['default'](err);
// error instance
if (err instanceof _mediaErrorJs2['default']) {
this.error_ = err;
} else {
this.error_ = new _mediaErrorJs2['default'](err);
}
// add the vjs-error classname to the player
this.addClass('vjs-error');
@@ -15051,8 +15020,6 @@ var Html5 = (function (_Tech) {
'class': 'vjs-tech'
}));
}
el.playerId = this.options_.playerId;
}
// Update specific tag settings, in case they were overridden
@@ -15299,13 +15266,7 @@ var Html5 = (function (_Tech) {
*/
Html5.prototype.play = function play() {
var playPromise = this.el_.play();
// Catch/silence error when a pause interrupts a play request
// on browsers which return a promise
if (playPromise !== undefined && typeof playPromise.then === 'function') {
playPromise.then(null, function (e) {});
}
this.el_.play();
};
/**
@@ -16759,7 +16720,11 @@ var Tech = (function (_Component) {
Tech.prototype.error = function error(err) {
if (err !== undefined) {
this.error_ = new _mediaErrorJs2['default'](err);
if (err instanceof _mediaErrorJs2['default']) {
this.error_ = err;
} else {
this.error_ = new _mediaErrorJs2['default'](err);
}
this.trigger('error');
}
return this.error_;
@@ -20279,10 +20244,10 @@ function removeElData(el) {
*/
function hasElClass(element, classToCheck) {
throwIfWhitespace(classToCheck);
if (element.classList) {
return element.classList.contains(classToCheck);
} else {
throwIfWhitespace(classToCheck);
return classRegExp(classToCheck).test(element.className);
}
}
@@ -20738,10 +20703,6 @@ var _guidJs = _dereq_('./guid.js');
var Guid = _interopRequireWildcard(_guidJs);
var _logJs = _dereq_('./log.js');
var _logJs2 = _interopRequireDefault(_logJs);
var _globalWindow = _dereq_('global/window');
var _globalWindow2 = _interopRequireDefault(_globalWindow);
@@ -20796,11 +20757,7 @@ function on(elem, type, fn) {
if (event.isImmediatePropagationStopped()) {
break;
} else {
try {
handlersCopy[m].call(elem, event, hash);
} catch (e) {
_logJs2['default'].error(e);
}
handlersCopy[m].call(elem, event, hash);
}
}
}
@@ -21123,7 +21080,7 @@ function _handleMultipleEvents(fn, elem, types, callback) {
});
}
},{"./dom.js":142,"./guid.js":146,"./log.js":147,"global/document":1,"global/window":2}],144:[function(_dereq_,module,exports){
},{"./dom.js":142,"./guid.js":146,"global/document":1,"global/window":2}],144:[function(_dereq_,module,exports){
/**
* @file fn.js
*/
@@ -21902,7 +21859,7 @@ setup.autoSetupTimeout(1, videojs);
*
* @type {String}
*/
videojs.VERSION = '5.11.9';
videojs.VERSION = '5.11.2';
/**
* The global options object. These are the settings that take effect
@@ -22512,4 +22469,7 @@ exports['default'] = videojs;
module.exports = exports['default'];
},{"../../src/js/utils/merge-options.js":148,"./component":67,"./event-target":104,"./extend.js":105,"./player":113,"./plugins.js":114,"./setup":118,"./tech/flash.js":121,"./tech/html5.js":122,"./tech/tech.js":124,"./tracks/audio-track.js":126,"./tracks/text-track.js":134,"./tracks/video-track.js":139,"./utils/browser.js":140,"./utils/dom.js":142,"./utils/events.js":143,"./utils/fn.js":144,"./utils/format-time.js":145,"./utils/log.js":147,"./utils/stylesheet.js":149,"./utils/time-ranges.js":150,"./utils/url.js":152,"global/document":1,"global/window":2,"lodash-compat/object/merge":40,"xhr":56}]},{},[153])(153)
});
});
//# sourceMappingURL=video.js.map
+15 -9
Ver Arquivo
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
-1
Ver Arquivo
@@ -21,7 +21,6 @@ videojs.addLanguage("en",{
"Close Modal Dialog": "Close Modal Dialog",
"Descriptions": "Descriptions",
"descriptions off": "descriptions off",
"Audio Track": "Audio Track",
"You aborted the media playback": "You aborted the media playback",
"A network error caused the media download to fail part-way.": "A network error caused the media download to fail part-way.",
"The media could not be loaded, either because the server or network failed or because the format is not supported.": "The media could not be loaded, either because the server or network failed or because the format is not supported.",
BIN
Ver Arquivo
Arquivo binário não exibido.
BIN
Ver Arquivo
Arquivo binário não exibido.
BIN
Ver Arquivo
Arquivo binário não exibido.
+48 -88
Ver Arquivo
@@ -1,6 +1,6 @@
/**
* @license
* Video.js 5.11.9 <http://videojs.com/>
* Video.js 5.11.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>
@@ -29,6 +29,7 @@ if (typeof document !== 'undefined') {
}
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9nbG9iYWwvZG9jdW1lbnQuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6ImdlbmVyYXRlZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgdG9wTGV2ZWwgPSB0eXBlb2YgZ2xvYmFsICE9PSAndW5kZWZpbmVkJyA/IGdsb2JhbCA6XG4gICAgdHlwZW9mIHdpbmRvdyAhPT0gJ3VuZGVmaW5lZCcgPyB3aW5kb3cgOiB7fVxudmFyIG1pbkRvYyA9IHJlcXVpcmUoJ21pbi1kb2N1bWVudCcpO1xuXG5pZiAodHlwZW9mIGRvY3VtZW50ICE9PSAndW5kZWZpbmVkJykge1xuICAgIG1vZHVsZS5leHBvcnRzID0gZG9jdW1lbnQ7XG59IGVsc2Uge1xuICAgIHZhciBkb2NjeSA9IHRvcExldmVsWydfX0dMT0JBTF9ET0NVTUVOVF9DQUNIRUA0J107XG5cbiAgICBpZiAoIWRvY2N5KSB7XG4gICAgICAgIGRvY2N5ID0gdG9wTGV2ZWxbJ19fR0xPQkFMX0RPQ1VNRU5UX0NBQ0hFQDQnXSA9IG1pbkRvYztcbiAgICB9XG5cbiAgICBtb2R1bGUuZXhwb3J0cyA9IGRvY2N5O1xufVxuIl19
},{"min-document":3}],2:[function(_dereq_,module,exports){
(function (global){
if (typeof window !== "undefined") {
@@ -42,6 +43,7 @@ if (typeof window !== "undefined") {
}
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9nbG9iYWwvd2luZG93LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsImZpbGUiOiJnZW5lcmF0ZWQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlc0NvbnRlbnQiOlsiaWYgKHR5cGVvZiB3aW5kb3cgIT09IFwidW5kZWZpbmVkXCIpIHtcbiAgICBtb2R1bGUuZXhwb3J0cyA9IHdpbmRvdztcbn0gZWxzZSBpZiAodHlwZW9mIGdsb2JhbCAhPT0gXCJ1bmRlZmluZWRcIikge1xuICAgIG1vZHVsZS5leHBvcnRzID0gZ2xvYmFsO1xufSBlbHNlIGlmICh0eXBlb2Ygc2VsZiAhPT0gXCJ1bmRlZmluZWRcIil7XG4gICAgbW9kdWxlLmV4cG9ydHMgPSBzZWxmO1xufSBlbHNlIHtcbiAgICBtb2R1bGUuZXhwb3J0cyA9IHt9O1xufVxuIl19
},{}],3:[function(_dereq_,module,exports){
},{}],4:[function(_dereq_,module,exports){
@@ -3220,6 +3222,10 @@ var _utilsToTitleCaseJs = _dereq_('./utils/to-title-case.js');
var _utilsToTitleCaseJs2 = _interopRequireDefault(_utilsToTitleCaseJs);
var _objectAssign = _dereq_('object.assign');
var _objectAssign2 = _interopRequireDefault(_objectAssign);
var _utilsMergeOptionsJs = _dereq_('./utils/merge-options.js');
var _utilsMergeOptionsJs2 = _interopRequireDefault(_utilsMergeOptionsJs);
@@ -4444,11 +4450,8 @@ var Component = (function () {
this.on('touchstart', function (event) {
// If more than one finger, don't consider treating this as a click
if (event.touches.length === 1) {
// Copy pageX/pageY from the object
firstTouch = {
pageX: event.touches[0].pageX,
pageY: event.touches[0].pageY
};
// Copy the touches object to prevent modifying the original
firstTouch = _objectAssign2['default']({}, event.touches[0]);
// Record start time so we can detect a tap vs. "touch and hold"
touchStart = new Date().getTime();
// Reset couldBeTap tracking
@@ -4744,7 +4747,7 @@ Component.registerComponent('Component', Component);
exports['default'] = Component;
module.exports = exports['default'];
},{"./utils/dom.js":142,"./utils/events.js":143,"./utils/fn.js":144,"./utils/guid.js":146,"./utils/log.js":147,"./utils/merge-options.js":148,"./utils/to-title-case.js":151,"global/window":2}],68:[function(_dereq_,module,exports){
},{"./utils/dom.js":142,"./utils/events.js":143,"./utils/fn.js":144,"./utils/guid.js":146,"./utils/log.js":147,"./utils/merge-options.js":148,"./utils/to-title-case.js":151,"global/window":2,"object.assign":45}],68:[function(_dereq_,module,exports){
/**
* @file audio-track-button.js
*/
@@ -4843,7 +4846,6 @@ var AudioTrackButton = (function (_TrackButton) {
return AudioTrackButton;
})(_trackButtonJs2['default']);
AudioTrackButton.prototype.controlText_ = 'Audio Track';
_componentJs2['default'].registerComponent('AudioTrackButton', AudioTrackButton);
exports['default'] = AudioTrackButton;
module.exports = exports['default'];
@@ -4932,7 +4934,9 @@ var AudioTrackMenuItem = (function (_MenuItem) {
for (var i = 0; i < tracks.length; i++) {
var track = tracks[i];
track.enabled = track === this.track;
if (track === this.track) {
track.enabled = true;
}
}
};
@@ -5120,11 +5124,10 @@ var _componentJs2 = _interopRequireDefault(_componentJs);
var FullscreenToggle = (function (_Button) {
_inherits(FullscreenToggle, _Button);
function FullscreenToggle(player, options) {
function FullscreenToggle() {
_classCallCheck(this, FullscreenToggle);
_Button.call(this, player, options);
this.on(player, 'fullscreenchange', this.handleFullscreenChange);
_Button.apply(this, arguments);
}
/**
@@ -5138,20 +5141,6 @@ var FullscreenToggle = (function (_Button) {
return 'vjs-fullscreen-control ' + _Button.prototype.buildCSSClass.call(this);
};
/**
* Handles Fullscreenchange on the component and change control text accordingly
*
* @method handleFullscreenChange
*/
FullscreenToggle.prototype.handleFullscreenChange = function handleFullscreenChange() {
if (this.player_.isFullscreen()) {
this.controlText('Non-Fullscreen');
} else {
this.controlText('Fullscreen');
}
};
/**
* Handles click for full screen
*
@@ -5161,8 +5150,10 @@ var FullscreenToggle = (function (_Button) {
FullscreenToggle.prototype.handleClick = function handleClick() {
if (!this.player_.isFullscreen()) {
this.player_.requestFullscreen();
this.controlText('Non-Fullscreen');
} else {
this.player_.exitFullscreen();
this.controlText('Fullscreen');
}
};
@@ -7755,12 +7746,6 @@ var DurationDisplay = (function (_Component) {
_Component.call(this, player, options);
this.on(player, 'durationchange', this.updateContent);
// Also listen for timeupdate and loadedmetadata because removing those
// listeners could have broken dependent applications/libraries. These
// can likely be removed for 6.0.
this.on(player, 'timeupdate', this.updateContent);
this.on(player, 'loadedmetadata', this.updateContent);
}
/**
@@ -8894,45 +8879,25 @@ var _objectAssign = _dereq_('object.assign');
var _objectAssign2 = _interopRequireDefault(_objectAssign);
/*
* Custom MediaError class which mimics the standard HTML5 MediaError class.
* Custom MediaError to mimic the HTML5 MediaError
*
* @param {Number|String|Object|MediaError} value
* This can be of multiple types:
* - Number: should be a standard error code
* - String: an error message (the code will be 0)
* - Object: arbitrary properties
* - MediaError (native): used to populate a video.js MediaError object
* - MediaError (video.js): will return itself if it's already a
* video.js MediaError object.
* @param {Number} code The media error code
*/
function MediaError(value) {
// Allow redundant calls to this constructor to avoid having `instanceof`
// checks peppered around the code.
if (value instanceof MediaError) {
return value;
}
if (typeof value === 'number') {
this.code = value;
} else if (typeof value === 'string') {
var MediaError = function MediaError(code) {
if (typeof code === 'number') {
this.code = code;
} else if (typeof code === 'string') {
// default code is zero, so this is a custom error
this.message = value;
} else if (typeof value === 'object') {
// We assign the `code` property manually because native MediaError objects
// do not expose it as an own/enumerable property of the object.
if (typeof value.code === 'number') {
this.code = value.code;
}
_objectAssign2['default'](this, value);
this.message = code;
} else if (typeof code === 'object') {
// object
_objectAssign2['default'](this, code);
}
if (!this.message) {
this.message = MediaError.defaultMessages[this.code] || '';
}
}
};
/*
* The error code that refers two one of the defined
@@ -11608,8 +11573,7 @@ var Player = (function (_Component) {
};
/**
* Normally gets the length in time of the video in seconds;
* in all but the rarest use cases an argument will NOT be passed to the method
* Get the length in time of the video in seconds
* ```js
* var lengthOfVideo = myPlayer.duration();
* ```
@@ -12503,7 +12467,12 @@ var Player = (function (_Component) {
return this;
}
this.error_ = new _mediaErrorJs2['default'](err);
// error instance
if (err instanceof _mediaErrorJs2['default']) {
this.error_ = err;
} else {
this.error_ = new _mediaErrorJs2['default'](err);
}
// add the vjs-error classname to the player
this.addClass('vjs-error');
@@ -15055,8 +15024,6 @@ var Html5 = (function (_Tech) {
'class': 'vjs-tech'
}));
}
el.playerId = this.options_.playerId;
}
// Update specific tag settings, in case they were overridden
@@ -15303,13 +15270,7 @@ var Html5 = (function (_Tech) {
*/
Html5.prototype.play = function play() {
var playPromise = this.el_.play();
// Catch/silence error when a pause interrupts a play request
// on browsers which return a promise
if (playPromise !== undefined && typeof playPromise.then === 'function') {
playPromise.then(null, function (e) {});
}
this.el_.play();
};
/**
@@ -16763,7 +16724,11 @@ var Tech = (function (_Component) {
Tech.prototype.error = function error(err) {
if (err !== undefined) {
this.error_ = new _mediaErrorJs2['default'](err);
if (err instanceof _mediaErrorJs2['default']) {
this.error_ = err;
} else {
this.error_ = new _mediaErrorJs2['default'](err);
}
this.trigger('error');
}
return this.error_;
@@ -20283,10 +20248,10 @@ function removeElData(el) {
*/
function hasElClass(element, classToCheck) {
throwIfWhitespace(classToCheck);
if (element.classList) {
return element.classList.contains(classToCheck);
} else {
throwIfWhitespace(classToCheck);
return classRegExp(classToCheck).test(element.className);
}
}
@@ -20742,10 +20707,6 @@ var _guidJs = _dereq_('./guid.js');
var Guid = _interopRequireWildcard(_guidJs);
var _logJs = _dereq_('./log.js');
var _logJs2 = _interopRequireDefault(_logJs);
var _globalWindow = _dereq_('global/window');
var _globalWindow2 = _interopRequireDefault(_globalWindow);
@@ -20800,11 +20761,7 @@ function on(elem, type, fn) {
if (event.isImmediatePropagationStopped()) {
break;
} else {
try {
handlersCopy[m].call(elem, event, hash);
} catch (e) {
_logJs2['default'].error(e);
}
handlersCopy[m].call(elem, event, hash);
}
}
}
@@ -21127,7 +21084,7 @@ function _handleMultipleEvents(fn, elem, types, callback) {
});
}
},{"./dom.js":142,"./guid.js":146,"./log.js":147,"global/document":1,"global/window":2}],144:[function(_dereq_,module,exports){
},{"./dom.js":142,"./guid.js":146,"global/document":1,"global/window":2}],144:[function(_dereq_,module,exports){
/**
* @file fn.js
*/
@@ -21906,7 +21863,7 @@ setup.autoSetupTimeout(1, videojs);
*
* @type {String}
*/
videojs.VERSION = '5.11.9';
videojs.VERSION = '5.11.2';
/**
* The global options object. These are the settings that take effect
@@ -22517,6 +22474,9 @@ module.exports = exports['default'];
},{"../../src/js/utils/merge-options.js":148,"./component":67,"./event-target":104,"./extend.js":105,"./player":113,"./plugins.js":114,"./setup":118,"./tech/flash.js":121,"./tech/html5.js":122,"./tech/tech.js":124,"./tracks/audio-track.js":126,"./tracks/text-track.js":134,"./tracks/video-track.js":139,"./utils/browser.js":140,"./utils/dom.js":142,"./utils/events.js":143,"./utils/fn.js":144,"./utils/format-time.js":145,"./utils/log.js":147,"./utils/stylesheet.js":149,"./utils/time-ranges.js":150,"./utils/url.js":152,"global/document":1,"global/window":2,"lodash-compat/object/merge":40,"xhr":56}]},{},[153])(153)
});
//# sourceMappingURL=video.js.map
/* vtt.js - v0.12.1 (https://github.com/mozilla/vtt.js) built on 08-07-2015 */
(function(root) {
+319
Ver Arquivo
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
+15 -10
Ver Arquivo
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
+1
Ver Arquivo
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
-1
Ver Arquivo
@@ -21,7 +21,6 @@
"Close Modal Dialog": "Close Modal Dialog",
"Descriptions": "Descriptions",
"descriptions off": "descriptions off",
"Audio Track": "Audio Track",
"You aborted the media playback": "You aborted the media playback",
"A network error caused the media download to fail part-way.": "A network error caused the media download to fail part-way.",
"The media could not be loaded, either because the server or network failed or because the format is not supported.": "The media could not be loaded, either because the server or network failed or because the format is not supported.",
+15 -16
Ver Arquivo
@@ -1,7 +1,7 @@
{
"name": "video.js",
"description": "An HTML5 and Flash video player with a common API and skin for both.",
"version": "5.11.9",
"version": "5.11.2",
"copyright": "Copyright Brightcove, Inc. <https://www.brightcove.com/>",
"license": "Apache-2.0",
"keywords": [
@@ -59,29 +59,28 @@
"grunt-contrib-cssmin": "~0.6.0",
"grunt-contrib-jshint": "~0.11.3",
"grunt-contrib-less": "~0.6.4",
"grunt-contrib-uglify": "^2.0.0",
"grunt-contrib-uglify": "^0.8.0",
"grunt-contrib-watch": "~0.1.4",
"grunt-coveralls": "^1.0.0",
"grunt-exorcise": "^1.0.1",
"grunt-fastly": "^0.1.3",
"grunt-github-releaser": "^0.1.17",
"grunt-karma": "^2.0.0",
"grunt-shell": "^1.3.0",
"grunt-karma": "^0.8.3",
"grunt-version": "~0.3.0",
"grunt-videojs-languages": "0.0.4",
"grunt-zip": "0.10.2",
"karma": "^1.2.0",
"karma-browserify": "^5.1.0",
"karma-browserstack-launcher": "^1.0.1",
"karma-chrome-launcher": "^1.0.1",
"karma-coverage": "^1.1.1",
"karma-detect-browsers": "^2.1.0",
"karma-firefox-launcher": "^1.0.0",
"karma-ie-launcher": "^1.0.0",
"karma-opera-launcher": "^1.0.0",
"karma-qunit": "^1.2.0",
"karma-safari-launcher": "^1.0.0",
"karma-sinon": "^1.0.5",
"karma": "^0.12.36",
"karma-browserify": "^4.0.0",
"karma-browserstack-launcher": "^0.1.4",
"karma-chrome-launcher": "^0.1.3",
"karma-coverage": "^0.4.0",
"karma-detect-browsers": "^2.0.2",
"karma-firefox-launcher": "^0.1.3",
"karma-ie-launcher": "^0.1.5",
"karma-opera-launcher": "~0.1.0",
"karma-qunit": "^0.1.2",
"karma-safari-launcher": "^0.1.1",
"karma-sinon": "^1.0.3",
"load-grunt-tasks": "^3.1.0",
"proxyquireify": "^3.0.0",
"qunitjs": "^1.18.0",
+3 -5
Ver Arquivo
@@ -11,6 +11,7 @@ import * as Guid from './utils/guid.js';
import * as Events from './utils/events.js';
import log from './utils/log.js';
import toTitleCase from './utils/to-title-case.js';
import assign from 'object.assign';
import mergeOptions from './utils/merge-options.js';
@@ -1175,11 +1176,8 @@ class Component {
this.on('touchstart', function(event) {
// If more than one finger, don't consider treating this as a click
if (event.touches.length === 1) {
// Copy pageX/pageY from the object
firstTouch = {
pageX: event.touches[0].pageX,
pageY: event.touches[0].pageY
};
// Copy the touches object to prevent modifying the original
firstTouch = assign({}, event.touches[0]);
// Record start time so we can detect a tap vs. "touch and hold"
touchStart = new Date().getTime();
// Reset couldBeTap tracking
@@ -59,6 +59,6 @@ class AudioTrackButton extends TrackButton {
return items;
}
}
AudioTrackButton.prototype.controlText_ = 'Audio Track';
Component.registerComponent('AudioTrackButton', AudioTrackButton);
export default AudioTrackButton;
@@ -51,7 +51,9 @@ class AudioTrackMenuItem extends MenuItem {
for (let i = 0; i < tracks.length; i++) {
let track = tracks[i];
track.enabled = track === this.track;
if (track === this.track) {
track.enabled = true;
}
}
}
+3 -17
Ver Arquivo
@@ -12,11 +12,6 @@ import Component from '../component.js';
*/
class FullscreenToggle extends Button {
constructor(player, options) {
super(player, options);
this.on(player, 'fullscreenchange', this.handleFullscreenChange);
}
/**
* Allow sub components to stack CSS class names
*
@@ -26,18 +21,7 @@ class FullscreenToggle extends Button {
buildCSSClass() {
return `vjs-fullscreen-control ${super.buildCSSClass()}`;
}
/**
* Handles Fullscreenchange on the component and change control text accordingly
*
* @method handleFullscreenChange
*/
handleFullscreenChange() {
if (this.player_.isFullscreen()) {
this.controlText('Non-Fullscreen');
} else {
this.controlText('Fullscreen');
}
}
/**
* Handles click for full screen
*
@@ -46,8 +30,10 @@ class FullscreenToggle extends Button {
handleClick() {
if (!this.player_.isFullscreen()) {
this.player_.requestFullscreen();
this.controlText('Non-Fullscreen');
} else {
this.player_.exitFullscreen();
this.controlText('Fullscreen');
}
}
@@ -19,12 +19,6 @@ class DurationDisplay extends Component {
super(player, options);
this.on(player, 'durationchange', this.updateContent);
// Also listen for timeupdate and loadedmetadata because removing those
// listeners could have broken dependent applications/libraries. These
// can likely be removed for 6.0.
this.on(player, 'timeupdate', this.updateContent);
this.on(player, 'loadedmetadata', this.updateContent);
}
/**
+10 -31
Ver Arquivo
@@ -4,45 +4,24 @@
import assign from 'object.assign';
/*
* Custom MediaError class which mimics the standard HTML5 MediaError class.
* Custom MediaError to mimic the HTML5 MediaError
*
* @param {Number|String|Object|MediaError} value
* This can be of multiple types:
* - Number: should be a standard error code
* - String: an error message (the code will be 0)
* - Object: arbitrary properties
* - MediaError (native): used to populate a video.js MediaError object
* - MediaError (video.js): will return itself if it's already a
* video.js MediaError object.
* @param {Number} code The media error code
*/
function MediaError(value) {
// Allow redundant calls to this constructor to avoid having `instanceof`
// checks peppered around the code.
if (value instanceof MediaError) {
return value;
}
if (typeof value === 'number') {
this.code = value;
} else if (typeof value === 'string') {
let MediaError = function(code){
if (typeof code === 'number') {
this.code = code;
} else if (typeof code === 'string') {
// default code is zero, so this is a custom error
this.message = value;
} else if (typeof value === 'object') {
// We assign the `code` property manually because native MediaError objects
// do not expose it as an own/enumerable property of the object.
if (typeof value.code === 'number') {
this.code = value.code;
}
assign(this, value);
this.message = code;
} else if (typeof code === 'object') { // object
assign(this, code);
}
if (!this.message) {
this.message = MediaError.defaultMessages[this.code] || '';
}
}
};
/*
* The error code that refers two one of the defined
+7 -3
Ver Arquivo
@@ -1418,8 +1418,7 @@ class Player extends Component {
}
/**
* Normally gets the length in time of the video in seconds;
* in all but the rarest use cases an argument will NOT be passed to the method
* Get the length in time of the video in seconds
* ```js
* var lengthOfVideo = myPlayer.duration();
* ```
@@ -2277,7 +2276,12 @@ class Player extends Component {
return this;
}
this.error_ = new MediaError(err);
// error instance
if (err instanceof MediaError) {
this.error_ = err;
} else {
this.error_ = new MediaError(err);
}
// add the vjs-error classname to the player
this.addClass('vjs-error');
+1 -11
Ver Arquivo
@@ -189,8 +189,6 @@ class Html5 extends Tech {
})
);
}
el.playerId = this.options_.playerId;
}
// Update specific tag settings, in case they were overridden
@@ -425,15 +423,7 @@ class Html5 extends Tech {
*
* @method play
*/
play() {
const playPromise = this.el_.play();
// Catch/silence error when a pause interrupts a play request
// on browsers which return a promise
if (playPromise !== undefined && typeof playPromise.then === 'function') {
playPromise.then(null, (e) => {});
}
}
play() { this.el_.play(); }
/**
* Pause for html5 tech
+5 -1
Ver Arquivo
@@ -282,7 +282,11 @@ class Tech extends Component {
*/
error(err) {
if (err !== undefined) {
this.error_ = new MediaError(err);
if (err instanceof MediaError) {
this.error_ = err;
} else {
this.error_ = new MediaError(err);
}
this.trigger('error');
}
return this.error_;
+1 -1
Ver Arquivo
@@ -240,10 +240,10 @@ export function removeElData(el) {
* @param {String} classToCheck Classname to check
*/
export function hasElClass(element, classToCheck) {
throwIfWhitespace(classToCheck);
if (element.classList) {
return element.classList.contains(classToCheck);
} else {
throwIfWhitespace(classToCheck);
return classRegExp(classToCheck).test(element.className);
}
}
+3 -8
Ver Arquivo
@@ -7,9 +7,8 @@
* robust as jquery's, so there's probably some differences.
*/
import * as Dom from './dom.js';
import * as Guid from './guid.js';
import log from './log.js';
import * as Dom from './dom.js';
import * as Guid from './guid.js';
import window from 'global/window';
import document from 'global/document';
@@ -58,11 +57,7 @@ export function on(elem, type, fn){
if (event.isImmediatePropagationStopped()) {
break;
} else {
try {
handlersCopy[m].call(elem, event, hash);
} catch (e) {
log.error(e);
}
handlersCopy[m].call(elem, event, hash);
}
}
}
-12
Ver Arquivo
@@ -2,7 +2,6 @@ import VolumeControl from '../../src/js/control-bar/volume-control/volume-contro
import MuteToggle from '../../src/js/control-bar/mute-toggle.js';
import PlaybackRateMenuButton from '../../src/js/control-bar/playback-rate-menu/playback-rate-menu-button.js';
import Slider from '../../src/js/slider/slider.js';
import FullscreenToggle from '../../src/js/control-bar/fullscreen-toggle.js';
import TestHelpers from './test-helpers.js';
import document from 'global/document';
@@ -113,14 +112,3 @@ test('should hide playback rate control if it\'s not supported', function(){
ok(playbackRate.el().className.indexOf('vjs-hidden') >= 0, 'playbackRate is not hidden');
});
QUnit.test('Fullscreen control text should be correct when fullscreenchange is triggered', function() {
const player = TestHelpers.makePlayer();
const fullscreentoggle = new FullscreenToggle(player);
player.isFullscreen(true);
player.trigger('fullscreenchange');
QUnit.equal(fullscreentoggle.controlText(), 'Non-Fullscreen', 'Control Text is correct while switching to fullscreen mode');
player.isFullscreen(false);
player.trigger('fullscreenchange');
QUnit.equal(fullscreentoggle.controlText(), 'Fullscreen', 'Control Text is correct while switching back to normal mode');
});
-18
Ver Arquivo
@@ -239,21 +239,3 @@ test('should have relatedTarget correctly set on the event', function() {
Events.trigger(el2, { type:'click', relatedTarget:undefined });
});
QUnit.test('should execute remaining handlers after an exception in an event handler', function(assert) {
assert.expect(1);
const el = document.createElement('div');
const listener1 = function() {
throw new Error('GURU MEDITATION ERROR');
};
const listener2 = function() {
assert.ok(true, 'Click Triggered');
};
Events.on(el, 'click', listener1);
Events.on(el, 'click', listener2);
// 1 click
Events.trigger(el, 'click');
});
-69
Ver Arquivo
@@ -1,69 +0,0 @@
/* eslint-env qunit */
import window from 'global/window';
import MediaError from '../../src/js/media-error';
const isModernBrowser = window.MediaError && Object.create && Object.defineProperty;
/**
* Creates a real native MediaError object.
*
* @param {Number} code
* @param {String} [message]
* @return {MediaError}
*/
const createNativeMediaError = (code, message) => {
const err = Object.create(window.MediaError);
Object.defineProperty(err, 'code', {value: code});
if (message) {
err.message = message;
}
return err;
};
QUnit.module('MediaError');
QUnit.test('can be constructed from a number', function(assert) {
const mediaError = new MediaError(1);
assert.strictEqual(mediaError.code, 1);
assert.strictEqual(mediaError.message, MediaError.defaultMessages['1']);
});
QUnit.test('can be constructed from a string', function(assert) {
const mediaError = new MediaError('hello, world');
assert.strictEqual(mediaError.code, 0);
assert.strictEqual(mediaError.message, 'hello, world');
});
QUnit.test('can be constructed from an object', function(assert) {
const mediaError = new MediaError({code: 2});
const mediaErrorMsg = new MediaError({code: 2, message: 'hello, world'});
assert.strictEqual(mediaError.code, 2);
assert.strictEqual(mediaError.message, MediaError.defaultMessages['2']);
assert.strictEqual(mediaErrorMsg.code, 2);
assert.strictEqual(mediaErrorMsg.message, 'hello, world');
});
if (isModernBrowser) {
QUnit.test('can be constructed from a native MediaError object', function(assert) {
const mediaError = new MediaError(createNativeMediaError(3));
const mediaErrorMsg = new MediaError(createNativeMediaError(4, 'hello, world'));
assert.strictEqual(mediaError.code, 3);
assert.strictEqual(mediaError.message, MediaError.defaultMessages['3']);
assert.strictEqual(mediaErrorMsg.code, 4);
assert.strictEqual(mediaErrorMsg.message, 'hello, world');
});
}
QUnit.test('can be constructed redundantly', function(assert) {
const mediaError = new MediaError(2);
const redundantMediaError = new MediaError(mediaError);
assert.strictEqual(redundantMediaError, mediaError);
});
-17
Ver Arquivo
@@ -442,20 +442,3 @@ test('Html5#reset calls Html5.resetMediaElement when called', function() {
Html5.resetMediaElement = oldResetMedia;
});
QUnit.test('Exception in play promise should be caught', function() {
const oldEl = tech.el_;
tech.el_ = {
play: () => {
return new Promise(function(resolve, reject) {
reject(new DOMException());
});
}
};
tech.play();
QUnit.ok(true, 'error was caught');
tech.el_ = oldEl;
});