Skip to content

v2.0.0-alpha.32

Pre-release
Pre-release
Compare
Choose a tag to compare
@benwiley4000 benwiley4000 released this 08 Apr 06:28
· 86 commits to next since this release

One of the last pre-beta releases!

Breaking changes

PlayerContextProvider takes a few event callbacks.. onActiveTrackUpdate, onTimeUpdate and onTrackPlaybackFailure. In order to preempt future problems where we want to add more function arguments and the call signatures get unwieldy, we're going to convert these all to single-argument hashes while we're still allowed to make breaking changes.

Before

  • onActiveTrackUpdate(track, trackIndex)
  • onTimeUpdate(currentTime, track, trackIndex)
  • onTrackPlaybackFailure(track, trackIndex, event)

Now

  • onActiveTrackUpdate({ track, trackIndex })
  • onTimeUpdate({ currentTime, track, trackIndex })
  • onTrackPlaybackFailure({ track, trackIndex, event })

New features

One motivation for the change above was wanting to minimize confusion while supporting previousTrack and previousTrackIndex arguments for onActiveTrackUpdate. So now you can have:

onActiveTrackUpdate({ track, trackIndex, previousTrack, previousTrackIndex })