(In reply to Karl Tomlinson (:karlt) from comment #0) > That's true as far as the fact that `MediaEncoder::Shutdown()` gets called, but resolution of the promise it returns and `EncoderListener::Shutdown()` are blocked on `MediaEncoder::AudioTrackListener::mShutdownPromise`, The first promise in the chain returned from `MediaEncoder::Shutdown()` is waiting for the listeners to be removed from their tracks. Removal of listeners from tracks would be triggered from `MediaEncoder::Stop()` from `MediaEncoder::Cancel()` after `Session::Shutdown()` after `Session::DoSessionEndTask()` after `Session::MediaEncoderShutdown()` from `EncoderListener::Shutdown()`, which is not called until the promise resolves.
Bug 1616175 Comment 1 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
(In reply to Karl Tomlinson (:karlt) from comment #0) > That's true as far as the fact that `MediaEncoder::Shutdown()` gets called, but resolution of the promise it returns and `EncoderListener::Shutdown()` are blocked on `MediaEncoder::AudioTrackListener::mShutdownPromise`, The first promise in the chain returned from `MediaEncoder::Shutdown()` is waiting for the listeners to be removed from their tracks. Removal of listeners from tracks would be triggered from `MediaEncoder::Stop()` from `MediaEncoder::Cancel()` after `Session::Shutdown()` after `Session::DoSessionEndTask()` after `Session::MediaEncoderShutdown()` from `Session::EncoderListener::Shutdown()`, which is not called until the promise resolves.