library/core/src/main/java/com/google/android/exoplayer2/source/ConcatenatingMediaSource.java
public final synchronized void addMediaSource(int index, MediaSource mediaSource) {
    addPublicMediaSources(
        index,
        Collections.singletonList(mediaSource),
        /* handler= */ null,
        /* onCompletionAction= */ null);
  }
/**
   * Adds a {@link MediaSource} to the playlist.
   *
   * @param index The index at which the new {@link MediaSource} will be inserted. This index must
   *     be in the range of 0 &lt;= index &lt;= {@link #getSize()}.
   * @param mediaSource The {@link MediaSource} to be added to the list.
   */
Adds a  MediaSource to the playlist.
@param index The index at which the new  MediaSource will be inserted. This index must
be in the range of 0 <= index <=  #getSize().
@param mediaSource The  MediaSource to be added to the list.
Adds a MediaSource to the playlist . @param index The index at which the new MediaSource will be inserted . This index must be in the range of 0 < = index < = #getSize () . @param mediaSource The MediaSource to be added to the list .
public final synchronized void addMediaSource(int index, MediaSource mediaSource) {
    addPublicMediaSources(
        index,
        Collections.singletonList(mediaSource),
        /* handler= */ null,
        /* onCompletionAction= */ null);
  }
public final synchronized void addMediaSource ( int index , MediaSource mediaSource ) { addPublicMediaSources ( index , Collections . singletonList ( mediaSource ) , /* handler= */ null , /* onCompletionAction= */ null ) ; }
Adds a {@link MediaSource} to the playlist.
Adds a { @link MediaSource } to the playlist .