diff --git a/dom/media/DecoderTraits.cpp b/dom/media/DecoderTraits.cpp index f36e419c1805..a300cd8c3ccd 100644 --- a/dom/media/DecoderTraits.cpp +++ b/dom/media/DecoderTraits.cpp @@ -143,8 +143,12 @@ static CanPlayStatus CanHandleCodecsType( static CanPlayStatus CanHandleMediaType( const MediaContainerType& aType, DecoderDoctorDiagnostics* aDiagnostics) { + if (DecoderTraits::IsHttpLiveStreamingType(aType)) { + Telemetry::Accumulate(Telemetry::MEDIA_HLS_CANPLAY_REQUESTED, true); + } #ifdef MOZ_ANDROID_HLS_SUPPORT if (HLSDecoder::IsSupportedType(aType)) { + Telemetry::Accumulate(Telemetry::MEDIA_HLS_CANPLAY_SUPPORTED, true); return CANPLAY_MAYBE; } #endif diff --git a/toolkit/components/telemetry/Histograms.json b/toolkit/components/telemetry/Histograms.json index 866559dac5e7..1eecd5dc02c6 100644 --- a/toolkit/components/telemetry/Histograms.json +++ b/toolkit/components/telemetry/Histograms.json @@ -9402,6 +9402,24 @@ "description": "Reports a true value when a page requests canPlayType for a matroska media type.", "bug_numbers": [1429986, 1570634, 1606206] }, + "MEDIA_HLS_CANPLAY_REQUESTED": { + "record_in_processes": ["content"], + "products": ["firefox", "geckoview"], + "alert_emails": ["jolin@mozilla.com", "bvandyk@mozilla.com"], + "expires_in_version": "85", + "kind": "boolean", + "description": "Reports a true value when a page requests canPlayType for a HLS media type.", + "bug_numbers": [1628048] + }, + "MEDIA_HLS_CANPLAY_SUPPORTED": { + "record_in_processes": ["content"], + "products": ["firefox", "geckoview"], + "alert_emails": ["jolin@mozilla.com", "bvandyk@mozilla.com"], + "expires_in_version": "85", + "kind": "boolean", + "description": "Reports a true value when a canPlayType request supports HLS.", + "bug_numbers": [1628048] + }, "MEDIA_MP4_PARSE_SAMPLE_DESCRIPTION_ENTRIES_HAVE_MULTIPLE_CODECS": { "record_in_processes": ["main", "content"], "products": ["firefox", "fennec", "geckoview"],