-
Notifications
You must be signed in to change notification settings - Fork 428
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
playlists with 'usable' keystatus feature #1465
Comments
Thank you very much for this feedback @BucherTomas we should support the configuration from your test stream, as the new feature will only enable playlists with keyIds that have a matching keyId from the MediaKeyStatusMap. I found one of the problems and created a draft PR to fix it, seemed to be a matching problem with the keyIds in the provided manifest being uppercase and the keyIds from the MediaKeyStatusMap always being lowercase. You can try the build here. Obviously there will be room for future improvement, so your continued feedback is very much appreciated. The current implementation should react to ad-hoc changes to the keystatus as long as the MediaKeyStatusMap reflects the status change on a |
Thank you for the quick reaction @adrums86 . Our team provided PR videojs/mpd-parser#157 to mpd-parser some time ago for this exact reason, so it has not occured to me that it could be the same situation. It works in this preview version and it could be therefore merged to the main branch. I am going to test some more multikey stream examples with various license restrictions next week with a computer configuration with multiple monitors. But I would also put some emphasis on handling the PlayReady environment as well, because otherwise this filtering solution of usable tracks is still not ready for real usage with multiple DRM systems in its current state. You can use the same stream example, just add the keysystem for PlayReady and simply replace the license server domain to drm-playready-licensing.axtest.net, the rest of the url remains the same. This #1424 needs to be fixed first. Thank you in advance. |
@BucherTomas Merged #1466 which should fix the widevine example. Will work on some verification of the PlayReady environment as soon as I'm able. Regarding the |
I tested it some more as I promised previously. Generally, the feature works with Widevine as expected, happy to see that the player tries to react to ad-hoc keystatus changes. But:
This time I used a license where HD tracks are usable on desktop Chrome with Widevine L3 but just require HDCP 2.0. SD tracks are without restrictions. Please use Start the playback on a notebook with integrated HDCP 2.0+ display. In this case all playlists are correctly enabled, i.e. all key ids are usable but the log states
playlists 4 and 5 with key ID
Also it appears that there is no handling of Thank you in advance for making the feature more robust. |
There were some more tests planned by the team, particularly with PlayReady, but it appears to have lost its momentum. Have you managed to take a look at some of it? There is an additional issue with PlayReady, likely related to this topic where even streams with one non-restrictive single key for all dash representations are being postprocessed and HD and higher representations are filtered out, even though both the license and codec are supported within the given environment. The console outputs:
However, seeing the enumeration from EME Logger extension, MediaKeyStatusMap returned that key id is "usable" so this result is of course wrong. This concerns just PlayReady, Widevine works fine in this situation. We can see it with our own streams, but here is one public PlayReady stream from Microsoft where HD and higher representations are accessible in other tested players, just not in Video.js. Thank you. |
@BucherTomas thank you for your persistence here. The core contributors for the entire video.js org have been quite busy lately so much of this work has been getting pushed back. That said, we do have some planned stabilization/improvement work in the near-ish future that this work can absolutely be a part of. I unfortunately cannot provide a solid timeline however. I'm going to add a point to revisit and improve this |
@adrums86 I believe the issue might stem from key ID endianness. PlayReady is based on Little Endian, so the order of key ID must be handled differently. There is a hint that I overlooked in the console with that Microsoft stream example:
Both lines are referencing the same KID, but each time it is using different endianness. That's why it likely doesn't match and the |
Good catch, I thought I had handled the endian inconsistencies between keysystems but apparently not. When I'm able to dig into this, I'll start there. |
This is a feedback to the recently added feature of using only playlists with
usable
keystatus from #1460 in version 3.9.0 so apologies it does not follow the ticket template.It is a welcome addition to the library, thank you, but it does not appear too robust at the current stage.
Here is a test stream where HD tracks require hardware-backed Widevine decryption, so all-in-all an emulation of somewhat strict real-world stream conditions:
https://videojs-http-streaming.netlify.app/?debug=true&autoplay=false&muted=false&fluid=true&minified=false&sync-workers=false&liveui=true&llhls=true&url=https%3A%2F%2F1798253129.ssl.cdn.cra.cz%2FUHD%2Ffull%2Fhddrm.ism%2Fmpdmod%2F.mpd&type=application%2Fdash%2Bxml&keysystems=%7B%0A%20%20%22com.widevine.alpha%22%3A%20%7B%0A%20%20%20%20%22url%22%3A%20%22https%3A%2F%2Fdrm-widevine-licensing.axtest.net%2FAcquireLicense%3Faxdrmmessage%3DeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb21fa2V5X2lkIjoiNjVGM0JCNjItQUUwMS00MThGLUFCNkUtRTlBNTgwOUU3MEIxIiwibWVzc2FnZSI6eyJjb250ZW50X2tleV91c2FnZV9wb2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biI6MiwidHlwZSI6ImVudGl0bGVtZW50X21lc3NhZ2UiLCJjb250ZW50X2tleXNfc291cmNlIjp7ImlubGluZSI6W3sidXNhZ2VfcG9saWN5Ijoic2RzZWMiLCJpZCI6ImY1YmYzM2FjLTA4NDQtMGM4MS1kNjIzLTAxOWM4N2ZlMTM2MCIsIml2IjoiVDNIZUw4emIyTExnb2dkVmI5a1h3UT09In0seyJ1c2FnZV9wb2xpY3kiOiJoZHNlYyIsImlkIjoiZjRlYThkYjgtNzZhZS05YzhjLTJhMjEtOTg4MmQ3NjNiYzdkIiwiaXYiOiJpRXVLTEFRMElvYVpzZ3Voc0s1SENRPT0ifSx7InVzYWdlX3BvbGljeSI6ImF1ZGlvIiwiaWQiOiJmZjE0ZmM5Yy1iOGM3LTYwNjctY2Q0Yy1hY2YyOTQzNjU4NWEiLCJpdiI6Im1rUTA2bENFdG45YkVLYStzSUpMUGc9PSJ9XX0sImxpY2Vuc2UiOnsiZHVyYXRpb24iOjYwNDgwMCwid2lkZXZpbmUiOnsiaW5jbHVkZV9hbGxfZW50aXRsZWRfa2V5cyI6dHJ1ZX19fSwidmVyc2lvbiI6MX0.rxbmZ8KWPdqigtrvXhvB76d2NKjSMFuHGBt5U8rsEnM%22%0A%20%20%7D%0A%7D&buffer-water=false&exact-manifest-timings=false&pixel-diff-selector=false&network-info=false&dts-offset=false&override-native=true&preload=auto&mirror-source=false&forced-subtitles=false
The same stream configuration works as expected on desktop Chrome with Widevine L3 in players such as Shaka or Bitmovin and representations with higher resolution than 576p are removed from the stream. By the way, L2 or L1 are also becoming available for desktop Chrome on Windows with "
com.widevine.alpha.experiment
" keysystem, so this should be also something for you to take into account in the near future, but I digress.The same stream fails in VHS once HD tracks are selected, because their keyID
f4ea8db876ae9c8c2a219882d763bc7d
is apparently still used and not filtered out even though according to EME logger extension, theMediaKeyStatusMap
includes just video SD keyIDf5bf33ac08440c81d623019c87fe1360
and audio track keyIDff14fc9cb8c76067cd4cacf29436585a
, both tagged asusable
. License server does not provide in this case any response forf4ea8db876ae9c8c2a219882d763bc7d
at all, which is recommended, so it is not present even tagged asoutput-restricted
for example. You can see for yourselves with the stream above.The test stream configuration above is for Widevine. To expand on this implementation also for PlayReady, it behaves differently and if a keyID is unusable in current context (for example requesting SL3000 license for HD tracks from a SL2000 device), the license server may instead return status code 500 for the license associated with HD tracks but all the others will be fine. In current state, this is a fatal failure for the player. Instead the player should continue, attempt to utilize all the remaining usable licenses and again remove unusable representations from the stream for which the license request failed. PlayReady might also already need the
com.microsoft.playready.recommendation
andcom.microsoft.playready.recommendation.3000
keysystems.Also a question, does the implemented logic react to ad-hoc changes in keystatus? For example:
output-restricted
The same should be applicable also in reverse when you disconnect the external monitor which should enable the HD tracks again.
The text was updated successfully, but these errors were encountered: