mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 1846848 - part8 : display clear lead support. r=jolin,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D195058
This commit is contained in:
parent
9445349b18
commit
15a965b141
@ -1099,4 +1099,5 @@ dictionary LibcConstants {
|
|||||||
dictionary CDMInformation {
|
dictionary CDMInformation {
|
||||||
required DOMString keySystemName;
|
required DOMString keySystemName;
|
||||||
required DOMString capabilities;
|
required DOMString capabilities;
|
||||||
|
required boolean clearlead;
|
||||||
};
|
};
|
||||||
|
@ -188,4 +188,21 @@ void MFCDMCapabilitiesIPDLToKeySystemConfig(
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
bool DoesKeySystemSupportClearLead(const nsAString& aKeySystem) {
|
||||||
|
// I believe that Widevine L3 supports clear-lead, but I couldn't find any
|
||||||
|
// official documentation to prove that. The only one I can find is that Shaka
|
||||||
|
// player mentions the clear lead feature. So we expect L3 should have that as
|
||||||
|
// well. But for HWDRM, Widevine L1 and SL3000 needs to rely on special checks
|
||||||
|
// to know whether clearlead is supported. That will be implemented by
|
||||||
|
// querying for special key system names.
|
||||||
|
// https://shaka-project.github.io/shaka-packager/html/documentation.html
|
||||||
|
#ifdef MOZ_WMF_CDM
|
||||||
|
// TODO : implement new key system for PlayReady.
|
||||||
|
if (aKeySystem.EqualsLiteral(kWidevineExperiment2KeySystemName)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
return aKeySystem.EqualsLiteral(kWidevineKeySystemName);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
@ -91,6 +91,8 @@ void MFCDMCapabilitiesIPDLToKeySystemConfig(
|
|||||||
const MFCDMCapabilitiesIPDL& aCDMConfig, KeySystemConfig& aKeySystemConfig);
|
const MFCDMCapabilitiesIPDL& aCDMConfig, KeySystemConfig& aKeySystemConfig);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
bool DoesKeySystemSupportClearLead(const nsAString& aKeySystem);
|
||||||
|
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|
||||||
#endif // EME_LOG_H_
|
#endif // EME_LOG_H_
|
||||||
|
@ -231,6 +231,7 @@ void KeySystemConfig::GetGMPKeySystemConfigs(dom::Promise* aPromise) {
|
|||||||
MOZ_ASSERT(keySystemConfigs.Length() == cdmInfo.Length());
|
MOZ_ASSERT(keySystemConfigs.Length() == cdmInfo.Length());
|
||||||
info->mKeySystemName = name;
|
info->mKeySystemName = name;
|
||||||
info->mCapabilities = keySystemConfigs.LastElement().GetDebugInfo();
|
info->mCapabilities = keySystemConfigs.LastElement().GetDebugInfo();
|
||||||
|
info->mClearlead = DoesKeySystemSupportClearLead(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
aPromise->MaybeResolve(cdmInfo);
|
aPromise->MaybeResolve(cdmInfo);
|
||||||
|
@ -213,6 +213,8 @@ void UtilityAudioDecoderChild::GetKeySystemCapabilities(
|
|||||||
KeySystemConfig config;
|
KeySystemConfig config;
|
||||||
MFCDMCapabilitiesIPDLToKeySystemConfig(capabilities, config);
|
MFCDMCapabilitiesIPDLToKeySystemConfig(capabilities, config);
|
||||||
info->mCapabilities = config.GetDebugInfo();
|
info->mCapabilities = config.GetDebugInfo();
|
||||||
|
info->mClearlead =
|
||||||
|
DoesKeySystemSupportClearLead(info->mKeySystemName);
|
||||||
}
|
}
|
||||||
promise->MaybeResolve(cdmInfo);
|
promise->MaybeResolve(cdmInfo);
|
||||||
},
|
},
|
||||||
|
@ -1177,6 +1177,7 @@ var snapshotFormatters = {
|
|||||||
$.new("td", getVideoRobustness(rvArray)),
|
$.new("td", getVideoRobustness(rvArray)),
|
||||||
$.new("td", getAudioRobustness(rvArray)),
|
$.new("td", getAudioRobustness(rvArray)),
|
||||||
$.new("td", getCapabilities(rvArray)),
|
$.new("td", getCapabilities(rvArray)),
|
||||||
|
$.new("td", cdmInfo.clearlead ? "Yes" : "No"),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -567,13 +567,14 @@
|
|||||||
|
|
||||||
<tbody id="media-content-decryption-modules-tbody">
|
<tbody id="media-content-decryption-modules-tbody">
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="4" class="title-column" data-l10n-id="media-content-decryption-modules-title"/>
|
<th colspan="5" class="title-column" data-l10n-id="media-content-decryption-modules-title"/>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th data-l10n-id="media-key-system-name"/>
|
<th data-l10n-id="media-key-system-name"/>
|
||||||
<th data-l10n-id="media-video-robustness"/>
|
<th data-l10n-id="media-video-robustness"/>
|
||||||
<th data-l10n-id="media-audio-robustness"/>
|
<th data-l10n-id="media-audio-robustness"/>
|
||||||
<th data-l10n-id="media-cdm-capabilities"/>
|
<th data-l10n-id="media-cdm-capabilities"/>
|
||||||
|
<th data-l10n-id="media-cdm-clear-lead"/>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
||||||
|
@ -201,6 +201,10 @@ media-key-system-name = Key System Name
|
|||||||
media-video-robustness = Video Robustness
|
media-video-robustness = Video Robustness
|
||||||
media-audio-robustness = Audio Robustness
|
media-audio-robustness = Audio Robustness
|
||||||
media-cdm-capabilities = Capabilities
|
media-cdm-capabilities = Capabilities
|
||||||
|
# Clear Lead isn't defined in the spec, which means the the first few seconds
|
||||||
|
# are not encrypted. It allows playback to start without having to wait for
|
||||||
|
# license response, improving video start time and user experience.
|
||||||
|
media-cdm-clear-lead = Clear Lead
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user