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

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

Issue 603413003: Correct condition and flag state for skipping PLAY request. (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 | « no previous file | 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/cast/cast_video_element.js
diff --git a/ui/file_manager/video_player/js/cast/cast_video_element.js b/ui/file_manager/video_player/js/cast/cast_video_element.js
index 6e0708c56309032fd84785b8a4cd59bba69ce304..53abbd0d35fd46260b64029582e79e0714d995ff 100644
--- a/ui/file_manager/video_player/js/cast/cast_video_element.js
+++ b/ui/file_manager/video_player/js/cast/cast_video_element.js
@@ -224,8 +224,12 @@ CastVideoElement.prototype = {
return;
var play = function() {
+ // If the casted media is already playing and a pause request is not in
+ // progress, we can skip this play request.
if (this.castMedia_.playerState ===
- chrome.cast.media.PlayerState.PLAYING) {
+ chrome.cast.media.PlayerState.PLAYING &&
+ !this.pauseInProgress_) {
+ this.playInProgress_ = false;
return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698