Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Videojs 4.11.4 #129

Merged
merged 2 commits into from
Feb 3, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions public/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,11 @@ $(window).load(function() {

var maxTimeToPlayTrack = soundtrack.settings.maxTimeToPlaySource;
var ensureTrackPlaying = setInterval(function() {
if (soundtrack.player.currentTime() > 0 || !sources.length) {
console.log('track is playing (yay!), or there are no remaining sources (boo). clearing interval.');
if (!sources.length) {
console.log('sources length is zero. sad day. failing out.');
clearInterval( ensureTrackPlaying );
} else if (soundtrack.player.currentTime() > 0) {
console.log('track is playing (yay!). clearing interval.');
clearInterval( ensureTrackPlaying )
} else {
console.log('track is NOT playing after %dms... advancing to next source', maxTimeToPlayTrack);
Expand Down
2 changes: 1 addition & 1 deletion public/video-js/video-js.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
Video.js Default Styles (http://videojs.com)
Version 4.11.2
Version 4.11.4
Create your own skin at http://designer.videojs.com
*/
/* SKIN
Expand Down
2 changes: 1 addition & 1 deletion public/video-js/video-js.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified public/video-js/video-js.swf
Binary file not shown.
33 changes: 23 additions & 10 deletions public/video-js/video.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -2122,8 +2122,8 @@ vjs.Component.prototype.removeChild = function(component){

if (!childFound) return;

this.childIndex_[component.id] = null;
this.childNameIndex_[component.name] = null;
this.childIndex_[component.id()] = null;
this.childNameIndex_[component.name()] = null;

var compEl = component.el();
if (compEl && compEl.parentNode === this.contentEl()) {
Expand Down Expand Up @@ -3409,7 +3409,6 @@ vjs.MenuButton.prototype.onClick = function(){
};

vjs.MenuButton.prototype.onKeyPress = function(event){
event.preventDefault();

// Check for space bar (32) or enter (13) keys
if (event.which == 32 || event.which == 13) {
Expand All @@ -3418,11 +3417,13 @@ vjs.MenuButton.prototype.onKeyPress = function(event){
} else {
this.pressButton();
}
event.preventDefault();
// Check for escape (27) key
} else if (event.which == 27){
if (this.buttonPressed_){
this.unpressButton();
}
event.preventDefault();
}
};

Expand Down Expand Up @@ -6787,6 +6788,7 @@ vjs.Html5.prototype.createEl = function(){
var player = this.player_,
// If possible, reuse original tag for HTML5 playback technology element
el = player.tag,
attributes,
newEl,
clone;

Expand All @@ -6803,8 +6805,15 @@ vjs.Html5.prototype.createEl = function(){
player.tag = null;
} else {
el = vjs.createEl('video');

// determine if native controls should be used
attributes = videojs.util.mergeOptions({}, player.tagAttributes);
if (!vjs.TOUCH_ENABLED || player.options()['nativeControlsForTouch'] !== true) {
delete attributes.controls;
}

vjs.setElementAttributes(el,
vjs.obj.merge(player.tagAttributes || {}, {
vjs.obj.merge(attributes, {
id:player.id() + '_html5_api',
'class':'vjs-tech'
})
Expand Down Expand Up @@ -7036,13 +7045,13 @@ vjs.Html5.nativeSourceHandler = {};
* @return {String} 'probably', 'maybe', or '' (empty string)
*/
vjs.Html5.nativeSourceHandler.canHandleSource = function(source){
var ext;
var match, ext;

function canPlayType(type){
// IE9 on Windows 7 without MediaPlayer throws an error here
// https://github.com/videojs/video.js/issues/519
try {
return !!vjs.TEST_VID.canPlayType(type);
return vjs.TEST_VID.canPlayType(type);
} catch(e) {
return '';
}
Expand All @@ -7051,11 +7060,15 @@ vjs.Html5.nativeSourceHandler.canHandleSource = function(source){
// If a type was provided we should rely on that
if (source.type) {
return canPlayType(source.type);
} else {
} else if (source.src) {
// If no type, fall back to checking 'video/[EXTENSION]'
ext = source.src.match(/\.([^\/\?]+)(\?[^\/]+)?$/i)[1];
match = source.src.match(/\.([^.\/\?]+)(\?[^\/]+)?$/i);
ext = match && match[1];

return canPlayType('video/'+ext);
}

return '';
};

/**
Expand Down Expand Up @@ -7718,8 +7731,8 @@ vjs.Flash.rtmpSourceHandler.canHandleSource = function(source){
vjs.Flash.rtmpSourceHandler.handleSource = function(source, tech){
var srcParts = vjs.Flash.streamToParts(source.src);

tech.setRtmpConnection(srcParts.connection);
tech.setRtmpStream(srcParts.stream);
tech['setRtmpConnection'](srcParts.connection);
tech['setRtmpStream'](srcParts.stream);
};

// Register the native source handler
Expand Down
Loading