mirror of
https://github.com/shaka-project/shaka-player.git
synced 2026-06-15 16:06:41 +03:00
Use 'keystatuseschange' events and support @group.
Use 'keystatuseschange' events from EME together with cenc:default_KID from the MPD so StreamVideoSource can determine if the key system can/will decrypt a stream before it attempts to play it. This enables the Player to safely (and automatically) switch between streams that are encrypted with different keys. Support AdaptationSet @group, which is the preferred approach to safely use multiple encryption keys over multiple Representations. * Squash AdaptationSets from the same group into one StreamSetInfo. This enables support for @group without introducing special case code into StreamVideoSource and EmeManager. * Fire 'trackchanged' events when tracks becomes available/unavailable either from application restrictions or key status changes. * Pull key IDs out of DrmInfo and put them into StreamInfo so key status changes can drive per stream availability instead of per StreamSet (AdaptationSet) availability. Closes #67 Issue #160 Change-Id: Ife0814deb65715923a572b45880137a99b378035
This commit is contained in:
committed by
Gerrit Code Review
parent
45fbcbc407
commit
689c2a47aa
@@ -50,3 +50,16 @@ shaka.util.StringUtils.fromBase64 = function(str) {
|
||||
return window.atob(str.replace(/-/g, '+').replace(/_/g, '/'));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Separates every 4 characters by a space.
|
||||
* @param {string} str
|
||||
* @return {string}
|
||||
*/
|
||||
shaka.util.StringUtils.formatHexString = function(str) {
|
||||
return str.split('').reduce(
|
||||
function(acc, ch, i) {
|
||||
return acc + (i && (i % 4 == 0) ? ' ' + ch : ch);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user