What are your media track handling tips?
In preparing my latest track handling blog post I ran into so many gotchas and caveats to consider (especially in Safari), that I'm fully expecting to evolve my approach (and likely the post) as time goes on. Do you have any tips for juggling media tracks on DOM elements? A few I'd point out are:
* Be sure to set media DOM element `srcObject` to `null` on disposal to avoid leaky WebMediaPlayers
* Avoid re-setting tracks more than necessary (eg when they haven't actually changed)
* Account for `"NotAllowedError"` blocking autoplay, and present a button to the user that allows them to click a button to play media manually if they encounter this
* Prepare a big cup of coffee and a bowl for your tears when testing your implementation in Safari