Long `EMEController. destroy` block the next time setMediaKeys
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:
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.
@JackPu has this issue been resolved by #7050 or other recent EME PRs?
- #7050
- #7284
- #7287
Is a timeout on CDMCleanupPromise still missing?