mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 1148092 - Telemetry for EME playback success/failure - r=cpearce,bsmedberg
This commit is contained in:
parent
dcc916e6ac
commit
12fa2513ff
@ -640,6 +640,14 @@ void HTMLMediaElement::ShutdownDecoder()
|
||||
|
||||
void HTMLMediaElement::AbortExistingLoads()
|
||||
{
|
||||
#ifdef MOZ_EME
|
||||
// If there is no existing decoder then we don't have anything to
|
||||
// report. This prevents reporting the initial load from an
|
||||
// empty video element as a failed EME load.
|
||||
if (mDecoder) {
|
||||
ReportEMETelemetry();
|
||||
}
|
||||
#endif
|
||||
// Abort any already-running instance of the resource selection algorithm.
|
||||
mLoadWaitStatus = NOT_WAITING;
|
||||
|
||||
@ -2541,6 +2549,20 @@ nsresult HTMLMediaElement::BindToTree(nsIDocument* aDocument, nsIContent* aParen
|
||||
return rv;
|
||||
}
|
||||
|
||||
#ifdef MOZ_EME
|
||||
void
|
||||
HTMLMediaElement::ReportEMETelemetry()
|
||||
{
|
||||
// Report telemetry for EME videos when a page is unloaded.
|
||||
NS_ASSERTION(NS_IsMainThread(), "Should be on main thread.");
|
||||
if (mIsEncrypted && Preferences::GetBool("media.eme.enabled")) {
|
||||
Telemetry::Accumulate(Telemetry::VIDEO_EME_PLAY_SUCCESS, mLoadedDataFired);
|
||||
LOG(PR_LOG_DEBUG, ("%p VIDEO_EME_PLAY_SUCCESS = %s",
|
||||
this, mLoadedDataFired ? "true" : "false"));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
HTMLMediaElement::ReportMSETelemetry()
|
||||
{
|
||||
@ -3781,6 +3803,9 @@ void HTMLMediaElement::SuspendOrResumeElement(bool aPauseElement, bool aSuspendE
|
||||
if (aPauseElement) {
|
||||
if (mMediaSource) {
|
||||
ReportMSETelemetry();
|
||||
#ifdef MOZ_EME
|
||||
ReportEMETelemetry();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef MOZ_EME
|
||||
|
@ -978,6 +978,9 @@ protected:
|
||||
return isPaused;
|
||||
}
|
||||
|
||||
#ifdef MOZ_EME
|
||||
void ReportEMETelemetry();
|
||||
#endif
|
||||
void ReportMSETelemetry();
|
||||
|
||||
// Check the permissions for audiochannel.
|
||||
|
@ -7469,6 +7469,11 @@
|
||||
"n_buckets": 16,
|
||||
"description": "The number of entries in persistent DataStorage (HSTS and HPKP data, basically)"
|
||||
},
|
||||
"VIDEO_EME_PLAY_SUCCESS": {
|
||||
"expires_in_version": "45",
|
||||
"kind": "boolean",
|
||||
"description": "EME video playback success or failure"
|
||||
},
|
||||
"VIDEO_MSE_JOIN_LATENCY_MS" : {
|
||||
"expires_in_version": "45",
|
||||
"description": "Time in MS between MSE video load and playback",
|
||||
|
Loading…
Reference in New Issue
Block a user