HbbTV-Association / ReferenceApplication

MIT License
80 stars 32 forks source link

Persistent license test case #83

Open Murmur opened 7 months ago

Murmur commented 7 months ago

Staging app has Playready2/2.18.1 Persistent license and Playready2/2.18.2 Persistent license(Playready.recommendation) test cases. 2024-09-19: test on HbbTV1, HbbTV2 and mse-eme(dashjs) modes 2024-04-02: test on HbbTV1 and HbbTV2 modes https://refapp.hbbtv.org/staging/catalogue/

Playready laUrl links to a persist=yes license object with an expiration of 2 minutes. RefApp displayes a notification at 5sec after a playback. usePersist=YES(reused a local license) | usePersist=NO(laurl was invoked)

HbbTV1(AVObject, oipfDrm) and HbbTV2(html5Video, oipfDrm): System handles all the details such as drmSessionId and decision how to match an existing offline drm license to a playback content. RefApp is using a proxy laurl script to tell if laurl was invoked or not.

MSEEME(dashjs): App stores a drmSessionId to browser's localstorage, value is restored at the start of playback. If session is invalid then playback continues with a fresh LaUrl invocation.

Test content has a dedicated KeyID+EncKey for this persistency test not to be used in other tests.

Murmur commented 1 month ago

Staging app has an implementation of MSEEME(dashjs) persistent license. Windows MSEdge users should use a 2.18.2 Persistent license(Playready.recommendation) test case to initialize a new drm middleware. Older playready middleware on 2.18.1 Persistent license does not fully support a persistency.

TVs may not support com.microsoft.playready.recommendation drm sysId identifier, Refapp is using a fallback to an old sysId even if 2.18.2 test was to be played.

https://refapp.hbbtv.org/staging/catalogue/

TV devices Devices may have a different flavor of EME implementation model, some TVs may

Application shall implement a failsafe timer to recognize a stalled EME and restart a playback without drmSessionId or show an error on screen. RefApp listen only for EME.KEY_SESSION_CREATED and EME.KEY_STATUSES_CHANGED events to have the requirement to a minimum level.

Edge browser supports error messages and the removal of session:

evt.error.code=110, .message="DRM: KeyStatusChange error! -- License has expired"
evt.error.code=113, .message="DRM: unable to create session! --Could not load session (xIIQgEOogigurOuL4bCQ7nQ==)! InvalidStateError"

evt.KeySessionRemoved sent after the drmSessionId is removed from the EME.