0bac2982 by David LaPalomento

Convert player.hls references to this

When in the scope of the tech, use `this` to reference the tech instead of going through the player.
1 parent ca5e4ffe
...@@ -476,7 +476,7 @@ videojs.Hls.prototype.src = function(src) { ...@@ -476,7 +476,7 @@ videojs.Hls.prototype.src = function(src) {
476 src: videojs.URL.createObjectURL(mediaSource), 476 src: videojs.URL.createObjectURL(mediaSource),
477 type: "video/flv" 477 type: "video/flv"
478 }; 478 };
479 player.hls.mediaSource = mediaSource; 479 this.mediaSource = mediaSource;
480 initSource(player, mediaSource, src); 480 initSource(player, mediaSource, src);
481 this.ready(function() { 481 this.ready(function() {
482 this.el().vjs_src(source.src); 482 this.el().vjs_src(source.src);
...@@ -485,7 +485,7 @@ videojs.Hls.prototype.src = function(src) { ...@@ -485,7 +485,7 @@ videojs.Hls.prototype.src = function(src) {
485 }; 485 };
486 486
487 videojs.Hls.prototype.duration = function() { 487 videojs.Hls.prototype.duration = function() {
488 var playlists = this.player().hls.playlists; 488 var playlists = this.playlists;
489 if (playlists) { 489 if (playlists) {
490 return totalDuration(playlists.media()); 490 return totalDuration(playlists.media());
491 } 491 }
...@@ -493,8 +493,8 @@ videojs.Hls.prototype.duration = function() { ...@@ -493,8 +493,8 @@ videojs.Hls.prototype.duration = function() {
493 }; 493 };
494 494
495 videojs.Hls.prototype.dispose = function() { 495 videojs.Hls.prototype.dispose = function() {
496 if (this.player().hls.playlists) { 496 if (this.playlists) {
497 this.player().hls.playlists.dispose(); 497 this.playlists.dispose();
498 } 498 }
499 videojs.Flash.prototype.dispose.call(this); 499 videojs.Flash.prototype.dispose.call(this);
500 }; 500 };
......