Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRM encrypted content plays well on Samsung Browser only with Shaka 3.1.x #4357

Closed
jakubkrolikowski opened this issue Jul 15, 2022 · 6 comments · Fixed by #4396
Closed

DRM encrypted content plays well on Samsung Browser only with Shaka 3.1.x #4357

jakubkrolikowski opened this issue Jul 15, 2022 · 6 comments · Fixed by #4396
Assignees
Labels
component: EME The issue involves the Encrypted Media Extensions web API platform: Tizen Issues affecting Tizen priority: P2 Smaller impact or easy workaround status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@jakubkrolikowski
Copy link

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

What version of Shaka Player are you using?
3.1.8, 3.3.8, 4.1.2

Can you reproduce the issue with our latest release version?
yes

Can you reproduce the issue with the latest code from main?
yes

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

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

What browser and OS are you using?
Samsung Internet Browser

For embedded devices (smart TVs, etc.), what model and firmware version are you using?
Samsung Internet 2.2 at Tizen 5

What are the manifest and license server URIs?

What configuration are you using? What is the output of player.getConfiguration()?

{
"drm": {
"retryParameters": {
"maxAttempts": 7,
"baseDelay": 1000,
"backoffFactor": 2,
"fuzzFactor": 0.5,
"timeout": 30000,
"stallTimeout": 5000,
"connectionTimeout": 10000
},
"servers": {
"com.widevine.alpha": "https:/xxxxxxxxxxxxxx"
},
"clearKeys": {},
"advanced": {
"com.microsoft.playready.recommendation": {
"distinctiveIdentifierRequired": false,
"persistentStateRequired": false,
"videoRobustness": "3000",
"audioRobustness": "",
"sessionType": "",
"serverCertificate": {},
"serverCertificateUri": "",
"individualizationServer": ""
},
"com.microsoft.playready": {
"distinctiveIdentifierRequired": false,
"persistentStateRequired": false,
"videoRobustness": "2000",
"audioRobustness": "",
"sessionType": "",
"serverCertificate": {},
"serverCertificateUri": "",
"individualizationServer": ""
}
},
"delayLicenseRequestUntilPlayed": false,
"logLicenseExchange": false,
"updateExpirationTime": 1,
"preferredKeySystems": []
},
"manifest": {
"retryParameters": {
"maxAttempts": 2,
"baseDelay": 1000,
"backoffFactor": 2,
"fuzzFactor": 0.5,
"timeout": 30000,
"stallTimeout": 5000,
"connectionTimeout": 10000
},
"availabilityWindowOverride": NaN,
"disableAudio": false,
"disableVideo": false,
"disableText": false,
"disableThumbnails": false,
"defaultPresentationDelay": 0,
"dash": {
"clockSyncUri": "",
"ignoreDrmInfo": false,
"disableXlinkProcessing": false,
"xlinkFailGracefully": false,
"ignoreMinBufferTime": false,
"autoCorrectDrift": true,
"initialSegmentLimit": 1000,
"ignoreSuggestedPresentationDelay": false,
"ignoreEmptyAdaptationSet": false,
"ignoreMaxSegmentDuration": false,
"keySystemsByURI": {
"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b": "org.w3.clearkey",
"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed": "com.widevine.alpha",
"urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95": "com.microsoft.playready",
"urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95": "com.microsoft.playready",
"urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb": "com.adobe.primetime"
}
},
"hls": {
"ignoreTextStreamFailures": false,
"ignoreImageStreamFailures": false,
"useFullSegmentsForStartTime": false,
"defaultAudioCodec": "mp4a.40.2",
"defaultVideoCodec": "avc1.42E01E"
}
},
"streaming": {
"retryParameters": {
"maxAttempts": 120,
"baseDelay": 1000,
"backoffFactor": 2,
"fuzzFactor": 0.5,
"timeout": 20000,
"stallTimeout": 7000,
"connectionTimeout": 15000
},
"rebufferingGoal": 3,
"bufferingGoal": 45,
"bufferBehind": 10,
"ignoreTextStreamFailures": false,
"alwaysStreamText": false,
"startAtSegmentBoundary": false,
"gapDetectionThreshold": 0.5,
"smallGapLimit": 0.5,
"jumpLargeGaps": false,
"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
},
"offline": {
"usePersistentLicense": true
},
"abr": {
"enabled": true,
"useNetworkInformation": true,
"defaultBandwidthEstimate": 10000,
"switchInterval": 5,
"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": "pl",
"preferredTextLanguage": "pl",
"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?

I tried to play DRM encrypted video on Samsung Internet Browser.
It works well with Shaka 3.1.x
but not working at all from 3.2.x

What actually happened?

DRM encrypted content works well with Shaka Player 3.1.x on Samsung Internet Browser.
I tested all higher versions, from 3.2.x and I receive 3016: Shaka Error MEDIA.VIDEO_ERROR (3,,)
I know that Samsung Browser is not officially supported, but it satisfies requirements and some of our users still using it to play videos (since we don't have an app for Tizen yet).
I guess there was some significant change in decoding content in 3.2, since 3.1 branch is free of this error.
Maybe there is a workaround with a new setting?
The last debug message on the console before the error in v3.3.8 is:
Key status changed for session
(and critical 3016 after this).
I would like to upgrade Shaka Player finally to 4.x, but we have to keep 3.1 only for Samsung Tizen Browser because of this bug.

@jakubkrolikowski jakubkrolikowski added the type: bug Something isn't working correctly label Jul 15, 2022
@jakubkrolikowski jakubkrolikowski changed the title Samsung Browser and DRM content works only in 3.1.x DRM encrypted content play well on Samsung Browser only with Shaka 3.1.x Jul 15, 2022
@jakubkrolikowski jakubkrolikowski changed the title DRM encrypted content play well on Samsung Browser only with Shaka 3.1.x DRM encrypted content plays well on Samsung Browser only with Shaka 3.1.x Jul 15, 2022
@github-actions github-actions bot added this to the v4.2 milestone Jul 15, 2022
@joeyparrish
Copy link
Member

The big change in v3.2 that might be relevant is the adoption of the MediaCapabilities API. You can opt-in to MediaCapabilities in v3.1 with player.configure('useMediaCapabilities', true). Please try that and let us know if this triggers the same issue on v3.1. If so, we can investigate the MediaCapabilities polyfill on Samsung browser. I believe I have a copy of that available on Android.

@jakubkrolikowski
Copy link
Author

Yes! I guess it's MediaCapabilities API.
The player.configure('useMediaCapabilities', true) setting triggers 3016 error on Shaka v3.1.x as well.

@joeyparrish
Copy link
Member

I'm going to guess that this is a bug in the MediaCapabilities implementation of Samsung Browser. We may be able to work around it by forcing the use of a polyfill. Sadly, this is something we have had to do on many platforms to date.

@joeyparrish joeyparrish added priority: P2 Smaller impact or easy workaround component: EME The issue involves the Encrypted Media Extensions web API labels Jul 22, 2022
@joeyparrish
Copy link
Member

I initially assumed we were talking about the Samsung Browser on Android, but I can't reproduce the issue there. Does this only occur on Tizen? I see now that you mentioned Tizen 5.

I don't have access to a Tizen TV at home right now, and the one we have in the lab isn't running Tizen 5. Can you please test this patch in Shaka v3.2+ or the latest code from the repo's main branch?

diff --git a/lib/polyfill/media_capabilities.js b/lib/polyfill/media_capabilities.js
index 4a59476f..6140bbbe 100644
--- a/lib/polyfill/media_capabilities.js
+++ b/lib/polyfill/media_capabilities.js
@@ -43,6 +43,7 @@ shaka.polyfill.MediaCapabilities = class {
     if (shaka.util.Platform.isApple() ||
         shaka.util.Platform.isPS5() ||
         shaka.util.Platform.isPS4() ||
+        shaka.util.Platform.isTizen() ||
         shaka.util.Platform.isChromecast()) {
       canUseNativeMCap = false;
     }

Thanks!

@joeyparrish joeyparrish added the platform: Tizen Issues affecting Tizen label Jul 22, 2022
@joeyparrish joeyparrish self-assigned this Jul 22, 2022
@jakubkrolikowski
Copy link
Author

@joeyparrish just to let you know: version 4.2.0 works like a charm on my Tizen 5.0.

@joeyparrish
Copy link
Member

Great! I think PR #4396 solved it. That was cherry-picked to v3.2.11, v3.3.9, v4.0.5, and v4.1.3. It also appears in the latest feature release v4.2.0.

@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Oct 9, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: EME The issue involves the Encrypted Media Extensions web API platform: Tizen Issues affecting Tizen priority: P2 Smaller impact or easy workaround status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants