shaka-project / shaka-player

JavaScript player library / DASH & HLS client / MSE-EME player
Apache License 2.0
7.14k stars 1.34k forks source link

How to set robustness config for playready #6351

Closed mkochman closed 7 months ago

mkochman commented 7 months ago

Shaka 4.6.0 Brwoser: Telenor 1, Edge

I have a problem in project to start stream DRM playready on telenor 1 device and so far only clue is a warning: It is recommended that a robustness level be specified. Not specifying the robustness level could result in unexpected behavior How can I set robustness in config?

advanced: { 'com.microsoft.playready': { audioRobustness: '2000', videoRobustness: '2000', }, } I've tried this one(also some other config) without any good result. I see in minify shaka code on breakpoint that robustness is set in audio and video object but still I get warn in console.

joeyparrish commented 7 months ago

Are you sure it's using "com.microsoft.playready"? If you're using another system or another ID, that could explain your breakpoint not being hit.

Assuming that your snippet is the advanced DRM config inside the top-level drm field, your config looks reasonable.

I can tell you that I have long disagreed with this warning. I think it is nonsense, and I fought within Google for its removal from Chrome, but the implementors of EME disagreed with me. There's no case I'm aware of where a lack of the robustness setting caused a failure.

In general, playback works fine without a robustness setting. The effect of a robustness setting is to create a minimum, below which playback will fail. If you want this effect, then you should set robustness. If you want best-effort playback using whatever DRM robustness the device can offer, you don't have to set it. In a best-effort scenario, your license server can and should still limit which keys it sends to a device based on its actual capabilities. If a device does not support hardware DRM, for example, you may wish to avoid sending HD or UHD keys to it in case of a security compromise. But it's the license server, not the client, who enforces this.