-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
CBCS content does not work on WebOS6 since commit ec29f82592fdec9e189fc87a25704fabffb7d404 #7477
Comments
iI was looking again at the commit that broke it and perhaps it was not in shaka code but in the library that was updated, this commit seems like related to cbcs and encryption support shaka-project/eme-encryption-scheme-polyfill#63 |
I think here https://github.com/shaka-project/eme-encryption-scheme-polyfill/pull/63/files#diff-e727e4bdf3657fd1d798edcd6b099d6e092f8573cba266154583a746bba0f346R619 there should also be something
and the method should return true if its webos and Chrome version in user agent is higher or equal to 68. Not sure how to test this in my environment tho, not that familiar with npm and javascript. |
You could send a PR to that project to fix it. You can test in Shaka by checking out source to the polyfill, modifying, building, then copying it over node_modules/... in Shaka. |
@joeyparrish I tried your approach but for some reason, the build of shaka player is refusing to pick up my changed polyfill, instead it reinstalls it I checked useragent of the TV I got in the office and it was Based on the useragent, I believe the following diff is required but didn't manage to test it. diff --git a/index.js b/index.js
index 6b0bc37..4b280ba 100644
--- a/index.js
+++ b/index.js
@@ -654,6 +654,7 @@ function checkSupportedScheme(scheme, supportedScheme) {
if (scheme == 'cbcs' || scheme == 'cbcs-1-9') {
if (EncryptionSchemePolyfills.isRecentFirefox ||
+ EncryptionSchemePolyfills.isRecentWebOs() ||
EncryptionSchemePolyfills.isChromecast) {
// Firefox >= 100 supports CBCS, but doesn't support queries yet.
// Older Chromecast devices are assumed to support CBCS as well.
@@ -718,6 +719,24 @@ EncryptionSchemePolyfills.isChromecast =
EncryptionSchemePolyfills.isRecentFirefox =
parseInt(navigator.userAgent.split('Firefox/').pop(), 10) >= 100;
+/**
+ * @const {boolean}
+ */
+EncryptionSchemePolyfills.isRecentWebOs = (() => {
+ const userAgent = navigator.userAgent.toLowerCase();
+ const isWebOs = userAgent.includes('webos');
+
+ if (!isWebOs) return false;
+
+ const chromeVersionMatch = userAgent.match(/chrome\/(\d+)/);
+
+ if (!chromeVersionMatch) return false;
+
+ const chromeVersion = parseInt(chromeVersionMatch[1], 10);
+
+ return chromeVersion >= 79;
+})();
+
// Support for CommonJS and AMD module formats.
/** @suppress {undefinedVars} */
(() => { The way I am building shaka is |
@jakubvojacek I created shaka-project/eme-encryption-scheme-polyfill#81 to fix it in the module. Thanks! |
Thank you 🙏 |
Have you read the FAQ and checked for duplicate open issues?
yes
If the problem is related to FairPlay, have you read the tutorial?
unrelated
What version of Shaka Player are you using?
latest
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?
own app
If custom app, can you reproduce the issue using our demo app?
its a smarttv, cannot use demo app there
What browser and OS are you using?
unrelated
For embedded devices (smart TVs, etc.), what model and firmware version are you using?
WebOS6 which uses chrome 79
What are the manifest and license server URIs?
Manifest: https://edge1.motv.eu/s1/vods/30/neni-houba-jako-houba-3852/66c72001de232-2635-mp4-cbcs.mpd
License server: https://mw.motv.eu/widevine_proxy
What configuration are you using? What is the output of
player.getNonDefaultConfiguration()
?What did you do?
I attempted to play Widevine-CBCS encrypted content on webos
What did you expect to happen?
For the playback to work
What actually happened?
It didn't work, on some versions it fails with 4032 and later on with 6001 shaka player error code
I was able to find the commit that broke the playback by testing and compiling shaka player commit by commit - it was ec29f82
If I understand what the commit does, it is trying to detect cbcs encryption support and if not supported, it will remove the tracks. But webos6 does support CBCS and therefore it should play normally. Is there something we can change, configuration-wise in the player to make this work? Or is it an issue with webos and its declaration of supported drms? I tried setting up audioRobustness as well but that didn't help
Are you planning send a PR to fix it?
I tried to study the commit in question but I am not sure I fully understand it
The text was updated successfully, but these errors were encountered: