Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(459)

Unified Diff: ui/file_manager/video_player/js/video_player.js

Issue 410043003: Video Player: Use Google Cast API extension instead of deprecated way (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed the comment Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/file_manager/video_player/js/cast/caster.js ('k') | ui/file_manager/video_player/manifest.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/video_player/js/video_player.js
diff --git a/ui/file_manager/video_player/js/video_player.js b/ui/file_manager/video_player/js/video_player.js
index 81ba71bede20c22d6a21180d5772b45e5741eb3b..73ada6a9ec31cbb54db85af69c0253b1d11bd92f 100644
--- a/ui/file_manager/video_player/js/video_player.js
+++ b/ui/file_manager/video_player/js/video_player.js
@@ -280,8 +280,9 @@ VideoPlayer.prototype.loadVideo_ = function(url, title, opt_callback) {
this.controls.attachMedia(this.videoElement_);
document.querySelector('#cast-name-label').textContent =
- loadTimeData.getString('VIDEO_PLAYER_PLAYING_ON');;
- document.querySelector('#cast-name').textContent = this.currentCast_.name;
+ loadTimeData.getString('VIDEO_PLAYER_PLAYING_ON');
+ document.querySelector('#cast-name').textContent =
+ this.currentCast_.friendlyName;
} else {
videoPlayerElement.removeAttribute('casting');
@@ -400,7 +401,7 @@ VideoPlayer.prototype.reloadCurrentVideo_ = function(opt_callback) {
*/
VideoPlayer.prototype.onCastSelected_ = function(cast) {
// If the selected item is same as the current item, do nothing.
- if ((this.currentCast_ && this.currentCast_.name) === (cast && cast.name))
+ if ((this.currentCast_ && this.currentCast_.label) === (cast && cast.label))
return;
this.currentCast_ = cast || null;
@@ -434,7 +435,7 @@ VideoPlayer.prototype.setCastList = function(casts) {
for (var i = 0; i < casts.length; i++) {
var item = new cr.ui.MenuItem();
- item.label = casts[i].name;
+ item.label = casts[i].friendlyName;
item.addEventListener('activate',
this.onCastSelected_.wrap(this, casts[i]));
menu.appendChild(item);
« no previous file with comments | « ui/file_manager/video_player/js/cast/caster.js ('k') | ui/file_manager/video_player/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698