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

Unified Diff: content/renderer/media/android/webmediaplayer_android.cc

Issue 23797004: Sets the media element network state to idle until playback is requested. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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: content/renderer/media/android/webmediaplayer_android.cc
diff --git a/content/renderer/media/android/webmediaplayer_android.cc b/content/renderer/media/android/webmediaplayer_android.cc
index 5adbee7b4e482fd0ca667aea2bbb0a37e1490495..6484f1f61689ae5f7532e63bd8c5cd680b26ec5d 100644
--- a/content/renderer/media/android/webmediaplayer_android.cc
+++ b/content/renderer/media/android/webmediaplayer_android.cc
@@ -294,6 +294,9 @@ void WebMediaPlayerAndroid::DidLoadMediaInfo(
UpdateReadyState(WebMediaPlayer::ReadyStateHaveMetadata);
UpdateReadyState(WebMediaPlayer::ReadyStateHaveEnoughData);
}
+ // Android doesn't start fetching resources until an implementation-defined
+ // event (e.g. playback request) occurs. Sets to the network state to IDLE.
+ UpdateNetworkState(WebMediaPlayer::NetworkStateIdle);
qinmin 2013/09/03 14:22:46 this is an optional step in HTML5 spec, do we real
Jinsuk Kim 2013/09/04 01:32:03 Though optional, I see benefit in having this - it
qinmin 2013/09/04 14:10:12 can you run all the layout test with content shell
Jinsuk Kim 2013/09/13 05:50:06 Ran the tests and confirmed there's no regression.
}
void WebMediaPlayerAndroid::play() {
@@ -312,6 +315,7 @@ void WebMediaPlayerAndroid::play() {
if (paused())
proxy_->Start(player_id_);
UpdatePlayingState(true);
+ UpdateNetworkState(WebMediaPlayer::NetworkStateLoading);
}
void WebMediaPlayerAndroid::pause() {
« 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