Bug 1546865 Comment 6 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

If this is only an issue with audio—which seems to be the case—then I vote we hack it at the primary call site for `Start()` in *InitializeAsync*. The other place we call it, for mute/unmute shouldn't need changing.

Basically: pick a specific error code, and check for it [here](https://searchfox.org/mozilla-central/rev/b756e6d00728dda4121f8278a744381d8643317a/dom/media/MediaManager.cpp#4136) and if it matches, wait 200 ms and try again.

If we do that, we should use a [timer](https://searchfox.org/mozilla-central/rev/b756e6d00728dda4121f8278a744381d8643317a/dom/base/nsDOMNavigationTiming.cpp#452-460)—maybe make a nice `media::Wait(200)` function that returns a MozPromise? And not [jank](https://searchfox.org/mozilla-central/rev/b756e6d00728dda4121f8278a744381d8643317a/dom/media/MediaManager.cpp#2179).
If this is only an issue with audio—which seems to be the case—then I vote we hack it at the primary call site for `Start()` in *InitializeAsync*. The other place we call it, for mute/unmute shouldn't need changing.

Basically: pick a specific error code, and check for it [here](https://searchfox.org/mozilla-central/rev/b756e6d00728dda4121f8278a744381d8643317a/dom/media/MediaManager.cpp#4136) and if it matches, wait 200 ms and try one more time before giving up.

If we do that, we should use a [timer](https://searchfox.org/mozilla-central/rev/b756e6d00728dda4121f8278a744381d8643317a/dom/base/nsDOMNavigationTiming.cpp#452-460)—maybe make a nice `media::Wait(200)` function that returns a MozPromise? And not [jank](https://searchfox.org/mozilla-central/rev/b756e6d00728dda4121f8278a744381d8643317a/dom/media/MediaManager.cpp#2179).

Back to Bug 1546865 Comment 6