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

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

Issue 505233002: Add UMA to study the video types for mobile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix logic when checking HLS Created 6 years, 4 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 | « content/renderer/media/android/webmediaplayer_android.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | 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 c3d6cec86548ef4c64e01732abea91c2dbe0b2e4..5d7f5b194bf4e86e4640b7bbc9fc8453eb1a34ec 100644
--- a/content/renderer/media/android/webmediaplayer_android.cc
+++ b/content/renderer/media/android/webmediaplayer_android.cc
@@ -257,6 +257,8 @@ void WebMediaPlayerAndroid::load(LoadType load_type,
UpdateNetworkState(WebMediaPlayer::NetworkStateLoading);
UpdateReadyState(WebMediaPlayer::ReadyStateHaveNothing);
+ UMA_HISTOGRAM_BOOLEAN(
+ "Media.MSE.Playback", player_type_ == MEDIA_PLAYER_TYPE_MEDIA_SOURCE);
}
void WebMediaPlayerAndroid::DidLoadMediaInfo(
@@ -271,7 +273,7 @@ void WebMediaPlayerAndroid::DidLoadMediaInfo(
UpdateNetworkState(WebMediaPlayer::NetworkStateNetworkError);
return;
}
-
+ redirected_url_ = redirected_url;
InitializePlayer(
redirected_url, first_party_for_cookies, allow_stored_credentials, 0);
@@ -991,6 +993,10 @@ void WebMediaPlayerAndroid::InitializePlayer(
const GURL& first_party_for_cookies,
bool allow_stored_credentials,
int demuxer_client_id) {
+ if (player_type_ == MEDIA_PLAYER_TYPE_URL) {
scherkus (not reviewing) 2014/08/28 22:15:09 sanity checking as I want to make sure we get the
qinmin 2014/08/29 16:46:29 Use media extractor will not work: 1. We don't ext
+ UMA_HISTOGRAM_BOOLEAN("Media.Android.IsHttpLiveStreamingMedia",
+ IsHLSStream());
+ }
allow_stored_credentials_ = allow_stored_credentials;
player_manager_->Initialize(
player_type_, player_id_, url, first_party_for_cookies, demuxer_client_id,
@@ -1741,7 +1747,8 @@ bool WebMediaPlayerAndroid::canEnterFullscreen() const {
bool WebMediaPlayerAndroid::IsHLSStream() const {
std::string mime;
- if (!net::GetMimeTypeFromFile(base::FilePath(url_.path()), &mime))
+ GURL url = redirected_url_.is_empty() ? url_ : redirected_url_;
+ if (!net::GetMimeTypeFromFile(base::FilePath(url.path()), &mime))
return false;
return !mime.compare("application/x-mpegurl");
}
« no previous file with comments | « content/renderer/media/android/webmediaplayer_android.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698