File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -981,13 +981,16 @@ class EMEController extends Logger implements ComponentAPI {
981981 ? new Uint8Array ( keyId . buffer , keyId . byteOffset , keyId . byteLength )
982982 : new Uint8Array ( keyId ) ;
983983
984- // On some devices, the key ID has already been converted for endianness.
985- // In such cases, this key ID is the one we need to cache.
986- const originKeyIdWithStatusChange = arrayToHex ( keyIdArray ) ;
987984 if (
988985 mediaKeySessionContext . keySystem === KeySystems . PLAYREADY &&
989986 keyIdArray . length === 16
990987 ) {
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+
991994 changeEndianness ( keyIdArray ) ;
992995 }
993996 const keyIdWithStatusChange = arrayToHex ( keyIdArray ) ;
@@ -999,9 +1002,7 @@ class EMEController extends Logger implements ComponentAPI {
9991002 `key status change "${ status } " for keyStatuses keyId: ${ keyIdWithStatusChange } key-session "${ mediaKeySessionContext . mediaKeysSession . sessionId } "` ,
10001003 ) ;
10011004
1002- // Cache both the original and endianness-converted key IDs to ensure compatibility across all cases.
10031005 keyStatuses [ keyIdWithStatusChange ] = status ;
1004- keyStatuses [ originKeyIdWithStatusChange ] = status ;
10051006 } ,
10061007 ) ;
10071008 return keyStatuses ;
You can’t perform that action at this time.
0 commit comments