Skip to content

Commit

Permalink
Use the local Player for offline Storage
Browse files Browse the repository at this point in the history
It makes no sense to refer to the Cast-proxied Player for offline
storage, so explicitly refer to the local Player instead.

Issue #261

Change-Id: I6b4e0cb828489724d334362d6e15da3d3ea12719
  • Loading branch information
joeyparrish committed Jul 6, 2016
1 parent a02c851 commit edae3a4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions demo/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ shakaDemo.video_ = null;
shakaDemo.player_ = null;


/** @private {shaka.Player} */
shakaDemo.localPlayer_ = null;


/** @private {shakaExtern.SupportType} */
shakaDemo.support_;

Expand Down Expand Up @@ -133,6 +137,7 @@ shakaDemo.init = function() {
shakaDemo.video_ = shakaDemo.castProxy_.getVideo();
shakaDemo.player_ = shakaDemo.castProxy_.getPlayer();
shakaDemo.player_.addEventListener('error', shakaDemo.onErrorEvent_);
shakaDemo.localPlayer_ = localPlayer;

shakaDemo.setupAssets_();
shakaDemo.setupOffline_();
Expand Down
2 changes: 1 addition & 1 deletion demo/offline_section.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ shakaDemo.setupOfflineAssets_ = function() {
group = shakaDemo.offlineOptGroup_;
}

var db = new Storage(shakaDemo.player_);
var db = new Storage(shakaDemo.localPlayer_);
return db.list().then(function(storedContents) {
storedContents.forEach(function(storedContent) {
for (var i = 0; i < assetList.options.length; i++) {
Expand Down

0 comments on commit edae3a4

Please sign in to comment.