Skip to content

Commit f987f45

Browse files
authored
fix: Sony Bravia TV Playready DRM Failure (#8577)
Fixes #8576 Browser on this Sony TV returns little-endian, which results in false-positive unsupported key system. Looks like this is a known issue impacting couple of other platforms as well. I need to add this TV as well.
1 parent 74b7adb commit f987f45

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

lib/drm/drm_engine.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1737,7 +1737,9 @@ shaka.drm.DrmEngine = class {
17371737
if (shaka.drm.DrmUtils.isPlayReadyKeySystem(
17381738
this.currentDrmInfo_.keySystem) &&
17391739
keyId.byteLength == 16 &&
1740-
(shaka.util.Platform.isEdge() || shaka.util.Platform.isPS4())) {
1740+
(shaka.util.Platform.isEdge() ||
1741+
shaka.util.Platform.isPS4() ||
1742+
shaka.util.Platform.isSonyTV())) {
17411743
// Read out some fields in little-endian:
17421744
const dataView = shaka.util.BufferUtils.toDataView(keyId);
17431745
const part0 = dataView.getUint32(0, /* LE= */ true);

lib/util/platform.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,14 @@ shaka.util.Platform = class {
341341
return shaka.util.Platform.userAgentContains_('PlayStation 4');
342342
}
343343

344+
/**
345+
* Check if the current platform is Sony TV.
346+
* @return {boolean}
347+
*/
348+
static isSonyTV() {
349+
return shaka.util.Platform.userAgentContains_('sony.hbbtv.tv.G5');
350+
}
351+
344352
/**
345353
* Check if the current platform is Hisense.
346354
* @return {boolean}

project-words.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ Clearkey
180180
Clearkeys
181181
Clutz
182182
codem
183+
hbbtv
183184
Conax
184185
cvox
185186
expressjs

0 commit comments

Comments
 (0)