Skip to content

v2.0.0-alpha.27

Pre-release
Pre-release
Compare
Choose a tag to compare
@benwiley4000 benwiley4000 released this 18 Feb 07:15
· 119 commits to next since this release

This release contains a bunch of stuff, almost all related to time and duration.

There are breaking changes, although the majority of users will likely be unaffected.

Breaking changes

  • The startingTime prop, which was new for the v2 alpha, has been removed and replaced by the optional startingTime property on the playlist track object (#369)
  • The new isUnboundedStream track property should be set to true for any track that is an unbounded live stream. Otherwise loading the source will take twice as long as before (nothing will break, though). Typical time-bound sources are unaffected. (#373)
  • If you were reading the internals of the Cassette state snapshot in your program, your program will break. If you were using the snapshot in a normal way, nothing will break. If this does break your program and you don't know what to do, please open an issue so we can find a good solution for your use case! 🙂

Changes that almost definitely won't break anything

  • currentTime state set on media element after loadeddata event instead of loadedmetadata event, and trackLoading now remains true until the canplay event has fired (#370)
  • The context duration property is now always a number even if a live stream is playing (#377)
  • currentTime from snapshot no longer respected for live streams (#378)

Features

  • New duration playlist track property (which can be specified as a number in milliseconds, or a mm:ss/hh:mm:ss formatted string) is used as a stand-in until the track's metadata has loaded. Specifying this will make track loads feel snappier. (#372)
  • The startingTime playlist track property can be used to restore previous timestamps of tracks that were skipped before being finished. It is the developer's responsibility to store and retrieve the timestamp as well as update it in the playlist at runtime if needed, as the track will begin at its defined startingTime each time it is played. For most applications this is not needed. (#369)
  • The onTimeUpdate prop to PlayerContextProvider can be used to save track timestamps to be used for the startingTime property (#369)
  • New durationOverride prop is optional for MediaProgress, MediaProgressDisplay, MediaProgressBar and MediaProgressBarDisplay. Not needed for most cases but may be desirable for a live stream in order to display the maximum seekable range even while the playing/buffering section is offset in the past. (#379)

Fixes

  • Prevent crossOrigin issues in Microsoft Edge (#368)
  • currentTime gets set correctly on iOS (#370)
  • Prevent bad display and seeking issues for unbounded live streams by using the maximum visited timestamp as the duration (#377)
  • No more unresponsive hangs when restoring a non-zero currentTime from snapshot for a live stream source - the time will be reset to 0 (and new snapshots won't save the currentTime for live stream sources) (#378)
  • Prevent Infinity track duration for non-live stream sources on iOS (#373)