library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/DefaultHlsPlaylistTracker.java
/**
   * Called by the bundles when a snapshot changes.
   *
   * @param url The url of the playlist.
   * @param newSnapshot The new snapshot.
   */
Called by the bundles when a snapshot changes.
@param url The url of the playlist.
@param newSnapshot The new snapshot.
Called by the bundles when a snapshot changes . @param url The url of the playlist . @param newSnapshot The new snapshot .
private void onPlaylistUpdated(Uri url, HlsMediaPlaylist newSnapshot) {
    if (url.equals(primaryMediaPlaylistUrl)) {
      if (primaryMediaPlaylistSnapshot == null) {
        isLive = !newSnapshot.hasEndTag;
        initialStartTimeUs = newSnapshot.startTimeUs;
      }
      primaryMediaPlaylistSnapshot = newSnapshot;
      primaryPlaylistListener.onPrimaryPlaylistRefreshed(newSnapshot);
    }
    int listenersSize = listeners.size();
    for (int i = 0; i < listenersSize; i++) {
      listeners.get(i).onPlaylistChanged();
    }
  }
private void onPlaylistUpdated ( Uri url , HlsMediaPlaylist newSnapshot ) { if ( url . equals ( primaryMediaPlaylistUrl ) ) { if ( primaryMediaPlaylistSnapshot == null ) { isLive = ! newSnapshot . hasEndTag ; initialStartTimeUs = newSnapshot . startTimeUs ; } primaryMediaPlaylistSnapshot = newSnapshot ; primaryPlaylistListener . onPrimaryPlaylistRefreshed ( newSnapshot ) ; } int listenersSize = listeners . size ( ) ; for ( int i = 0 ; i < listenersSize ; i ++ ) { listeners . get ( i ) . onPlaylistChanged ( ) ; } }
Called by the bundles when a snapshot changes.
Called by the bundles when a snapshot changes .
// This is the first primary url snapshot.