mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 1662212 - Add telemetry to track play time of encrypted HTMLMediaElements. r=drno
Add 3 probes - Play time for encrypted elements. - Play time for Clearkey elements. - Play time for Widevine elements. Differential Revision: https://phabricator.services.mozilla.com/D88895
This commit is contained in:
parent
9fe5fa2214
commit
dad3db465a
@ -4848,6 +4848,29 @@ void HTMLMediaElement::ReportTelemetry() {
|
||||
LOG(LogLevel::Debug,
|
||||
("%p VIDEO_HIDDEN_PLAY_TIME_MS = %f", this, hiddenPlayTime));
|
||||
|
||||
if (this->IsEncrypted()) {
|
||||
Telemetry::Accumulate(Telemetry::VIDEO_ENCRYPTED_PLAY_TIME_MS,
|
||||
SECONDS_TO_MS(playTime));
|
||||
LOG(LogLevel::Debug,
|
||||
("%p VIDEO_ENCRYPTED_PLAY_TIME_MS = %f", this, playTime));
|
||||
}
|
||||
|
||||
if (mMediaKeys) {
|
||||
nsAutoString keySystem;
|
||||
mMediaKeys->GetKeySystem(keySystem);
|
||||
if (IsClearkeyKeySystem(keySystem)) {
|
||||
Telemetry::Accumulate(Telemetry::VIDEO_CLEARKEY_PLAY_TIME_MS,
|
||||
SECONDS_TO_MS(playTime));
|
||||
LOG(LogLevel::Debug,
|
||||
("%p VIDEO_CLEARKEY_PLAY_TIME_MS = %f", this, playTime));
|
||||
} else if (IsWidevineKeySystem(keySystem)) {
|
||||
Telemetry::Accumulate(Telemetry::VIDEO_WIDEVINE_PLAY_TIME_MS,
|
||||
SECONDS_TO_MS(playTime));
|
||||
LOG(LogLevel::Debug,
|
||||
("%p VIDEO_WIDEVINE_PLAY_TIME_MS = %f", this, playTime));
|
||||
}
|
||||
}
|
||||
|
||||
if (playTime > 0.0) {
|
||||
// We have actually played something -> Report some valid-video telemetry.
|
||||
|
||||
|
@ -12409,6 +12409,42 @@
|
||||
"n_buckets": 50,
|
||||
"bug_numbers": [1287987, 1570634]
|
||||
},
|
||||
"VIDEO_ENCRYPTED_PLAY_TIME_MS" : {
|
||||
"record_in_processes": ["content"],
|
||||
"products": ["firefox"],
|
||||
"alert_emails": ["bvandyk@mozilla.com", "drno@ohlmeier.org"],
|
||||
"expires_in_version": "never",
|
||||
"description": "Total time spent playing encrypted video in milliseconds. This reports the total play time for an HTML Media Element playing encrypted content whenever it is suspended, such as when the page is unloaded.",
|
||||
"kind": "exponential",
|
||||
"high": 7200000,
|
||||
"n_buckets": 100,
|
||||
"bug_numbers": [1662212],
|
||||
"releaseChannelCollection": "opt-out"
|
||||
},
|
||||
"VIDEO_CLEARKEY_PLAY_TIME_MS" : {
|
||||
"record_in_processes": ["content"],
|
||||
"products": ["firefox"],
|
||||
"alert_emails": ["bvandyk@mozilla.com", "drno@ohlmeier.org"],
|
||||
"expires_in_version": "never",
|
||||
"description": "Total time spent playing Clearkey encrypted video in milliseconds. This reports the total play time for an HTML Media Element playing Clearkey encrypted content whenever it is suspended, such as when the page is unloaded.",
|
||||
"kind": "exponential",
|
||||
"high": 7200000,
|
||||
"n_buckets": 100,
|
||||
"bug_numbers": [1662212],
|
||||
"releaseChannelCollection": "opt-out"
|
||||
},
|
||||
"VIDEO_WIDEVINE_PLAY_TIME_MS" : {
|
||||
"record_in_processes": ["content"],
|
||||
"products": ["firefox"],
|
||||
"alert_emails": ["bvandyk@mozilla.com", "drno@ohlmeier.org"],
|
||||
"expires_in_version": "never",
|
||||
"description": "Total time spent playing Widevine encrypted video in milliseconds. This reports the total play time for an HTML Media Element playing Widevine encrypted content whenever it is suspended, such as when the page is unloaded.",
|
||||
"kind": "exponential",
|
||||
"high": 7200000,
|
||||
"n_buckets": 100,
|
||||
"bug_numbers": [1662212],
|
||||
"releaseChannelCollection": "opt-out"
|
||||
},
|
||||
"VIDEO_INFERRED_DECODE_SUSPEND_PERCENTAGE" : {
|
||||
"record_in_processes": ["content"],
|
||||
"products": ["firefox"],
|
||||
|
Loading…
Reference in New Issue
Block a user