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 9ccc5284241a4e6633467b9c3267ecc1ad3e27ed..4b5cd5cb7d78fbf45287187d137f6d6603a70f19 100644 |
--- a/ui/file_manager/video_player/js/cast/caster.js |
+++ b/ui/file_manager/video_player/js/cast/caster.js |
@@ -15,10 +15,12 @@ window.__defineGetter__('localStorage', function() { return {}; }); |
var APPLICATION_ID = '214CC863'; |
util.addPageLoadHandler(function() { |
- // TODO(yoshiki): Check if the Google Cast extension is installed or not. |
- // If not installed, we should skip all cast-related functionality. |
- |
- loadCastAPI(initializeApi); |
+ CastExtensionDiscoverer.findInstalledExtension(function(foundId) { |
+ if (foundId) |
+ loadCastAPI(initializeApi); |
+ else |
+ console.info('No Google Cast extension is installed.'); |
+ }); |
}); |
/** |