Can we wrap this in a function to make sure that `disposeMediaElement` isn't deoptimized by js engines for having a try/catch?