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

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

Issue 545233002: Video Player: Change error string when casting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/extensions/file_manager/private_api_strings.cc ('k') | no next file » | 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 6ea56b53d45e457b521c4d77b698ab7bd989b7b9..99b44885f5faf418011f92bdef76ec4a652ce65e 100644
--- a/ui/file_manager/video_player/js/video_player.js
+++ b/ui/file_manager/video_player/js/video_player.js
@@ -22,6 +22,8 @@ function FullWindowVideoControls(
this.playerContainer_ = playerContainer;
this.decodeErrorOccured = false;
+ this.casting = false;
+
this.updateStyle();
window.addEventListener('resize', this.updateStyle.wrap(this));
document.addEventListener('keydown', function(e) {
@@ -107,7 +109,10 @@ FullWindowVideoControls.prototype.showErrorMessage = function(message) {
FullWindowVideoControls.prototype.onPlaybackError_ = function(error) {
if (error.target && error.target.error &&
error.target.error.code === MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED) {
- this.showErrorMessage('GALLERY_VIDEO_ERROR');
+ if (this.casting)
+ this.showErrorMessage('VIDEO_PLAYER_VIDEO_FILE_UNSUPPORTED_FOR_CAST');
+ else
+ this.showErrorMessage('GALLERY_VIDEO_ERROR');
this.decodeErrorOccured = false;
} else {
this.showErrorMessage('GALLERY_VIDEO_DECODING_ERROR');
@@ -301,6 +306,7 @@ VideoPlayer.prototype.loadVideo_ = function(video, opt_callback) {
document.querySelector('#error').removeAttribute('visible');
this.controls.inactivityWatcher.disabled = true;
this.controls.decodeErrorOccured = false;
+ this.controls.casting = !!this.currentCast_;
videoPlayerElement.setAttribute('loading', true);
« no previous file with comments | « chrome/browser/chromeos/extensions/file_manager/private_api_strings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698