Skip to content

Commit

Permalink
Work around Tizen reporting on persistent licenses
Browse files Browse the repository at this point in the history
This works around Tizen 3.0's misreporting of its support for
persistent licenses, which prevents us from running persistent
license tests on that platform.

There is still one more failing test on this platform.

Issue #894

Change-Id: I81ebb80a831c753e3af4851efcbd7e97211e6890
  • Loading branch information
joeyparrish committed Jun 22, 2017
1 parent 892d107 commit bbdc0ba
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/media/drm_engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -1371,6 +1371,15 @@ shaka.media.DrmEngine.probeSupport = function() {
var sessionTypes = access.getConfiguration().sessionTypes;
var persistentState = sessionTypes ?
sessionTypes.indexOf('persistent-license') >= 0 : false;

// Tizen 3.0 doesn't support persistent licenses, but reports that it
// does. It doesn't fail until you call update() with a license
// response, which is way too late.
// This is a work-around for #894.
if (navigator.userAgent.indexOf('Tizen 3') >= 0) {
persistentState = false;
}

support[keySystem] = {persistentState: persistentState};
return access.createMediaKeys();
}).catch(function() {
Expand Down

0 comments on commit bbdc0ba

Please sign in to comment.