Commit a4999dd4 authored by yoshiki's avatar yoshiki Committed by Commit bot

Video Player: Close the session when the other device is selected to play

BUG=408520
TEST=manually tested

Review URL: https://codereview.chromium.org/514163002

Cr-Commit-Position: refs/heads/master@{#292580}
parent aefdf297
......@@ -503,9 +503,15 @@ VideoPlayer.prototype.onCastSelected_ = function(cast) {
if ((this.currentCast_ && this.currentCast_.label) === (cast && cast.label))
return;
this.currentCast_ = cast || null;
this.updateCheckOnCastMenu_();
this.reloadCurrentVideo();
this.unloadVideo(false);
// Waits for unloading video.
this.loadQueue_.run(function(callback) {
this.currentCast_ = cast || null;
this.updateCheckOnCastMenu_();
this.reloadCurrentVideo();
callback();
}.wrap(this));
};
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment