PlayReady SL3000 support requires com.microsoft.playready.recommendation key system #3869
-
Hi All I wonder if you can help me. I want to enable PlayReady SL3000 support. I currently have this working (using the Edge browser), which is a start! To do this, I am working on the assumption the following 2 steps are carried out by the client. #1: explicitly set the security level to 3000, either by the setRobustnessLevel("3000") api call or setting videoRobustness (or audio) to "3000" in the key system init data (passed in via setProtectionData api call) - not sure which is preferable. now the potentially contentious bit... #2: I believe (and this would appear to be true based on my testing) that I need to request the "com.microsoft.playready.recommendation" key system (not the older 'legacy' (and non EME compliant?!) "com.microsoft.playready key system"). however, I do not see an obvious way to explicitly request this key system - in fact, I only seem to be able to do this indirectly by setting the "persistentState" property which has the useful (intended) side-effect of changing the key system from "com.microsoft.playready" to "com.microsoft.playready.recommendation". eg here's the dashjs code snippet which does this: there's an interesting reference here: so, my question is, is there a better way to request the use of the "com.microsoft.playready.recommendation" key system, as it does not feel right to me to rely on a side effect of another property to set this? the issue seems to exacerbated by the fact that the 2 playready keysystems, ie: i get the impression from Microsoft that we really should now only be using the com.microsoft.playready.recommendation key system - however, there's a concern that this will cause in-the-field regressions (perhaps with hindsight creating a new uuid would have mitigated this). i guess one potential pragmatic solution would be to workaround this using the same approach as used to resolve issue #2658, which could look something like this:
However, this would only help me for my specific usecase - and will continue to propagate the confusion between the 2 key systems. Whilst i have investigated this - i can't help but feel that i'm missing something here obvious - as i'm surprised that i'm the only one having this issue! |
Beta Was this translation helpful? Give feedback.
Replies: 20 comments 12 replies
-
We have done this simple test page to try out few scenarios with Playready security level. Use MSEdge for playready testing, you need quite recent PC hardware to have a valid trusted environment blocks. https://refapp.hbbtv.org/dash/test_dashjs_sl3000.html
|
Beta Was this translation helpful? Give feedback.
-
@markriley9999 @Murmur Thank you for the detailed description. We will check this and make a proposal how to move on. As far as I understand |
Beta Was this translation helpful? Give feedback.
-
I added a first draft for a solution in #3859. The idea is described in the PR. Basically, it allows us to define multiple system strings to be applied by priority for the different DRM systems. This is work in progress I did not carefully test this yet, further adjustments might be required. However, any feedback is welcome. @bbert fyi, maybe you also want to comment |
Beta Was this translation helpful? Give feedback.
-
i must admit that it's not clear to me as to whether the requirement to use the 'com.microsoft.playready.recommendation' keysystem applies only to the Edge browser or whether it should be applied across all browsers (i assumed the latter...). does anyone know? is this documented anywhere? i'm wondering if @swenkeratmicrosoft can clarify. thanks! |
Beta Was this translation helpful? Give feedback.
-
For key system string: On Windows, I am unaware of any browser that supports PlayReady except Edge. For Edge, com.microsoft.playready.recommendation is the correct key system string. If any other browsers support playready, it's up to them what key systems they support and how they support them, e.g. they could decide to implement com.microsoft.playready such that it remaps to com.microsoft.playready.recommendation before it calls into the OS, or they might use com.microsoft.playready.recommendation only and not support com.microsoft.playready at all, or whatever they wish to do. Microsoft has no control over that. On non-Windows, there are multiple possibilities for the key system string.
For robustness level / hardware DRM: Edge on Windows should properly map 3000 to hardware DRM. If you're having trouble getting that to work properly, you can also use the key system string com.microsoft.playready.recommendation.3000 (windows only) to force hwdrm for video. If the key system string com.microsoft.playready.recommendation is not supported, you CAN fallback to com.microsoft.playready (or com.microsoft.playready.hardware) for the legacy implementation. However, the legacy implementation has MANY incompatibilities with the EME spec AND we may remove support for it entirely in the future. I strongly recommend against using the legacy implementation under any circumstances. Again, I can't speak to non-Edge Windows browsers. For non-windows, the PlayReady porting kit doesn't know what level it is running at - only the OEM implementing the device can determine that. As a result, it is up to the browser to correctly implement the robustness level value to reject robustness level 3000 when it is not supported. For persistent state: Unless you have a strong reason not to, I recommend always specifying persistent state as "required". For distinctive identifiers: Always specify distinctive identifiers to "required". PlayReady requires distinctive identifiers for all implementations on all platforms. Hope that helps, -Sam Wenker with the Microsoft PlayReady team |
Beta Was this translation helpful? Give feedback.
-
Mixing in HbbTV and SmartTV platforms. Everything was clear until DashJs on MSE-EME SmartTVs, how do should Playready be initialized for SL3000 mode in SmartTVs, is In the old times just give mpdUrl + Laurl and play. |
Beta Was this translation helpful? Give feedback.
-
My apologies - I had some incorrect information in my previous post. I've updated it with a lot of details which should hopefully answer your questions. -Sam Wenker with the Microsoft PlayReady team |
Beta Was this translation helpful? Give feedback.
-
Here's some additional background and context on this. The reason for having two key system strings for PlayReady is because Microsoft had major customers requesting EME support long before the EME spec became a recommendation - it was still in draft. As a result, Microsoft implemented com.microsoft.playready based on that draft spec. The EME spec changed substantially after that implementation was released - so much so that there was no way to modify the existing implementation to be compatible with both the final recommendation spec and existing websites - Microsoft had a choice of either breaking existing websites or not being spec compliant, and we chose the latter. Since EME provides no way to specify additional key-system-specific data in the MediaKeySystemConfiguration, we had no choice but to create a new key system string for the new, spec-compliant implementation. Unfortunately, that does add a bunch of nuance to how playready is used. If you're only dealing with recent Windows OS, recent Edge, and recent third party browsers built on a recent PK and not doing anything unusual with the key system string in their implementations (where "recent" is relative in all cases), it's pretty simple - com.microsoft.playready.recommendation with robustness string 3000 if desired. But as soon as you start factoring in all the combinations of older implementations, things get wonky. -Sam Wenker with the Microsoft PlayReady team |
Beta Was this translation helpful? Give feedback.
-
@swenkeratmicrosoft Thank you for the detailed description. @bbert @markriley9999 @Murmur I think #3859 offers the required flexibility. We can use different systems strings with that PR, |
Beta Was this translation helpful? Give feedback.
-
@dsilhavy @swenkeratmicrosoft I think so #3859 could provide a flexibility without a need to do an obscure If content owners require a Playready SL3000 then Hbbtv-SmartTV implementation details is an another story I need to study more, this genre is also moving to MSE-EME player stack but the browser engine is not always a carbon copy of pc browsers. |
Beta Was this translation helpful? Give feedback.
-
@Murmur - Correction: It's the graphics card that needs to support SL3000, and modern graphics cards from several vendors (Intel, Amd, NVidia, Arm) support it. An intel CPU is not required (although Intel graphics cards in particular might require an Intel CPU - I'm not sure there). -Sam Wenker with the Microsoft PlayReady team |
Beta Was this translation helpful? Give feedback.
-
Hi All thanks @swenkeratmicrosoft for the background info. I think @Murmur summed it up well with Support of PlayReady (+SL3000) via a Browser CDM is on the cusp, in the UK, to being widely supported by embedded TV browsers - so it's important to standardise where possible (which I’m sure that we all agree upon). I personally have already started to see fragmentation in the (TV) industry where some manufacturers support SL3000 via the 'legacy' keysystem ("com.microsoft.playready") and others via the newer keysystem ("com.microsoft.playready.recommendation"). I think we have an opportunity now (but, which is quickly passing) to standardise on a single keysystem. I appreciate that @dsilhavy proposal would appear to be very pragmatic and I think functionally will serve our purpose in the context of getting SL3000 to work with DASHJS, so that's good. :) However, clear guidance to the TV manufacturers (who will then feed this back to embedded browser suppliers - sometimes the same entity) as to exactly which system should be used, for new devices, would be very useful and personally my vote would be not to use the legacy "com.microsoft.playready" keysystem for new devices, ie @swenkeratmicrosoft's recomendation #1:
I appreciate that we may be stepping outside the remit of DASHJS here (but I guess it is still related...). look forward to hearing your thoughts! :) |
Beta Was this translation helpful? Give feedback.
-
#3859 is merged, thank you all for the feedback. I am converting this to a discussion thread. |
Beta Was this translation helpful? Give feedback.
-
As an fyi: I had to revert the system string order to Tested with: |
Beta Was this translation helpful? Give feedback.
-
If the error is internal to dash.js, I'm afraid I won't be able to help you. However, if the error is coming from the platform / Edge (i.e. EME or Media Element APIs), I can assist you with this investigation if you're able to collect and share trace files from the OS. Specifically:
https://github.com/microsoft/media-foundation/releases/download/V1/mftracelog.zip The PlayReady team is very interested in getting people away from using com.microsoft.playready in Edge, so I am happy to assist if I can be of use. -Sam Wenker with the Microsoft PlayReady team |
Beta Was this translation helpful? Give feedback.
-
@swenkeratmicrosoft I took liberty to run a full stackrace on my Windows10Edge browser. It would be interesting to know how do we identify the compatible SL3000 win10 machines. My laptop is too low-end hardware? My Edge fails on My Edge is fine playing
|
Beta Was this translation helpful? Give feedback.
-
According to the trace provided, the key system string being used to initialize PlayReady is com.microsoft.playready. That's both legacy AND software DRM. So, it appears that "the old protDataConfig dashjs trick to activate .recommendation systemDrm" is not working properly. The key system string should be com.microsoft.playready.recommendation.3000 for HWDRM. The license acquisition failure occurs because you're requesting an SL3000 license (HWDRM) when the client is running in SL2000 (SWDRM) mode. Purely for troubleshooting HWDRM-specific issues, it may be easier to make yourself a private dash.js which simply hard-codes that key system string at the point of calling requestMediaKeySystemAccess, but that's your call. Hope that helps, -Sam Wenker with the Microsoft PlayReady team |
Beta Was this translation helpful? Give feedback.
-
Yes, that's correct. Using com.microsoft.playready.recommendation with videoRobustness/audioRobustness is more explicit and more platform-agnostic. Specifying 3000 for video and 2000 audio effectively means "require hardware-backed security for video, but software-backed security for audio is OK". The com.microsoft.playready.recommendation.3000 key system string is windows-specific (AFAIK). On Windows (ONLY), it implicitly means the exact same thing as 3000 for video and 2000 for audio. This is because hardware-backed security doesn't exist for audio on windows. I have no idea what com.microsoft.playready.recommendation.3000 would mean on non-windows, if anything at all. FWIW, on non-windows, hardware-backed security for audio technically exists on one or two platforms, but it's very rare. I'm not aware of any content provider that requires it. That might change in the future if hardware-backed security for audio becomes more common in the market. Hope that helps, -Sam Wenker with the Microsoft PlayReady team |
Beta Was this translation helpful? Give feedback.
-
@swenkeratmicrosoft As I don't have at my hand a player yet that would correctly handle the required keysystem, here https://devs.origin.cdn.cra.cz/log/mftracelog.zip is a trace from me running just the However, setting the license in the PlayReady sample app on that machine to 3000, setting the "Turn on HWDRM" checkbox to enabled (the log in the app even confirmed that HWDRM is being used) and testing a couple of encrypted streams there resulted in playback failures. By changing the license back to 2000, all streams became immediately playable again. We thought of using the query result to find and leverage the keysystem with highest security available on given system to set the player environment to This test doesn't prove that this approach is usable if the query provides different hints than what would actually happen later with a real PlayReady license. What are your thoughts about this, please? |
Beta Was this translation helpful? Give feedback.
-
Thank you for the guidelines. I think we're getting somewhere. There was an error on my side where I somehow forgot that audio track doesn't support SL3000 and I tested wrongly in the WWA JS sample app CENC streams including audio. However, the available license does not take that into account as both video and audio are either encrypted with the same key so the same rules apply for that given KID or they are not but the license url cannot be modified in the app to reflect that. If I do test solely with video-only streams then yes, I can play them at SL3000 level. Good! This is finally aligning for me with what the RMKSA query reports. If I may take this opportunity, let me run the following by you:
Everything should be accepted here and playable under that keysystem, is that correct? As I said before, in systems not supporting For the sake of completeness, here https://devs.origin.cdn.cra.cz/log/mftracelogsl3000.zip is the mftracelog from the session with successful SL3000 playback on my machine in the WWA JS sample app. I'm not seeing any keysystem listed in it, though, but maybe I'm looking in wrong places. Thank you again. |
Beta Was this translation helpful? Give feedback.
#3859 is merged, thank you all for the feedback. I am converting this to a discussion thread.