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

Side by Side Diff: ui/file_manager/video_player/js/cast/cast_video_element.js

Issue 537863002: Video Player: fix misc bugs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase & fix bugs Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | ui/file_manager/video_player/js/cast/media_manager.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 'use strict'; 5 'use strict';
6 6
7 /** 7 /**
8 * Interval for updating media info (in ms). 8 * Interval for updating media info (in ms).
9 * @type {number} 9 * @type {number}
10 * @const 10 * @const
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 // Resets the error code. 254 // Resets the error code.
255 this.errorCode_ = 0; 255 this.errorCode_ = 0;
256 256
257 Promise.all([ 257 Promise.all([
258 sendTokenPromise, 258 sendTokenPromise,
259 this.mediaManager_.getUrl(), 259 this.mediaManager_.getUrl(),
260 this.mediaManager_.getMime(), 260 this.mediaManager_.getMime(),
261 this.mediaManager_.getThumbnail()]). 261 this.mediaManager_.getThumbnail()]).
262 then(function(results) { 262 then(function(results) {
263 var url = results[1]; 263 var url = results[1];
264 var mime = results[2]; 264 var mime = results[2]; // maybe empty
265 var thumbnailUrl = results[3]; 265 var thumbnailUrl = results[3]; // maybe empty
266 266
267 this.mediaInfo_ = new chrome.cast.media.MediaInfo(url); 267 this.mediaInfo_ = new chrome.cast.media.MediaInfo(url);
268 this.mediaInfo_.contentType = mime; 268 this.mediaInfo_.contentType = mime;
269 this.mediaInfo_.customData = { 269 this.mediaInfo_.customData = {
270 tokenRequired: true, 270 tokenRequired: true,
271 thumbnailUrl: thumbnailUrl, 271 thumbnailUrl: thumbnailUrl,
272 }; 272 };
273 273
274 var request = new chrome.cast.media.LoadRequest(this.mediaInfo_); 274 var request = new chrome.cast.media.LoadRequest(this.mediaInfo_);
275 return new Promise( 275 return new Promise(
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 this.dispatchEvent(new Event('durationchange')); 435 this.dispatchEvent(new Event('durationchange'));
436 } 436 }
437 437
438 // Media is being unloaded. 438 // Media is being unloaded.
439 if (!alive) { 439 if (!alive) {
440 this.unloadMedia_(); 440 this.unloadMedia_();
441 return; 441 return;
442 } 442 }
443 }, 443 },
444 }; 444 };
OLDNEW
« no previous file with comments | « no previous file | ui/file_manager/video_player/js/cast/media_manager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698