Comparar commits
15 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| 54ef0a7758 | |||
| efb357f841 | |||
| a3038226f1 | |||
| a722498191 | |||
| 180c75b3a2 | |||
| 3540fcfee8 | |||
| f82312e5fb | |||
| aa7d5a2839 | |||
| a787b5ca3a | |||
| 5fc725c088 | |||
| 2ef7617c66 | |||
| c222eb1381 | |||
| dca5644878 | |||
| 00567cff6c | |||
| a9567e2574 |
+10
-1
@@ -45,5 +45,14 @@ CHANGELOG
|
||||
* Updated 'fullscreenchange' event to be called even if the user presses escape to exit fullscreen.
|
||||
* Automatically converting URsource URL to absolute for Flash fallback.
|
||||
* Created new 'loadedalldata' event for when the source is completely downloaded
|
||||
* Improved player.destory(). Now removes elements and references.
|
||||
* Improved player.destroy(). Now removes elements and references.
|
||||
* Refactored API to be more immediately available.
|
||||
|
||||
---- 3.2.1 / 2012-04-06 / options-width-fix ------------------------------------
|
||||
* Fixed setting width/height with javascript options
|
||||
|
||||
---- 3.2.2 / 2012-05-02 / multiple-control-fades-fix ---------------------------
|
||||
* Fixed error with multiple controls fading listeners
|
||||
|
||||
---- 3.2.3 / 2012-11-12 / fix-chrome-seeking-spinner ---------------------------
|
||||
* Fixed chrome spinner continuing on seek
|
||||
|
||||
+3
-2
@@ -1,4 +1,5 @@
|
||||
---
|
||||
---
|
||||
major: 3
|
||||
patch: 0
|
||||
minor: 2
|
||||
patch: 3
|
||||
pre:
|
||||
|
||||
@@ -126,7 +126,7 @@ so you can upgrade to newer versions easier. You can remove all these styles by
|
||||
}
|
||||
|
||||
.vjs-default-skin .vjs-control:focus {
|
||||
outline: 1;
|
||||
outline: 0;
|
||||
/* background-color: #555;*/
|
||||
}
|
||||
|
||||
|
||||
externo
+8
-2
@@ -30,7 +30,7 @@ _V_.ControlBar = _V_.Component.extend({
|
||||
init: function(player, options){
|
||||
this._super(player, options);
|
||||
|
||||
player.addEvent("play", this.proxy(function(){
|
||||
player.one("play", this.proxy(function(){
|
||||
this.fadeIn();
|
||||
this.player.addEvent("mouseover", this.proxy(this.fadeIn));
|
||||
this.player.addEvent("mouseout", this.proxy(this.fadeOut));
|
||||
@@ -239,6 +239,12 @@ _V_.LoadingSpinner = _V_.Component.extend({
|
||||
player.addEvent("playing", _V_.proxy(this, this.hide));
|
||||
|
||||
player.addEvent("seeking", _V_.proxy(this, this.show));
|
||||
|
||||
// in some browsers seeking does not trigger the 'playing' event,
|
||||
// so we also need to trap 'seeked' if we are going to set a
|
||||
// 'seeking' event
|
||||
player.addEvent("seeked", _V_.proxy(this, this.hide));
|
||||
|
||||
player.addEvent("error", _V_.proxy(this, this.show));
|
||||
|
||||
// Not showing spinner on stalled any more. Browsers may stall and then not trigger any events that would remove the spinner.
|
||||
@@ -843,4 +849,4 @@ _V_.MenuItem = _V_.Button.extend({
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
+3
-3
@@ -55,9 +55,9 @@ VideoJS.options = {
|
||||
flash: { swf: "http://vjs.zencdn.net/c/video-js.swf" },
|
||||
|
||||
// Default of web browser is 300x150. Should rely on source width/height.
|
||||
width: "auto",
|
||||
height: "auto",
|
||||
|
||||
width: 300,
|
||||
height: 150,
|
||||
|
||||
// defaultVolume: 0.85,
|
||||
defaultVolume: 0.00, // The freakin seaguls are driving me crazy!
|
||||
|
||||
|
||||
+44
-44
@@ -7,27 +7,34 @@ _V_.Player = _V_.Component.extend({
|
||||
this.tag = tag; // Store the original tag used to set options
|
||||
|
||||
var el = this.el = _V_.createElement("div"), // Div to contain video and controls
|
||||
options = this.options = {},
|
||||
width = options.width = tag.getAttribute('width'),
|
||||
height = options.height = tag.getAttribute('height'),
|
||||
options = this.options = {};
|
||||
|
||||
// Browsers default to 300x150 if there's no width/height or video size data.
|
||||
initWidth = width || 300,
|
||||
initHeight = height || 150;
|
||||
|
||||
// Make player findable on elements
|
||||
tag.player = el.player = this;
|
||||
// Set Options
|
||||
_V_.merge(options, _V_.options); // Copy Global Defaults
|
||||
_V_.merge(options, this.getVideoTagSettings()); // Override with Video Tag Options
|
||||
_V_.merge(options, addOptions); // Override/extend with options from setup call
|
||||
|
||||
// Add callback to ready queue
|
||||
this.ready(ready);
|
||||
|
||||
// Store controls setting, and then remove immediately so native controls don't flash.
|
||||
tag.removeAttribute("controls");
|
||||
|
||||
// Poster will be handled by a manual <img>
|
||||
tag.removeAttribute("poster");
|
||||
|
||||
// Make player findable on elements
|
||||
tag.player = el.player = this;
|
||||
|
||||
// Wrap video tag in div (el/box) container
|
||||
tag.parentNode.insertBefore(el, tag);
|
||||
el.appendChild(tag); // Breaks iPhone, fixed in HTML5 setup.
|
||||
|
||||
// Give video tag properties to box
|
||||
el.id = this.id = tag.id; // ID will now reference box, not the video tag
|
||||
// ID will now reference box, not the video tag
|
||||
this.id = el.id = tag.id;
|
||||
el.className = tag.className;
|
||||
|
||||
// Update tag id/class for use as HTML5 playback tech
|
||||
tag.id += "_html5_api";
|
||||
tag.className = "vjs-tech";
|
||||
@@ -36,27 +43,18 @@ _V_.Player = _V_.Component.extend({
|
||||
_V_.players[el.id] = this;
|
||||
|
||||
// Make box use width/height of tag, or default 300x150
|
||||
el.setAttribute("width", initWidth);
|
||||
el.setAttribute("height", initHeight);
|
||||
el.setAttribute("width", options.width);
|
||||
el.setAttribute("height", options.height);
|
||||
|
||||
// Enforce with CSS since width/height attrs don't work on divs
|
||||
el.style.width = initWidth+"px";
|
||||
el.style.height = initHeight+"px";
|
||||
el.style.width = options.width+"px";
|
||||
el.style.height = options.height+"px";
|
||||
|
||||
// Remove width/height attrs from tag so CSS can make it 100% width/height
|
||||
tag.removeAttribute("width");
|
||||
tag.removeAttribute("height");
|
||||
|
||||
// Set Options
|
||||
_V_.merge(options, _V_.options); // Copy Global Defaults
|
||||
_V_.merge(options, this.getVideoTagSettings()); // Override with Video Tag Options
|
||||
_V_.merge(options, addOptions); // Override/extend with options from setup call
|
||||
|
||||
// Store controls setting, and then remove immediately so native controls don't flash.
|
||||
tag.removeAttribute("controls");
|
||||
|
||||
// Poster will be handled by a manual <img>
|
||||
tag.removeAttribute("poster");
|
||||
|
||||
// Empty video tag sources and tracks so the built in player doesn't use them also.
|
||||
// Empty video tag sources and tracks so the built-in player doesn't use them also.
|
||||
if (tag.hasChildNodes()) {
|
||||
for (var i=0,j=tag.childNodes;i<j.length;i++) {
|
||||
if (j[i].nodeName == "SOURCE" || j[i].nodeName == "TRACK") {
|
||||
@@ -129,35 +127,37 @@ _V_.Player = _V_.Component.extend({
|
||||
var options = {
|
||||
sources: [],
|
||||
tracks: []
|
||||
};
|
||||
},
|
||||
tag = this.tag,
|
||||
getAttribute = "getAttribute"; // For better minification
|
||||
|
||||
options.src = this.tag.getAttribute("src");
|
||||
options.controls = this.tag.getAttribute("controls") !== null;
|
||||
options.poster = this.tag.getAttribute("poster");
|
||||
options.preload = this.tag.getAttribute("preload");
|
||||
options.autoplay = this.tag.getAttribute("autoplay") !== null; // hasAttribute not IE <8 compatible
|
||||
options.loop = this.tag.getAttribute("loop") !== null;
|
||||
options.muted = this.tag.getAttribute("muted") !== null;
|
||||
options.src = tag[getAttribute]("src");
|
||||
options.controls = tag[getAttribute]("controls") !== null;
|
||||
options.poster = tag[getAttribute]("poster");
|
||||
options.preload = tag[getAttribute]("preload");
|
||||
options.autoplay = tag[getAttribute]("autoplay") !== null; // hasAttribute not IE <8 compatible
|
||||
options.loop = tag[getAttribute]("loop") !== null;
|
||||
options.muted = tag[getAttribute]("muted") !== null;
|
||||
|
||||
if (this.tag.hasChildNodes()) {
|
||||
for (var c,i=0,j=this.tag.childNodes;i<j.length;i++) {
|
||||
c = j[i];
|
||||
if (c.nodeName == "SOURCE") {
|
||||
options.sources.push({
|
||||
src: c.getAttribute('src'),
|
||||
type: c.getAttribute('type'),
|
||||
media: c.getAttribute('media'),
|
||||
title: c.getAttribute('title')
|
||||
src: c[getAttribute]('src'),
|
||||
type: c[getAttribute]('type'),
|
||||
media: c[getAttribute]('media'),
|
||||
title: c[getAttribute]('title')
|
||||
});
|
||||
}
|
||||
if (c.nodeName == "TRACK") {
|
||||
options.tracks.push({
|
||||
src: c.getAttribute("src"),
|
||||
kind: c.getAttribute("kind"),
|
||||
srclang: c.getAttribute("srclang"),
|
||||
label: c.getAttribute("label"),
|
||||
'default': c.getAttribute("default") !== null,
|
||||
title: c.getAttribute("title")
|
||||
src: c[getAttribute]("src"),
|
||||
kind: c[getAttribute]("kind"),
|
||||
srclang: c[getAttribute]("srclang"),
|
||||
label: c[getAttribute]("label"),
|
||||
'default': c[getAttribute]("default") !== null,
|
||||
title: c[getAttribute]("title")
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário