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

Robustness warning in Chrome? #518

Closed
Feenposhleen opened this issue Sep 14, 2016 · 16 comments
Closed

Robustness warning in Chrome? #518

Feenposhleen opened this issue Sep 14, 2016 · 16 comments
Assignees
Labels
status: archived Archived and locked; will not be updated type: question A question from the community

Comments

@Feenposhleen
Copy link

When initiating a stream in shaka2 you get an ominous warning in the console:
It is recommended that a robustness level be specified. Not specifying the robustness level could result in unexpected behavior in the future, potentially including failure to play..

This is probably benign, but if it can be mitigated somehow, that would be great. I saw a PR merged earlier this summer in dash.js that seems to deal with this issue, (Dash-Industry-Forum/dash.js#1446) maybe that could be of interest.

@joeyparrish joeyparrish self-assigned this Sep 14, 2016
@joeyparrish joeyparrish added the type: question A question from the community label Sep 14, 2016
@joeyparrish
Copy link
Member

We already support robustness settings. See "Advanced DRM Configuration" in the DRM Configuration tutorial.

We don't set robustness by default because that would require us to hard-code knowledge of valid robustness levels, which are not defined in the EME spec. Each key system has its own set of valid robustness strings.

@joeyparrish
Copy link
Member

joeyparrish commented Sep 14, 2016

The message is ominous, though. For now, the empty string is allowed by the EME spec and is meaningful:

robustness of type DOMString, defaulting to ""

The robustness level associated with the content type. The empty string indicates that any ability to decrypt and decode the content type is acceptable.

We'll keep an eye out for changes on this. Perhaps the message references an older version of the spec in which this was not well defined.

@ddorwin
Copy link

ddorwin commented Sep 14, 2016

See also this text (emphasis added) from the note following the normative text above:

... If only the empty string is specified, implementations MAY be configured to use the lowest robustness level the implementation supports.

Applications SHOULD specify the robustness level(s) they require to avoid unexpected client incompatibilities.

This warning is for the current version of the spec and related to potential changes to Chrome (or other implementations) that could break some apps that do not provide a robustness level. For example, the lowest supported level is often not appropriate for video.

@joeyparrish
Copy link
Member

Ah, I see. Thanks for the correction, David.

@Feenposhleen
Copy link
Author

Feenposhleen commented Sep 15, 2016

All right! Thanks for the clarifications.

While reading I thought of another argument to not provide a default:
Suppose the technical details of a DRM implementation is dictated by rights acquisition terms. Setting a low default level would mask the need to make an explicit choice, leading to a potential breach of contract toward the rights holders. It makes a lot of sense to not mute the warning so that people like me need to look up the details and spec.

EDIT: Unless a high level robustness doesn't lead to more effective DRM, in which case my point is moot.

@soualid
Copy link

soualid commented Sep 21, 2016

Just in case someone is looking for the information, to get rid of the warning, I used SW_SECURE_CRYPTO for both audioRobustness and audioRobustness, valid values for widevine are listed here : https://chromium.googlesource.com/chromium/src/+/refs/heads/lkcr/components/cdm/renderer/widevine_key_system_properties.h

@joeyparrish
Copy link
Member

Have we answered this question to everyone's satisfaction? Can we close it?

@joeyparrish joeyparrish added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Oct 5, 2016
@Feenposhleen
Copy link
Author

I'm satisfied, thanks. You can close it.

@Zorig
Copy link

Zorig commented Jan 11, 2017

@joeyparrish I am using shaka 2.02 and set robustness level to SW_SECURE_CRYPTO for audio and video still get warning. Is it because of version? I have been used shaka(2.0.0 beta) before.

this.get('player').configure({
    drm: {
        servers: {'com.widevine.alpha': data.token},
        advanced: {
        'com.widevine.alpha': {
            'videoRobustness': 'SW_SECURE_CRYPTO',
            'audioRobustness': 'SW_SECURE_CRYPTO'
        }
        }
    }
})

@joeyparrish
Copy link
Member

@Zorig, are you using the demo app or a custom app? If custom, are you using shaka.media.DrmEngine.probeSupport()?

@Zorig
Copy link

Zorig commented Jan 12, 2017

@joeyparrish I am using custom app(Ember 2.10) also i used probeSupport like this. Is it wrong usage?

shaka.polyfill.installAll();
if (shaka.Player.isBrowserSupported()) {
    shaka.Player.probeSupport().then((support) => {
        if (support.drm['com.widevine.alpha']) {
            // this.set('video', document.getElementById('video'));
            // this.set('player', new shaka.Player(this.video));
            this.get('player').configure({
                abr: {
                    enabled: false
                },
                streaming: {
                    retryParameters: {
                        timeout: 0, // timeout in ms, after which we abort a request; 0 means never
                        maxAttempts: 5, // the maximum number of requests before we fail
                        baseDelay: 1500, // the base delay in ms between retries
                        backoffFactor: 2, // the multiplicative backoff factor between retries
                        fuzzFactor: 0.5, // the fuzz factor to apply to each retry delay
                    }
                },
                drm: {
                    advanced: {
                        'com.widevine.alpha': {
                            'videoRobustness': 'SW_SECURE_CRYPTO',
                            'audioRobustness': 'SW_SECURE_CRYPTO'
                        }
                    }
                }
            });
        } else {
            this.set('error', 'ERROR');
        }
    });
});

@joeyparrish
Copy link
Member

Ah, that makes sense now. The warning is triggered by probeSupport(). Because it probes for multiple key systems and because we do not hard-code valid robustness strings per key system, the probe does not specify any robustness.

@Zorig
Copy link

Zorig commented Jan 12, 2017

okay, @joeyparrish so how should i set robustness in this case? checking widevine is essential in my case. And some drm songs are not playing because of robustness i think

@joeyparrish
Copy link
Member

I'm not sure I understand the question. You don't need to set robustness in any way to call probeSupport(). Is probeSupport() not working? Or are you just trying to silence the warning?

@Zorig
Copy link

Zorig commented Jan 13, 2017

Some of my songs are not playing. So i thought it is because of robustness level according to warning. And when i set robustness level it still gives me robustness warning

@joeyparrish joeyparrish removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Dec 5, 2017
@vinixwu
Copy link

vinixwu commented Dec 28, 2017

I got the same error on basic code. It's triggered by navigator.requestMediaKeySystemAccess method used to test if certain key system is supported:

var config = [{
	"initDataTypes": ["cenc"],
	"audioCapabilities": [{ "contentType": 'audio/mp4;codecs="mp4a.40.2"' }],
	"videoCapabilities": [{ "contentType": 'video/mp4;codecs="avc1.42E01E"' }]
}];
try {
	navigator.
		requestMediaKeySystemAccess("com.widevine.alpha", config).
		then(function (mediaKeySystemAccess) {
			console.log('widevine support ok');
		}).catch(function (e) {
			console.log('no widevine support');
			console.log(e);
		});
} catch (e) {
	console.log('no widevine support');
	console.log(e);
}

Add robustness level setting to config object solved the problem:

var config = [{
	"initDataTypes": ["cenc"],
	"audioCapabilities": [{ "contentType": 'audio/mp4;codecs="mp4a.40.2"', robustness: 'SW_SECURE_CRYPTO' }],
	"videoCapabilities": [{ "contentType": 'video/mp4;codecs="avc1.42E01E"', robustness: 'SW_SECURE_CRYPTO' }]
}];

Besides, this warning only triggered when key system is "com.widevine.alpha". Add robustness setting to other key system like PlayReady and ClearKey causes exception and returns false negative result:

DOMException: Unsupported keySystem or supportedConfigurations.

@shaka-project shaka-project locked and limited conversation to collaborators Mar 22, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: question A question from the community
Projects
None yet
Development

No branches or pull requests

7 participants