Closed brandonocasey closed 4 years ago
I don't think the encrypted event will fire after a key expires unless the source is reset using player.src
. The only potential event that could fire is license-renewal
but that will fail after the key is already expired as renewals have to happen before a key expires.
And the expired thing only happens for the current stream? It isn't likely that we'll get an expired response after we had already changes sources or something like that, right?
It will only happen after the current stream/source. I think we reset all sessions between sources.
There is a "license-renewal" message.type from MediaKeyMessageEvent, which is fired by keySession.
What is the purpose of closing and removing keySession when receive 'expired'? Is it possible to keep the keySession after expired and wait for renewal?
Re request the key when the session is expired. This fixes multiple potential issues:
I don't think we should have any problems doing this because if the user no longer has access to the key or we fail to get the key after expiration then we will still fail to create a new session. If they do still have access though we will get a new session and continue playback as expected.