Loading
Bug 1743834 - Shut down the AudioSink when audio is muted. r=alwu,media-playback-reviewers
This does the following: - When the media is muted, shut down and release the AudioSink ; - While the media is muted, use the system clock to make video advance ; - Each time the clock is queried, check if some audio packets should be discarded because they are in the past, compared to the media time ; - While muted, if the audio finished, resolve the EndedPromise ; - When the media is un-muted, a new AudioSink is created, and its clock starts to be in use. This works well and A/V sync is correct, but a micro-stuttering is perceptible on the video when looking carefully, because of the time it takes to open the audio stream. This is fixed in subsequent patches. Differential Revision: https://phabricator.services.mozilla.com/D136234