videojs_rails 4.2.1 → 4.2.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6bd0944242505ecd665b54fa38fc3370b6eb2ed8
|
4
|
+
data.tar.gz: 56c76e8eed49edd1f99e477afba4940be6236731
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01a0117a1215e70ed20c3155071278c116799624bb6a05febb53414370d05f65f696b543c29c7bd5e9e04471d2d0c61615efdd10e2371ea3675ace0035b27d06
|
7
|
+
data.tar.gz: affd8b10327a06709e46d14ea50c7cbac68263a0e266e304ae7eea0ab0865b21d7c64a9238a4bbddc8304c282c7739ab8f052863d87cb616973f323bd34566d3
|
File without changes
|
@@ -2560,7 +2560,7 @@ vjs.Player.prototype.createEl = function(){
|
|
2560
2560
|
// Remove width/height attrs from tag so CSS can make it 100% width/height
|
2561
2561
|
tag.removeAttribute('width');
|
2562
2562
|
tag.removeAttribute('height');
|
2563
|
-
// Empty video tag
|
2563
|
+
// Empty video tag tracks so the built-in player doesn't use them also.
|
2564
2564
|
// This may not be fast enough to stop HTML5 browsers from reading the tags
|
2565
2565
|
// so we'll need to turn off any default tracks if we're manually doing
|
2566
2566
|
// captions and subtitles. videoElement.textTracks
|
@@ -2574,7 +2574,7 @@ vjs.Player.prototype.createEl = function(){
|
|
2574
2574
|
while (nodesLength--) {
|
2575
2575
|
node = nodes[nodesLength];
|
2576
2576
|
nodeName = node.nodeName.toLowerCase();
|
2577
|
-
if (nodeName === '
|
2577
|
+
if (nodeName === 'track') {
|
2578
2578
|
removeNodes.push(node);
|
2579
2579
|
}
|
2580
2580
|
}
|
@@ -2627,11 +2627,10 @@ vjs.Player.prototype.loadTech = function(techName, source){
|
|
2627
2627
|
if (this.tech) {
|
2628
2628
|
this.unloadTech();
|
2629
2629
|
|
2630
|
-
//
|
2631
|
-
//
|
2630
|
+
// if this is the first time loading, HTML5 tag will exist but won't be initialized
|
2631
|
+
// so we need to remove it if we're not loading HTML5
|
2632
2632
|
} else if (techName !== 'Html5' && this.tag) {
|
2633
|
-
|
2634
|
-
this.tag['player'] = null;
|
2633
|
+
vjs.Html5.disposeMediaElement(this.tag);
|
2635
2634
|
this.tag = null;
|
2636
2635
|
}
|
2637
2636
|
|
@@ -2947,6 +2946,10 @@ vjs.Player.prototype.duration = function(seconds){
|
|
2947
2946
|
return this;
|
2948
2947
|
}
|
2949
2948
|
|
2949
|
+
if (this.cache_.duration === undefined) {
|
2950
|
+
this.onDurationChange();
|
2951
|
+
}
|
2952
|
+
|
2950
2953
|
return this.cache_.duration;
|
2951
2954
|
};
|
2952
2955
|
|
@@ -4510,7 +4513,7 @@ vjs.Html5 = vjs.MediaTechController.extend({
|
|
4510
4513
|
|
4511
4514
|
// If the element source is already set, we may have missed the loadstart event, and want to trigger it.
|
4512
4515
|
// We don't want to set the source again and interrupt playback.
|
4513
|
-
if (source && this.el_.currentSrc
|
4516
|
+
if (source && this.el_.currentSrc === source.src && this.el_.networkState > 0) {
|
4514
4517
|
player.trigger('loadstart');
|
4515
4518
|
|
4516
4519
|
// Otherwise set the source if one was provided.
|
@@ -4550,19 +4553,20 @@ vjs.Html5.prototype.createEl = function(){
|
|
4550
4553
|
var player = this.player_,
|
4551
4554
|
// If possible, reuse original tag for HTML5 playback technology element
|
4552
4555
|
el = player.tag,
|
4553
|
-
newEl
|
4556
|
+
newEl,
|
4557
|
+
clone;
|
4554
4558
|
|
4555
4559
|
// Check if this browser supports moving the element into the box.
|
4556
4560
|
// On the iPhone video will break if you move the element,
|
4557
4561
|
// So we have to create a brand new element.
|
4558
4562
|
if (!el || this.features['movingMediaElementInDOM'] === false) {
|
4559
4563
|
|
4560
|
-
// If the original tag is still there, remove it.
|
4564
|
+
// If the original tag is still there, clone and remove it.
|
4561
4565
|
if (el) {
|
4562
|
-
|
4566
|
+
clone = el.cloneNode(false);
|
4567
|
+
vjs.Html5.disposeMediaElement(el);
|
4568
|
+
el = clone;
|
4563
4569
|
player.tag = null;
|
4564
|
-
player.el().removeChild(el);
|
4565
|
-
el = el.cloneNode(false);
|
4566
4570
|
} else {
|
4567
4571
|
el = vjs.createEl('video', {
|
4568
4572
|
id:player.id() + '_html5_api',
|
@@ -4741,6 +4745,29 @@ vjs.Html5.canControlVolume = function(){
|
|
4741
4745
|
// List of all HTML5 events (various uses).
|
4742
4746
|
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(',');
|
4743
4747
|
|
4748
|
+
vjs.Html5.disposeMediaElement = function(el){
|
4749
|
+
if (!el) { return; }
|
4750
|
+
|
4751
|
+
el['player'] = null;
|
4752
|
+
|
4753
|
+
if (el.parentNode) {
|
4754
|
+
el.parentNode.removeChild(el);
|
4755
|
+
}
|
4756
|
+
|
4757
|
+
// remove any child track or source nodes to prevent their loading
|
4758
|
+
while(el.hasChildNodes()) {
|
4759
|
+
el.removeChild(el.firstChild);
|
4760
|
+
}
|
4761
|
+
|
4762
|
+
// remove any src reference. not setting `src=''` because that causes a warning
|
4763
|
+
// in firefox
|
4764
|
+
el.removeAttribute('src');
|
4765
|
+
|
4766
|
+
// force the media element to update its loading state by calling load()
|
4767
|
+
if (typeof el.load === 'function') {
|
4768
|
+
el.load();
|
4769
|
+
}
|
4770
|
+
};
|
4744
4771
|
|
4745
4772
|
// HTML5 Feature detection and Device Fixes --------------------------------- //
|
4746
4773
|
|