File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -980,10 +980,17 @@ class EMEController extends Logger implements ComponentAPI {
980980 'buffer' in keyId
981981 ? new Uint8Array ( keyId . buffer , keyId . byteOffset , keyId . byteLength )
982982 : new Uint8Array ( keyId ) ;
983+
983984 if (
984985 mediaKeySessionContext . keySystem === KeySystems . PLAYREADY &&
985986 keyIdArray . length === 16
986987 ) {
988+ // On some devices, the key ID has already been converted for endianness.
989+ // In such cases, this key ID is the one we need to cache.
990+ const originKeyIdWithStatusChange = arrayToHex ( keyIdArray ) ;
991+ // Cache the original key IDs to ensure compatibility across all cases.
992+ keyStatuses [ originKeyIdWithStatusChange ] = status ;
993+
987994 changeEndianness ( keyIdArray ) ;
988995 }
989996 const keyIdWithStatusChange = arrayToHex ( keyIdArray ) ;
@@ -994,6 +1001,7 @@ class EMEController extends Logger implements ComponentAPI {
9941001 this . log (
9951002 `key status change "${ status } " for keyStatuses keyId: ${ keyIdWithStatusChange } key-session "${ mediaKeySessionContext . mediaKeysSession . sessionId } "` ,
9961003 ) ;
1004+
9971005 keyStatuses [ keyIdWithStatusChange ] = status ;
9981006 } ,
9991007 ) ;
You can’t perform that action at this time.
0 commit comments