Skip to content

Multi-key handling #7474

@robwalch

Description

@robwalch

hls.js handles multiple keys by creating a new key-session per key-id. Let's see if we can reduce license requests when a session provides multiple key-statuses.

Uncovered while working on #7414:

Commented on flaws in MediaKeySessionContext that limit handling of key sessions to a single key ID. Grouping of sessions by KEY URI and handling multiple keys (level key objects and key statuses) will be addressed in a future release.

export interface MediaKeySessionContext {
keySystem: KeySystems;
mediaKeys: MediaKeys;
decryptdata: LevelKey; // FIXME: LevelKey has a URI which should be bound to the session, but is dependent one KeyId specifically. Session context should be allowed to adopt multiple level keys.
mediaKeysSession: MediaKeySession;
keyStatus: MediaKeyStatus; // FIXME: MediaKeySession can manage multiple keys with each with its own status

Originally posted by @robwalch in #7414 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Top priorities

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions