code: function getGoToTrackState({
    prevState,
    index,
    track,
    shouldPlay = true,
    shouldForceLoad = false
  }) {
    const isNewTrack = prevState.activeTrackIndex !== index;
    const shouldLoadAsNew = Boolean(isNewTrack || shouldForceLoad);
    const currentTime = track.startingTime || 0;
    return {
      duration: getInitialDuration(track),
      activeTrackIndex: index,
      trackLoading: shouldLoadAsNew,
      mediaCannotPlay: prevState.mediaCannotPlay && !shouldLoadAsNew,
      currentTime: convertToNumberWithinIntervalBounds(currentTime, 0),
      loop: shouldLoadAsNew ? false : prevState.loop,
      shouldRequestPlayOnNextUpdate: Boolean(shouldPlay),
      awaitingPlayAfterTrackLoad: Boolean(shouldPlay),
      awaitingForceLoad: Boolean(shouldForceLoad),
      maxKnownTime: shouldLoadAsNew ? 0 : prevState.maxKnownTime
    };
  }
docs: assumes playlist is valid