Comparar commits
9 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| 9ec2556a7c | |||
| d3efe4b04c | |||
| f35ae5c44f | |||
| 14193c4308 | |||
| faea65a44e | |||
| 50adf355af | |||
| 1d05177627 | |||
| a94259cc73 | |||
| a49213e20c |
@@ -6,6 +6,12 @@ _(none)_
|
||||
|
||||
--------------------
|
||||
|
||||
## 4.2.2 (2013-10-15)
|
||||
* Fixed a race condition that would cause videos to fail in Firefox ([view](https://github.com/videojs/video.js/pull/776))
|
||||
|
||||
## 4.2.1 (2013-09-09)
|
||||
* Fixed an infinite loop caused by loading the library asynchronously ([view](https://github.com/videojs/video.js/pull/727))
|
||||
|
||||
## 4.2.0 (2013-09-04)
|
||||
* Added LESS as a CSS preprocessor for the default skin ([view](https://github.com/videojs/video.js/pull/644))
|
||||
* Exported MenuButtons for use in the API ([view](https://github.com/videojs/video.js/pull/648))
|
||||
|
||||
+2
-1
@@ -210,7 +210,8 @@ module.exports = function(grunt) {
|
||||
+ ' --js_output_file=' + dest
|
||||
+ ' --create_source_map ' + dest + '.map --source_map_format=V3'
|
||||
+ ' --jscomp_warning=checkTypes --warning_level=VERBOSE'
|
||||
+ ' --output_wrapper "/*! Video.js v' + version.full + ' ' + pkg.copyright + ' */ (function() {%output%})();//@ sourceMappingURL=video.js.map"';
|
||||
+ ' --output_wrapper "/*! Video.js v' + version.full + ' ' + pkg.copyright + ' */ (function() {%output%})();"';
|
||||
//@ sourceMappingURL=video.js.map
|
||||
|
||||
// Add each js file
|
||||
grunt.file.expand(filePatterns).forEach(function(file){
|
||||
|
||||
+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": "4.2.0",
|
||||
"version": "4.2.2",
|
||||
"copyright": "Copyright 2013 Brightcove, Inc. https://github.com/videojs/video.js/blob/master/LICENSE",
|
||||
"keywords": [
|
||||
"html5",
|
||||
|
||||
+30
-6
@@ -27,7 +27,7 @@ vjs.Html5 = vjs.MediaTechController.extend({
|
||||
|
||||
// If the element source is already set, we may have missed the loadstart event, and want to trigger it.
|
||||
// We don't want to set the source again and interrupt playback.
|
||||
if (source && this.el_.currentSrc == source.src) {
|
||||
if (source && this.el_.currentSrc === source.src && this.el_.networkState > 0) {
|
||||
player.trigger('loadstart');
|
||||
|
||||
// Otherwise set the source if one was provided.
|
||||
@@ -67,19 +67,20 @@ vjs.Html5.prototype.createEl = function(){
|
||||
var player = this.player_,
|
||||
// If possible, reuse original tag for HTML5 playback technology element
|
||||
el = player.tag,
|
||||
newEl;
|
||||
newEl,
|
||||
clone;
|
||||
|
||||
// Check if this browser supports moving the element into the box.
|
||||
// On the iPhone video will break if you move the element,
|
||||
// So we have to create a brand new element.
|
||||
if (!el || this.features['movingMediaElementInDOM'] === false) {
|
||||
|
||||
// If the original tag is still there, remove it.
|
||||
// If the original tag is still there, clone and remove it.
|
||||
if (el) {
|
||||
el['player'] = null;
|
||||
clone = el.cloneNode(false);
|
||||
vjs.Html5.disposeMediaElement(el);
|
||||
el = clone;
|
||||
player.tag = null;
|
||||
player.el().removeChild(el);
|
||||
el = el.cloneNode(false);
|
||||
} else {
|
||||
el = vjs.createEl('video', {
|
||||
id:player.id() + '_html5_api',
|
||||
@@ -258,6 +259,29 @@ vjs.Html5.canControlVolume = function(){
|
||||
// List of all HTML5 events (various uses).
|
||||
vjs.Html5.Events = 'loadstart,suspend,abort,error,emptied,stalled,loadedmetadata,loadeddata,canplay,canplaythrough,playing,waiting,seeking,seeked,ended,durationchange,timeupdate,progress,play,pause,ratechange,volumechange'.split(',');
|
||||
|
||||
vjs.Html5.disposeMediaElement = function(el){
|
||||
if (!el) { return; }
|
||||
|
||||
el['player'] = null;
|
||||
|
||||
if (el.parentNode) {
|
||||
el.parentNode.removeChild(el);
|
||||
}
|
||||
|
||||
// remove any child track or source nodes to prevent their loading
|
||||
while(el.hasChildNodes()) {
|
||||
el.removeChild(el.firstChild);
|
||||
}
|
||||
|
||||
// remove any src reference. not setting `src=''` because that causes a warning
|
||||
// in firefox
|
||||
el.removeAttribute('src');
|
||||
|
||||
// force the media element to update its loading state by calling load()
|
||||
if (typeof el.load === 'function') {
|
||||
el.load();
|
||||
}
|
||||
};
|
||||
|
||||
// HTML5 Feature detection and Device Fixes --------------------------------- //
|
||||
|
||||
|
||||
+9
-6
@@ -151,7 +151,7 @@ vjs.Player.prototype.createEl = function(){
|
||||
// Remove width/height attrs from tag so CSS can make it 100% width/height
|
||||
tag.removeAttribute('width');
|
||||
tag.removeAttribute('height');
|
||||
// Empty video tag sources and tracks so the built-in player doesn't use them also.
|
||||
// Empty video tag tracks so the built-in player doesn't use them also.
|
||||
// This may not be fast enough to stop HTML5 browsers from reading the tags
|
||||
// so we'll need to turn off any default tracks if we're manually doing
|
||||
// captions and subtitles. videoElement.textTracks
|
||||
@@ -165,7 +165,7 @@ vjs.Player.prototype.createEl = function(){
|
||||
while (nodesLength--) {
|
||||
node = nodes[nodesLength];
|
||||
nodeName = node.nodeName.toLowerCase();
|
||||
if (nodeName === 'source' || nodeName === 'track') {
|
||||
if (nodeName === 'track') {
|
||||
removeNodes.push(node);
|
||||
}
|
||||
}
|
||||
@@ -218,11 +218,10 @@ vjs.Player.prototype.loadTech = function(techName, source){
|
||||
if (this.tech) {
|
||||
this.unloadTech();
|
||||
|
||||
// If the first time loading, HTML5 tag will exist but won't be initialized
|
||||
// So we need to remove it if we're not loading HTML5
|
||||
// if this is the first time loading, HTML5 tag will exist but won't be initialized
|
||||
// so we need to remove it if we're not loading HTML5
|
||||
} else if (techName !== 'Html5' && this.tag) {
|
||||
this.el_.removeChild(this.tag);
|
||||
this.tag['player'] = null;
|
||||
vjs.Html5.disposeMediaElement(this.tag);
|
||||
this.tag = null;
|
||||
}
|
||||
|
||||
@@ -538,6 +537,10 @@ vjs.Player.prototype.duration = function(seconds){
|
||||
return this;
|
||||
}
|
||||
|
||||
if (this.cache_.duration === undefined) {
|
||||
this.onDurationChange();
|
||||
}
|
||||
|
||||
return this.cache_.duration;
|
||||
};
|
||||
|
||||
|
||||
+6
-2
@@ -53,9 +53,13 @@ vjs.autoSetupTimeout = function(wait){
|
||||
setTimeout(vjs.autoSetup, wait);
|
||||
};
|
||||
|
||||
vjs.one(window, 'load', function(){
|
||||
if (document.readyState === 'complete') {
|
||||
vjs.windowLoaded = true;
|
||||
});
|
||||
} else {
|
||||
vjs.one(window, 'load', function(){
|
||||
vjs.windowLoaded = true;
|
||||
});
|
||||
}
|
||||
|
||||
// Run Auto-load players
|
||||
// You have to wait at least once in case this script is loaded after your video in the DOM (weird behavior only with minified version)
|
||||
|
||||
@@ -38,6 +38,7 @@ vjs.MediaFaker.prototype.pause = function(){ return false; };
|
||||
vjs.MediaFaker.prototype.supportsFullScreen = function(){ return false; };
|
||||
vjs.MediaFaker.prototype.features = {};
|
||||
vjs.MediaFaker.prototype.buffered = function(){ return {}; };
|
||||
vjs.MediaFaker.prototype.duration = function(){ return {}; };
|
||||
|
||||
// Export vars for Closure Compiler
|
||||
vjs['MediaFaker'] = vjs.MediaFaker;
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário