[EME] reuse of session

As to the reuse of session by promise, would it be better that CDM determines whether to create a new media key session?

According to createSession algorithm step 6-1, a user agent determines it by checking list of active session Initialization Data.
As the user agent is not aware of the DRM specific part of initData (except for container-independent initData Bug 25269<https://www.w3.org/Bugs/Public/show_bug.cgi?id=25269>), the user agent can compare the entire of initData but it is impossible to look into the content of initData to see if requesting keyIds are available in active sessions.
.
This means, an application suffers unnecessary creating media key sessions as follows, for instance;

1. Prefetch license(s) by media key session initiated by container-independent initData including superset keyIds; e.g. KIDs for audio and video tracks, for a subsequent media presentation (at MPD fetch time)
2. When each initialization Data contains a pssh, it causes unnecessary media key session because the cenc-formatted initData is not identical to the preceding initData at step1; i.e. container-independent pssh, pssh for audio and pssh for video are all distinct.

Key rotation may be a another usecase. Reusing a media key session by just updating available keys within the session maybe provide some benefit but it is not possible because the pssh that requires new key(s) is most probably distinct from other active initData.

Thanks,
Shinya

Received on Thursday, 24 April 2014 05:15:32 UTC