mirror of
https://github.com/videojs/video.js.git
synced 2025-02-12 12:16:27 +02:00
Fixed some IE comma errors. Made ajax error clearer. Fixed a setup issue.
This commit is contained in:
parent
82d55c45e7
commit
0c7334c861
1
dev.html
1
dev.html
@ -37,6 +37,7 @@
|
||||
<source src="http://www.youtube.com/watch?v=YjaZNYSt7o0&feature=related" type='video/youtube'>
|
||||
<track kind="subtitles" src="http://videojs.com/subtitles/demo-subtitles.srt" srclang="en-US" label="English"></track>
|
||||
<!-- <track kind="subtitles" src="demo-subtitles.srt" srclang="en-US" label="English"></track> -->
|
||||
<p>Video Playback Not Supported</p>
|
||||
</video>
|
||||
|
||||
<script>
|
||||
|
2
src/controls.js
vendored
2
src/controls.js
vendored
@ -693,7 +693,7 @@ _V_.TextTrackDisplay = _V_.Component.extend({
|
||||
|
||||
createElement: function(){
|
||||
return this._super("div", {
|
||||
className: "vjs-" + this.trackType,
|
||||
className: "vjs-" + this.trackType
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -35,7 +35,7 @@ var VideoJS = function(id, addOptions, ready){
|
||||
|
||||
// Element may have a player attr referring to an already created player instance.
|
||||
// If not, set up a new player and return the instance.
|
||||
return tag.player || new _V_.Player(id, addOptions, ready);
|
||||
return tag.player || new _V_.Player(tag, addOptions, ready);
|
||||
},
|
||||
|
||||
// Shortcut
|
||||
|
@ -59,6 +59,7 @@ _V_.extend({
|
||||
}
|
||||
return el;
|
||||
},
|
||||
|
||||
insertFirst: function(node, parent){
|
||||
if (parent.firstChild) {
|
||||
parent.insertBefore(parent.firstChild, node);
|
||||
@ -66,11 +67,13 @@ _V_.extend({
|
||||
parent.appendChild(node);
|
||||
}
|
||||
},
|
||||
|
||||
addClass: function(element, classToAdd){
|
||||
if ((" "+element.className+" ").indexOf(" "+classToAdd+" ") == -1) {
|
||||
element.className = element.className === "" ? classToAdd : element.className + " " + classToAdd;
|
||||
}
|
||||
},
|
||||
|
||||
removeClass: function(element, classToRemove){
|
||||
if (element.className.indexOf(classToRemove) == -1) { return; }
|
||||
var classNames = element.className.split(" ");
|
||||
@ -235,7 +238,7 @@ _V_.extend({
|
||||
try {
|
||||
request.open("GET", url);
|
||||
} catch(e) {
|
||||
_V_.log(e);
|
||||
_V_.log("VideoJS XMLHttpRequest (open)", e);
|
||||
// onError(e);
|
||||
return false;
|
||||
}
|
||||
@ -253,7 +256,7 @@ _V_.extend({
|
||||
try {
|
||||
request.send();
|
||||
} catch(e) {
|
||||
_V_.log(e);
|
||||
_V_.log("VideoJS XMLHttpRequest (send)", e);
|
||||
onError(e);
|
||||
}
|
||||
},
|
||||
|
@ -30,9 +30,9 @@ _V_.Player = _V_.Component.extend({
|
||||
// This fixes the Safari issue by removing the poster, which is currently never used again after
|
||||
// the video starts playing.
|
||||
if (!paused) {
|
||||
options.poster = tag.poster
|
||||
tag.poster = null;
|
||||
tag.play();
|
||||
// options.poster = tag.poster
|
||||
// tag.poster = null;
|
||||
// tag.play();
|
||||
}
|
||||
|
||||
// Give video tag properties to box
|
||||
@ -193,7 +193,6 @@ _V_.Player = _V_.Component.extend({
|
||||
// Add tech element to player div
|
||||
if (this.techs[techName] === undefined) {
|
||||
this.techs[techName] = this.tech = new _V_[techName](this, { source: source });
|
||||
_V_.insertFirst(this.tech.el, this.el);
|
||||
} else {
|
||||
this.tech = this.techs[techName];
|
||||
_V_.insertFirst(this.techs[techName].el, this.el);
|
||||
|
@ -222,15 +222,17 @@ _V_.H5swf = _V_.PlaybackTech.extend({
|
||||
name: "H5swf",
|
||||
|
||||
// swf: "flash/video-js.swf",
|
||||
swf: "https://s3.amazonaws.com/video-js/3.0b/video-js.swf",
|
||||
// swf: "https://s3.amazonaws.com/video-js/3.0b/video-js.swf",
|
||||
// swf: "http://video-js.zencoder.com/3.0b/video-js.swf",
|
||||
swf: "http://video-js.com/test/video-js.swf",
|
||||
// swf: "video-js.swf",
|
||||
|
||||
init: function(player, options){
|
||||
this.player = player;
|
||||
// this.el = this.createElement();
|
||||
|
||||
var source = options.source,
|
||||
placeHolder = _V_.createElement("div", { id: player.el.id + "_temp_h5swf" }),
|
||||
placeHolder = this.el = _V_.createElement("div", { id: player.el.id + "_temp_h5swf" }),
|
||||
objId = player.el.id+"_h5swf_api",
|
||||
|
||||
flashvars = {
|
||||
@ -242,7 +244,7 @@ _V_.H5swf = _V_.PlaybackTech.extend({
|
||||
preload: player.options.preload,
|
||||
loop: player.options.loop,
|
||||
muted: player.options.muted,
|
||||
poster: player.options.poster,
|
||||
poster: player.options.poster
|
||||
},
|
||||
|
||||
params = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user