Comparar commits

..

15 Commits

Autor SHA1 Mensagem Data
Steve Heffernan 54ef0a7758 Merge branch 'hotfix/fix-chrome-seeking-spinner' into stable 2012-11-12 17:29:12 -08:00
Steve Heffernan efb357f841 Adding line to CHANGELOG: Fixed chrome spinner continuing on seek 2012-11-12 17:29:12 -08:00
Steve Heffernan a3038226f1 Bumping version to 3.2.3. 2012-11-12 17:28:53 -08:00
Steve Heffernan a722498191 Merge branch 'dan/fix_chrome_seeking_spinner' of git://github.com/onyxrev/video-js into hotfix/fix-chrome-seeking-spinner 2012-11-12 17:18:07 -08:00
Dan Connor 180c75b3a2 fix for loading spinner persisting on screen after programatic seek in Chrome 2012-11-06 16:38:35 -08:00
Steve Heffernan 3540fcfee8 Merge branch 'hotfix/multiple-control-fades-fix' into stable 2012-05-02 20:55:57 -07:00
Steve Heffernan f82312e5fb Adding line to CHANGELOG: Fixed error with multiple controls fading listeners 2012-05-02 20:55:57 -07:00
Steve Heffernan aa7d5a2839 Bumping version to 3.2.2. 2012-05-02 20:55:35 -07:00
Steve Heffernan a787b5ca3a Fixed multiple event listeners added for controls fading on play event. fixes #173 2012-05-02 20:54:40 -07:00
Steve Heffernan 5fc725c088 Merge branch 'hotfix/options-width-fix' into stable 2012-04-06 16:50:16 -07:00
Steve Heffernan 2ef7617c66 Adding line to CHANGELOG: Fixed setting width/height with javascript options 2012-04-06 16:50:16 -07:00
Steve Heffernan c222eb1381 Bumping version to 3.2.1. 2012-04-06 16:49:47 -07:00
Steve Heffernan dca5644878 Updated options loading to be better. 2012-04-06 16:42:09 -07:00
Steve Heffernan 00567cff6c Spelling error. 2012-03-23 17:10:35 -07:00
Steve Heffernan a9567e2574 removed outline from button focus. 2012-03-20 13:01:10 -07:00
6 arquivos alterados com 69 adições e 53 exclusões
+10 -1
Ver Arquivo
@@ -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
Ver Arquivo
@@ -1,4 +1,5 @@
---
---
major: 3
patch: 0
minor: 2
patch: 3
pre:
+1 -1
Ver Arquivo
@@ -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;*/
}
+8 -2
Ver Arquivo
@@ -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
Ver Arquivo
@@ -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
Ver Arquivo
@@ -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")
});
}
}