Commit 75d52a68 authored by yoshiki@chromium.org's avatar yoshiki@chromium.org

Video Player: Show appropriate message on playing unsupported video

Show "This video could not be loaded" error on playing unsupported video.

BUG=405860
TEST=manually testted

Review URL: https://codereview.chromium.org/495003002

Cr-Commit-Position: refs/heads/master@{#291371}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291371 0039d316-1c4b-4281-b951-d872f2087c98
parent b48fe9ee
...@@ -101,11 +101,18 @@ FullWindowVideoControls.prototype.showErrorMessage = function(message) { ...@@ -101,11 +101,18 @@ FullWindowVideoControls.prototype.showErrorMessage = function(message) {
/** /**
* Handles playback (decoder) errors. * Handles playback (decoder) errors.
* @param {MediaError} error Error object.
* @private * @private
*/ */
FullWindowVideoControls.prototype.onPlaybackError_ = function() { FullWindowVideoControls.prototype.onPlaybackError_ = function(error) {
this.showErrorMessage('GALLERY_VIDEO_DECODING_ERROR'); if (error.target &&
this.decodeErrorOccured = true; error.target.error.code === MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED) {
this.showErrorMessage('GALLERY_VIDEO_ERROR');
this.decodeErrorOccured = false;
} else {
this.showErrorMessage('GALLERY_VIDEO_DECODING_ERROR');
this.decodeErrorOccured = true;
}
// Disable inactivity watcher, and disable the ui, by hiding tools manually. // Disable inactivity watcher, and disable the ui, by hiding tools manually.
this.inactivityWatcher.disabled = true; this.inactivityWatcher.disabled = true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment