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

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

Issue 1987173002: Video Player: Support Media Router to cast Drive videos. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments. Created 4 years, 7 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
Index: ui/file_manager/video_player/js/cast/caster.js
diff --git a/ui/file_manager/video_player/js/cast/caster.js b/ui/file_manager/video_player/js/cast/caster.js
index 50b26dd8d9b129b55a6b36fae0b0d48ab4becf7f..91f6e0fa8bbf3f78f7064351272086d79472712f 100644
--- a/ui/file_manager/video_player/js/cast/caster.js
+++ b/ui/file_manager/video_player/js/cast/caster.js
@@ -132,6 +132,12 @@ function initializeApi() {
* @param {Array<Object>} receivers List of casts.
*/
function onReceiver(availability, receivers) {
+ if (chrome.cast.usingPresentationApi) {
+ player.setCastAvailability(
+ availability === chrome.cast.ReceiverAvailability.AVAILABLE);
+ return;
+ }
+
if (availability === chrome.cast.ReceiverAvailability.AVAILABLE) {
if (!receivers) {
console.error('Receiver list is empty.');
« no previous file with comments | « ui/file_manager/video_player/js/cast/cast_video_element.js ('k') | ui/file_manager/video_player/js/media_controls.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698