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

com.widevine.alpha.experiment key system setup #7613

Closed
Jason239 opened this issue Nov 18, 2024 · 10 comments
Closed

com.widevine.alpha.experiment key system setup #7613

Jason239 opened this issue Nov 18, 2024 · 10 comments
Labels
component: EME The issue involves the Encrypted Media Extensions web API component: Widevine The issue involves the Widevine DRM platform: Windows Issues affecting Windows priority: P2 Smaller impact or easy workaround type: bug Something isn't working correctly
Milestone

Comments

@Jason239
Copy link

Jason239 commented Nov 18, 2024

Have you read the Tutorials?
yes

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

If the question is related to FairPlay, have you read the tutorial?

not related

What version of Shaka Player are you using?
4.6.2

What browser and OS are you using?
Windows 11 / Chrome

Please ask your question

I'm trying to do a Widevine L1 playback test, but when I set the key system as below in Shaka player, I get a 6012 error. If set it to the com.widevine.alpha key system, it work fine.
Internally, the com.widevine.alpha.experiment key system doesn't seem to be working, is it because it's an experimental key system and is prevented from being used?

playerConfig = {
                drm: {
                    servers: {
                        'com.widevine.alpha.experiment': licenseUri
                        
                    },
                    advanced: {
                        'com.widevine.alpha.experiment': {
                            'distinctiveIdentifierRequired': false,
                            'persistentStateRequired': true,
                            videoRobustness: 'HW_SECURE_ALL',
                            audioRobustness: 'HW_SECURE_CRYPTO'
                        }
                    }
                },
                streaming: {
                    autoLowLatencyMode: true,
                },
            };
@Jason239 Jason239 added the type: question A question from the community label Nov 18, 2024
@avelad
Copy link
Member

avelad commented Nov 18, 2024

To use com.widevine.alpha.experiment you have to use the following config:

playerConfig = {
    drm: {
        servers: {
            'com.widevine.alpha': licenseUri
            
        },
        advanced: {
            'com.widevine.alpha': {
                'distinctiveIdentifierRequired': true,
                'persistentStateRequired': true,
                videoRobustness: 'HW_SECURE_ALL',
                audioRobustness: 'HW_SECURE_CRYPTO'
            }
        },
        keySystemsMapping: {
            'com.widevine.alpha': 'com.widevine.alpha.experiment'
        }
    },
    streaming: {
        autoLowLatencyMode: true,
    },
};

@avelad avelad added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Nov 18, 2024
@Jason239
Copy link
Author

Jason239 commented Nov 19, 2024

I also tried using keySystemsMapping.
Once I put only keySystemsMapping, when I call player.load, I get error TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator)) so if I add preferredKeySystems like below, I get 6002 error.

playerConfig = {
                drm: {
                    servers: {
                        'com.widevine.alpha': licenseUri,
                    },
                    advanced: {
                        'com.widevine.alpha': {
                            'distinctiveIdentifierRequired': false,
                            'persistentStateRequired': true,
                            videoRobustness: 'HW_SECURE_ALL',
                            audioRobustness: 'HW_SECURE_CRYPTO'
                        }
                    },
                    preferredKeySystems: [
                        'com.widevine.alpha.experiment',
                        'com.widevine.alpha'
                    ],
                    keySystemsMapping: {
                        'com.widevine.alpha': 'com.widevine.alpha.experiment'
                    }
                },
                streaming: {
                    autoLowLatencyMode: true,
                },
            };

Even in this case, error.data[0] contains undefined is not iterable (cannot read property Symbol(Symbol.iterator)) error message.
Adding com.widevine.alpha.experiment to advanced results in the same error.

@shaka-bot shaka-bot removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Nov 19, 2024
@avelad
Copy link
Member

avelad commented Nov 19, 2024

I think that you need use distinctiveIdentifierRequired = true to used Widevine L1 (https://github.com/StaZhu/enable-chromium-hevc-hardware-decoding?tab=readme-ov-file#requestmediakeysystemaccess)

@avelad avelad added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Nov 19, 2024
avelad added a commit that referenced this issue Nov 19, 2024
joeyparrish pushed a commit that referenced this issue Nov 19, 2024
joeyparrish pushed a commit that referenced this issue Nov 19, 2024
@Jason239
Copy link
Author

Jason239 commented Nov 19, 2024

Oh, okay but the error code is still the same if I modify that value.
If I implement the player myself by configuring the key system to call the EME API directly as shown below in my browser, it works fine.

const config = [{
                    initDataTypes: ['cenc'],
                    audioCapabilities: [{
                        contentType: 'audio/mp4;codecs="mp4a.40.2"',
                        robustness: 'HW_SECURE_CRYPTO'
                    }],
                    videoCapabilities: [{
                        contentType: 'video/mp4;codecs="avc1.640028"',
                        robustness: 'HW_SECURE_ALL'
                    }],
                    persistentState: 'required',
                }];

                let keySystem;
                try {
                    keySystem = await navigator.requestMediaKeySystemAccess('com.widevine.alpha.experiment', config);
                } catch (error) {
                    logger('Failed to get access for com.widevine.alpha.experiment');
                }

Is there anything else wrong with my Shaka player setup? I don't understand the error message undefined is not iterable.
I'm getting the same error if I compile and use latest source including added in #7627

joeyparrish pushed a commit that referenced this issue Nov 19, 2024
@shaka-bot shaka-bot removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Nov 19, 2024
@aykut-33
Copy link

I am getting the same error. Any updates?

@avelad
Copy link
Member

avelad commented Dec 10, 2024

I found a error in the code... I'll create a PR to fix it very soon!

@avelad avelad added type: bug Something isn't working correctly component: Widevine The issue involves the Widevine DRM platform: Windows Issues affecting Windows component: EME The issue involves the Encrypted Media Extensions web API priority: P2 Smaller impact or easy workaround and removed type: question A question from the community labels Dec 10, 2024
@avelad avelad added this to the v4.13 milestone Dec 10, 2024
avelad added a commit that referenced this issue Dec 10, 2024
joeyparrish pushed a commit that referenced this issue Dec 12, 2024
joeyparrish pushed a commit that referenced this issue Dec 12, 2024
@MarianoFacundoArch
Copy link
Contributor

@aykut-33 @Jason239 Did you do any modification at a widevine licence delivery level? Did you have to deliver with a PlayReady Licence? Or should it work out of the box with a Widevine licence?

@tykus160
Copy link
Member

@Jason239 can you try with latest build?

@tykus160 tykus160 added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Dec 19, 2024
@Jason239
Copy link
Author

@MarianoFacundoArch Widevine L1 license is delivered as a wrapped PlayReady license.
@tykus160 Yes, I tested it and the key system is now working fine. Thanks for the quick fix :)

@shaka-bot shaka-bot removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Dec 20, 2024
@avelad avelad closed this as completed Dec 20, 2024
@bora-bora-bora
Copy link

bora-bora-bora commented Dec 20, 2024

@MarianoFacundoArch Widevine L1 license is delivered as a wrapped PlayReady license. @tykus160 Yes, I tested it and the key system is now working fine. Thanks for the quick fix :)

Hi Jason239,

We are also facing with same issue but now it is okay with latest build. However, now it is not clear for us to handle this widevine license which wrapped PlayReady license. when we send this license request to widevine proxy sdk than we have this error:

java.lang.ClassNotFoundException: com.google.video.widevine.sdk.wvpl.WvPLUtils

Please see below decyrepted license request:

image

Could you please help us if you have any clue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: EME The issue involves the Encrypted Media Extensions web API component: Widevine The issue involves the Widevine DRM platform: Windows Issues affecting Windows priority: P2 Smaller impact or easy workaround type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

7 participants