shaka-player icon indicating copy to clipboard operation
shaka-player copied to clipboard

TizenTV error code 6001 on playing content - Shaka player 3.2.0

Open iskewedI opened this issue 2 years ago • 8 comments

Have you read the FAQ and checked for duplicate open issues? Yes

What version of Shaka Player are you using? 2.5.6 but trying to update to 3.2.0

Can you reproduce the issue with our latest release version? Yes, 4.1.2 version.

Can you reproduce the issue with the latest code from main? Not tried.

Are you using the demo app or your own custom app? Custom

If custom app, can you reproduce the issue using our demo app? Not tried

What browser and OS are you using? Chromium and MAC for development, Chrome and Tizen for TV deployment

For embedded devices (smart TVs, etc.), what model and firmware version are you using? TV 2020, can be reproduced in 2017 too.

What are the manifest and license server URIs? DRM config: configuration["drm"] = { "retryParameters": { "maxAttempts": 3, "baseDelay": 2000, "timeout": 0 }, "servers": { "com.widevine.alpha": "https://content.uplynk.com/wv", "com.microsoft.playready": "https://content.uplynk.com/pr" }, "advanced": { 'com.widevine.alpha': { 'videoRobustness': '', 'audioRobustness': '' } } } -->

What configuration are you using? What is the output of player.getConfiguration()? Please tell me if you need the keySystemsByURI keys.

"drm": { "retryParameters": { "maxAttempts": 3, "baseDelay": 2000, "backoffFactor": 2, "fuzzFactor": 0.5, "timeout": 0, "stallTimeout": 5000, "connectionTimeout": 10000 }, "servers": { "com.widevine.alpha": "https://content.uplynk.com/wv", "com.microsoft.playready": "https://content.uplynk.com/pr" }, "clearKeys": {}, "advanced": { "com.widevine.alpha": { "distinctiveIdentifierRequired": false, "persistentStateRequired": false, "videoRobustness": "", "audioRobustness": "", "sessionType": "", "serverCertificate": {}, "serverCertificateUri": "", "individualizationServer": "" } }, "delayLicenseRequestUntilPlayed": false, "logLicenseExchange": false, "updateExpirationTime": 1, "preferredKeySystems": [], "keySystemsMapping": {} }, "manifest": { "retryParameters": { "maxAttempts": 2, "baseDelay": 1000, "backoffFactor": 2, "fuzzFactor": 0.5, "timeout": 30000, "stallTimeout": 5000, "connectionTimeout": 10000 }, "availabilityWindowOverride": null, "disableAudio": false, "disableVideo": false, "disableText": false, "disableThumbnails": false, "defaultPresentationDelay": 0, "segmentRelativeVttTiming": false, "dash": { "clockSyncUri": "", "ignoreDrmInfo": false, "disableXlinkProcessing": false, "xlinkFailGracefully": false, "ignoreMinBufferTime": false, "autoCorrectDrift": true, "initialSegmentLimit": 1000, "ignoreSuggestedPresentationDelay": false, "ignoreEmptyAdaptationSet": false, "ignoreMaxSegmentDuration": false, "keySystemsByURI": { "censored": "org.w3.clearkey", "censored": "org.w3.clearkey", "censored": "com.widevine.alpha", "censored": "com.microsoft.playready", "censored": "com.microsoft.playready", "censored": "com.adobe.primetime" } }, "hls": { "ignoreTextStreamFailures": false, "ignoreImageStreamFailures": false, "defaultAudioCodec": "mp4a.40.2", "defaultVideoCodec": "avc1.42E01E", "ignoreManifestProgramDateTime": false, "mediaPlaylistFullMimeType": "video/mp2t; codecs=\"avc1.42E01E, mp4a.40.2\"" } }, "streaming": { "retryParameters": { "maxAttempts": 2, "baseDelay": 1000, "backoffFactor": 2, "fuzzFactor": 0.5, "timeout": 30000, "stallTimeout": 5000, "connectionTimeout": 10000 }, "rebufferingGoal": 2, "bufferingGoal": 10, "bufferBehind": 30, "ignoreTextStreamFailures": true, "alwaysStreamText": false, "startAtSegmentBoundary": false, "gapDetectionThreshold": 0.5, "durationBackoff": 1, "forceTransmuxTS": false, "safeSeekOffset": 5, "stallEnabled": true, "stallThreshold": 1, "stallSkip": 0, "useNativeHlsOnSafari": true, "inaccurateManifestTolerance": 2, "lowLatencyMode": false, "autoLowLatencyMode": false, "forceHTTPS": false, "preferNativeHls": false, "updateIntervalSeconds": 1, "dispatchAllEmsgBoxes": false, "observeQualityChanges": false, "maxDisabledTime": 30 }, "offline": { "usePersistentLicense": true, "numberOfParallelDownloads": 5 }, "abr": { "enabled": true, "useNetworkInformation": true, "defaultBandwidthEstimate": 1000000, "switchInterval": 8, "bandwidthUpgradeTarget": 0.85, "bandwidthDowngradeTarget": 0.95, "restrictions": { "minWidth": 0, "maxWidth": null, "minHeight": 0, "maxHeight": null, "minPixels": 0, "maxPixels": null, "minFrameRate": 0, "maxFrameRate": null, "minBandwidth": 0, "maxBandwidth": null }, "advanced": { "minTotalBytes": 128000, "minBytes": 16000, "fastHalfLife": 2, "slowHalfLife": 5 } }, "preferredAudioLanguage": "", "preferredTextLanguage": "", "preferredVariantRole": "", "preferredTextRole": "", "preferredAudioChannelCount": 2, "preferredVideoCodecs": [], "preferredAudioCodecs": [], "preferForcedSubs": false, "preferredDecodingAttributes": [], "restrictions": { "minWidth": 0, "maxWidth": null, "minHeight": 0, "maxHeight": null, "minPixels": 0, "maxPixels": null, "minFrameRate": 0, "maxFrameRate": null, "minBandwidth": 0, "maxBandwidth": null }, "playRangeStart": 0, "playRangeEnd": null, "cmcd": { "enabled": false, "sessionId": "", "contentId": "", "useHeaders": false } }

What did you do? Update from 3.1 to 3.2.0. Play any content.

What did you expect to happen? The content should be played with no code changes. No breaking changes were found in the releases (at least what I've read).

What actually happened? The player.load() method rejects with an error object 6001: REQUESTED_KEY_SYSTEMS_UNAVAILABLE (see attached image). 3.1 shaka player versions works well. I've checked this error in the FAQ:

  • We are using both PlayReady and Widevine Alpha.
  • We are not using Storage.
  • Yes we are developing on unsecure origins but we tried on secure environment (prod) and we could reproduce the issue. But if this would be the issue, I couldn't understand why in 3.1 the player works well.

We want to update to 3.2 or newer versions, but this issue is blocking us a lot.

Screen Shot 2022-08-02 at 12 49 12

iskewedI avatar Aug 02 '22 16:08 iskewedI

The major change from v3.1 to v3.2 is the MediaCapabilities API. It went from opt-in on 3.1 to required in 3.2+. My guess is that Tizen's has an implementation of MediaCapabilities, but it is broken.

This sounds like the same thing as https://github.com/shaka-project/shaka-player/issues/4357

Can you please try the patch I suggested in https://github.com/shaka-project/shaka-player/issues/4357#issuecomment-1192936935? If that works for you, we'll get it out in an update ASAP. But we don't have any way to test that ourselves, as our particular Tizen TV isn't affected (probably too old to have MCap at all).

joeyparrish avatar Aug 05 '22 22:08 joeyparrish

Thanks for the response. So I've tried that workaround in v4.1.2, I had to do some other work because the shaka.util.Platform doesn't exist yet, nor some other methods so with some tweaks and polyfills (copied directly from the main branch) I manage to stop the errors and make it work, and the player worked well! It didn't throw the 6001 error anymore. Its right to call the shaka.polyfill.MediaCapabilities.install()method from outside? Because if I don't do that, shaka itself doesn't call it.

iskewedI avatar Aug 08 '22 18:08 iskewedI

Similar thing happens in WebOS 5.x, as it has a native implementation of MediaCapabilities, but isn't reliable. WebOS 5.x supports Playready SL3000, but returns false on support of com.microsoft.playready.recommendation. Would be good to add shaka.util.Platform.isWebOS() to the patch as well I think.

koenoe avatar Aug 09 '22 11:08 koenoe

@koenoe I think it's better to block the versions that don't work. Does WebOS 6.x or WebOS 22 work correctly? (https://webostv.developer.lge.com/discover/specifications/web-engine/)

I am open to blocking specific versions.

avelad avatar Aug 09 '22 11:08 avelad

@avelad I don't have the ability to test on WebOS 6.x or WebOS 22 at the moment, but will try to do that asap

koenoe avatar Aug 09 '22 11:08 koenoe

@avelad I've just tested it on WebOS 6.3.1 and it doesn't work correctly either. I expect it to not work on WebOS 22 either, as the MediaCapability API in Tizen and WebOS just isn't very reliable in my experience.

koenoe avatar Aug 09 '22 14:08 koenoe

Ok, tomorrow I’ll send a fix for it! Thanks!

avelad avatar Aug 09 '22 14:08 avelad

Thank you @avelad. So if I understand you well, you are going to fix this in the 3.2 version right? If that's the case, if we want to update to a newer version like v4, we would need to do this workaround for our side?

iskewedI avatar Aug 09 '22 16:08 iskewedI

I'll cherry-pick @avelad's fix to all the branches we are currently maintaining (v3.2, v3.3, v4.0, v4.1). See also https://github.com/shaka-project/shaka-player/blob/main/maintained-branches.md

joeyparrish avatar Aug 10 '22 17:08 joeyparrish