Skip to content

Long EMEController. destroy block the next time setMediaKeys #6806

Open
@JackPu

Description

@JackPu

Is your feature request related to a problem? Please describe.

We recently used a class public static property(CDMCleanupPromise) to track the EME destroy promise.

https://github.com/video-dev/hls.js/blob/master/src/controller/eme-controller.ts#L1261

There is a hidden issue like this:

image

If our destroying promise cannot be resolved or rejected(mediaKeySession.remove cannot resolve), the next time we will fail to setMediaKeys: https://github.com/video-dev/hls.js/blob/master/src/controller/eme-controller.ts#L693-L710

We have found the issue on the Samsung and Comcast platforms. It seems cannot reolsve the method mediaKeySession.remove().

Describe the solution you'd like

I plan to add maxEMEDetroyTimeout config. We will force to clear the CDMCleanupPromise value if we reach the max timeout value.

Additional context

It worked well on most platforms. However, it failed on some low-performance OTT devices from Comcast. I didn't find any error report when destroying the instance. And I remove the CDMCleanupPromise setter when destroying. It could work for me.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature proposalNeeds TriageIf there is a suspected stream issue, apply this label to triage if it is something we should fix.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions