videojs_rails 4.12.9 → 4.12.10

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: d7844e04433a4dc9a759199cadd70274072341ca
4
- data.tar.gz: 1b3bafb8f19fda714b252fa4ffad6ce55ffe616a
3
+ metadata.gz: 214118d649059fb283d024275de94e0f927da297
4
+ data.tar.gz: 119f38605ef976e1336e0385fab186340e196cd7
5
5
  SHA512:
6
- metadata.gz: c4a28dcf3155328c69538590c5bd804f0c730cd54fc8734f185b78eb29bf1cc0f9b95523ab62ce7bba4fdc05f659202db23521ac112a2804dc8f6c4a6e0b3b8c
7
- data.tar.gz: d7bce6cca74210ce229c10a6f46bab097a8302ff885fd72a3bd9833ed9ab5fbfca57a3d31bb1a446156fe199d1684d2ba830ffd9cf634eeea79b5d531cfcc724
6
+ metadata.gz: 0028d7e6c8bb634d76e477b7e8d098acac196f7b749b01ecbf395efcaab89a54ae0f42af3e56447e25dc43d4f414ee2ccbb474227283cc468d35be0d9b9680f4
7
+ data.tar.gz: b726cd4911e1cbb778b825a4601bcab726e3ef9850bd01a37111afb45765395648f483d15fc812e27016cc71a5b6f4347407bb52f2f459aec7f6973c1952717e
@@ -1,3 +1,3 @@
1
1
  module VideojsRails
2
- VERSION = '4.12.9'
2
+ VERSION = '4.12.10'
3
3
  end
@@ -80,7 +80,7 @@ vjs.ACCESS_PROTOCOL = ('https:' == document.location.protocol ? 'https://' : 'ht
80
80
  * Full player version
81
81
  * @type {string}
82
82
  */
83
- vjs['VERSION'] = '4.12.9';
83
+ vjs['VERSION'] = '4.12.10';
84
84
 
85
85
  /**
86
86
  * Global Player instance options, surfaced from vjs.Player.prototype.options_
@@ -4931,12 +4931,7 @@ vjs.Player.prototype.load = function(){
4931
4931
  * @return {String} The current source
4932
4932
  */
4933
4933
  vjs.Player.prototype.currentSrc = function(){
4934
- var techSrc = this.techGet('currentSrc');
4935
-
4936
- if (techSrc === undefined) {
4937
- return this.cache_.src || '';
4938
- }
4939
- return techSrc;
4934
+ return this.techGet('currentSrc') || this.cache_.src || '';
4940
4935
  };
4941
4936
 
4942
4937
  /**
@@ -6594,8 +6589,6 @@ vjs.MediaTechController = vjs.Component.extend({
6594
6589
  this.emulateTextTracks();
6595
6590
  }
6596
6591
 
6597
- this.on('loadstart', this.updateCurrentSource_);
6598
-
6599
6592
  this.initTextTrackListeners();
6600
6593
  }
6601
6594
  });
@@ -6728,24 +6721,6 @@ vjs.MediaTechController.prototype.onTap = function(){
6728
6721
  this.player().userActive(!this.player().userActive());
6729
6722
  };
6730
6723
 
6731
- /**
6732
- * Set currentSource_ asynchronously to simulate the media element's
6733
- * asynchronous execution of the `resource selection algorithm`
6734
- *
6735
- * currentSource_ is set either as the first loadstart event OR
6736
- * in a timeout to make sure it is set asynchronously before anything else
6737
- * but before other loadstart handlers have had a chance to execute
6738
- */
6739
- vjs.MediaTechController.prototype.updateCurrentSource_ = function () {
6740
- // We could have been called with a 0-ms setTimeout OR via loadstart (which ever
6741
- // happens first) so we should clear the timeout to be a good citizen
6742
- this.clearTimeout(this.updateSourceTimer_);
6743
-
6744
- if (this.pendingSource_) {
6745
- this.currentSource_ = this.pendingSource_;
6746
- }
6747
- };
6748
-
6749
6724
  /* Fallbacks for unsupported event types
6750
6725
  ================================================================================ */
6751
6726
  // Manually trigger progress events based on changes to the buffered amount
@@ -7004,8 +6979,6 @@ vjs.MediaTechController.prototype['featuresNativeTextTracks'] = false;
7004
6979
  *
7005
6980
  */
7006
6981
  vjs.MediaTechController.withSourceHandlers = function(Tech){
7007
- Tech.prototype.currentSource_ = {src: ''};
7008
-
7009
6982
  /**
7010
6983
  * Register a source handler
7011
6984
  * Source handlers are scripts for handling specific formats.
@@ -7090,12 +7063,7 @@ vjs.MediaTechController.withSourceHandlers = function(Tech){
7090
7063
  this.disposeSourceHandler();
7091
7064
  this.off('dispose', this.disposeSourceHandler);
7092
7065
 
7093
- // Schedule currentSource_ to be set asynchronously
7094
- if (source && source.src !== '') {
7095
- this.pendingSource_ = source;
7096
- this.updateSourceTimer_ = this.setTimeout(vjs.bind(this, this.updateCurrentSource_), 0);
7097
- }
7098
-
7066
+ this.currentSource_ = source;
7099
7067
  this.sourceHandler_ = sh.handleSource(source, this);
7100
7068
  this.on('dispose', this.disposeSourceHandler);
7101
7069
 
@@ -7432,10 +7400,27 @@ vjs.Html5.prototype.exitFullScreen = function(){
7432
7400
  this.el_.webkitExitFullScreen();
7433
7401
  };
7434
7402
 
7403
+ // Checks to see if the element's reported URI (either from `el_.src`
7404
+ // or `el_.currentSrc`) is a blob-uri and, if so, returns the uri that
7405
+ // was passed into the source-handler when it was first invoked instead
7406
+ // of the blob-uri
7407
+ vjs.Html5.prototype.returnOriginalIfBlobURI_ = function (elementURI, originalURI) {
7408
+ var blobURIRegExp = /^blob\:/i;
7409
+
7410
+ // If originalURI is undefined then we are probably in a non-source-handler-enabled
7411
+ // tech that inherits from the Html5 tech so we should just return the elementURI
7412
+ // regardless of it's blobby-ness
7413
+ if (originalURI && elementURI && blobURIRegExp.test(elementURI)) {
7414
+ return originalURI;
7415
+ }
7416
+ return elementURI;
7417
+ };
7435
7418
 
7436
7419
  vjs.Html5.prototype.src = function(src) {
7420
+ var elementSrc = this.el_.src;
7421
+
7437
7422
  if (src === undefined) {
7438
- return this.el_.src;
7423
+ return this.returnOriginalIfBlobURI_(elementSrc, this.source_);
7439
7424
  } else {
7440
7425
  // Setting src through `src` instead of `setSrc` will be deprecated
7441
7426
  this.setSrc(src);
@@ -7448,11 +7433,13 @@ vjs.Html5.prototype.setSrc = function(src) {
7448
7433
 
7449
7434
  vjs.Html5.prototype.load = function(){ this.el_.load(); };
7450
7435
  vjs.Html5.prototype.currentSrc = function(){
7451
- if (this.currentSource_) {
7452
- return this.currentSource_.src;
7453
- } else {
7454
- return this.el_.currentSrc;
7436
+ var elementSrc = this.el_.currentSrc;
7437
+
7438
+ if (!this.currentSource_) {
7439
+ return elementSrc;
7455
7440
  }
7441
+
7442
+ return this.returnOriginalIfBlobURI_(elementSrc, this.currentSource_.src);
7456
7443
  };
7457
7444
 
7458
7445
  vjs.Html5.prototype.poster = function(){ return this.el_.poster; };
@@ -7588,6 +7575,28 @@ vjs.Html5.isSupported = function(){
7588
7575
  // Add Source Handler pattern functions to this tech
7589
7576
  vjs.MediaTechController.withSourceHandlers(vjs.Html5);
7590
7577
 
7578
+ /*
7579
+ * Override the withSourceHandler mixin's methods with our own because
7580
+ * the HTML5 Media Element returns blob urls when utilizing MSE and we
7581
+ * want to still return proper source urls even when in that case
7582
+ */
7583
+ (function(){
7584
+ var
7585
+ origSetSource = vjs.Html5.prototype.setSource,
7586
+ origDisposeSourceHandler = vjs.Html5.prototype.disposeSourceHandler;
7587
+
7588
+ vjs.Html5.prototype.setSource = function (source) {
7589
+ var retVal = origSetSource.call(this, source);
7590
+ this.source_ = source.src;
7591
+ return retVal;
7592
+ };
7593
+
7594
+ vjs.Html5.prototype.disposeSourceHandler = function () {
7595
+ this.source_ = undefined;
7596
+ return origDisposeSourceHandler.call(this);
7597
+ };
7598
+ })();
7599
+
7591
7600
  /**
7592
7601
  * The default native source handler.
7593
7602
  * This simply passes the source to the video element. Nothing fancy.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  Video.js Default Styles (http://videojs.com)
3
- Version 4.12.9
3
+ Version 4.12.10
4
4
  Create your own skin at http://designer.videojs.com
5
5
  */
6
6
  /* SKIN
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: videojs_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.12.9
4
+ version: 4.12.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Behan