muxinc / mux-stats-sdk-avplayer

Mux integration with `AVPlayer` for iOS Native Applications
Apache License 2.0
45 stars 21 forks source link

fix: improve AVPlayer currentItem transition handling #247

Closed andrewjl-mux closed 3 months ago

andrewjl-mux commented 3 months ago
andrewjl-mux commented 3 months ago

Before this change we'd dispatch a viewinit event whenever AVPlayer currentItem changed. This fix also dispatches viewend before that, which is closer to how we work on Android and in mux-embed.

This un-breaks the edge case where destroyPlayer is called at the same time as when these other transitions are happening.