> Documentation index: https://developer.android.com/reference/llms.txt

# ConcatenatingMediaSource

Artifact: [androidx.media3:media3-exoplayer](https://developer.android.com/jetpack/androidx/releases/media3.md.txt) [View Source](https://cs.android.com/search?q=file:androidx/media3/exoplayer/source/ConcatenatingMediaSource.java+class:androidx.media3.exoplayer.source.ConcatenatingMediaSource)

*** ** * ** ***


```
@UnstableApi
class ConcatenatingMediaSource : CompositeMediaSource<ConcatenatingMediaSource.MediaSourceHolder!>
```

<br />

|---|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) ||||
| ↳ | [androidx.media3.exoplayer.source.BaseMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/BaseMediaSource.md.txt) |||
|   | ↳ | [androidx.media3.exoplayer.source.CompositeMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/CompositeMediaSource.md.txt)\<[ConcatenatingMediaSource.MediaSourceHolder](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource.MediaSourceHolder.md.txt)!\> ||
|   |   | ↳ | [androidx.media3.exoplayer.source.ConcatenatingMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource.md.txt) |

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
>
> Use playlist modification methods like `addMediaItem` instead. To combine multiple sources together as one item or for further wrapping in other `MediaSource` instances, use `ConcatenatingMediaSource2` instead.

Concatenates multiple `MediaSource` instances. The list of `MediaSource` instances can be modified during playback. It is valid for the same `MediaSource` instance to be present more than once in the concatenation. Access to this class is thread-safe.

## Summary

| ### Nested types |
|---|
| `protected class ConcatenatingMediaSource.MediaSourceHolder` **This class is deprecated.** Deprecated in Java |

| ### Public constructors |
|---|
| `[ConcatenatingMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#ConcatenatingMediaSource(androidx.media3.exoplayer.source.MediaSource...))(mediaSources: Array<MediaSource!>!)` **This function is deprecated.** Deprecated in Java |
| `[ConcatenatingMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#ConcatenatingMediaSource(boolean,androidx.media3.exoplayer.source.MediaSource...))( isAtomic: Boolean, mediaSources: Array<MediaSource!>! )` **This function is deprecated.** Deprecated in Java |
| `[ConcatenatingMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#ConcatenatingMediaSource(boolean,androidx.media3.exoplayer.source.ShuffleOrder,androidx.media3.exoplayer.source.MediaSource...))( isAtomic: Boolean, shuffleOrder: ShuffleOrder!, mediaSources: Array<MediaSource!>! )` **This function is deprecated.** Deprecated in Java |
| `[ConcatenatingMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#ConcatenatingMediaSource(boolean,boolean,androidx.media3.exoplayer.source.ShuffleOrder,androidx.media3.exoplayer.source.MediaSource...))( isAtomic: Boolean, useLazyPreparation: Boolean, shuffleOrder: ShuffleOrder!, mediaSources: Array<MediaSource!>! )` **This function is deprecated.** Deprecated in Java |

| ### Public functions |
|---|---|
| `synchronized Unit` | `[addMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#addMediaSource(androidx.media3.exoplayer.source.MediaSource))(mediaSource: MediaSource!)` **This function is deprecated.** Deprecated in Java |
| `synchronized Unit` | `[addMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#addMediaSource(int,androidx.media3.exoplayer.source.MediaSource))(index: Int, mediaSource: MediaSource!)` **This function is deprecated.** Deprecated in Java |
| `synchronized Unit` | `[addMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#addMediaSource(androidx.media3.exoplayer.source.MediaSource,android.os.Handler,java.lang.Runnable))( mediaSource: MediaSource!, handler: Handler!, onCompletionAction: Runnable! )` **This function is deprecated.** Deprecated in Java |
| `synchronized Unit` | `[addMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#addMediaSource(int,androidx.media3.exoplayer.source.MediaSource,android.os.Handler,java.lang.Runnable))( index: Int, mediaSource: MediaSource!, handler: Handler!, onCompletionAction: Runnable! )` **This function is deprecated.** Deprecated in Java |
| `synchronized Unit` | `[addMediaSources](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#addMediaSources(java.util.Collection<androidx.media3.exoplayer.source.MediaSource>))(mediaSources: (Mutable)Collection<MediaSource!>!)` **This function is deprecated.** Deprecated in Java |
| `synchronized Unit` | `[addMediaSources](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#addMediaSources(int,java.util.Collection<androidx.media3.exoplayer.source.MediaSource>))( index: Int, mediaSources: (Mutable)Collection<MediaSource!>! )` **This function is deprecated.** Deprecated in Java |
| `synchronized Unit` | `[addMediaSources](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#addMediaSources(java.util.Collection<androidx.media3.exoplayer.source.MediaSource>,android.os.Handler,java.lang.Runnable))( mediaSources: (Mutable)Collection<MediaSource!>!, handler: Handler!, onCompletionAction: Runnable! )` **This function is deprecated.** Deprecated in Java |
| `synchronized Unit` | `[addMediaSources](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#addMediaSources(int,java.util.Collection<androidx.media3.exoplayer.source.MediaSource>,android.os.Handler,java.lang.Runnable))( index: Int, mediaSources: (Mutable)Collection<MediaSource!>!, handler: Handler!, onCompletionAction: Runnable! )` **This function is deprecated.** Deprecated in Java |
| `synchronized Unit` | `[clear](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#clear())()` **This function is deprecated.** Deprecated in Java |
| `synchronized Unit` | `[clear](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#clear(android.os.Handler,java.lang.Runnable))(handler: Handler!, onCompletionAction: Runnable!)` **This function is deprecated.** Deprecated in Java |
| `MediaPeriod!` | `[createPeriod](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#createPeriod(androidx.media3.exoplayer.source.MediaSource.MediaPeriodId,androidx.media3.exoplayer.upstream.Allocator,long))( id: MediaSource.MediaPeriodId!, allocator: Allocator!, startPositionUs: Long )` **This function is deprecated.** Deprecated in Java |
| `synchronized Timeline!` | `[getInitialTimeline](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#getInitialTimeline())()` **This function is deprecated.** Deprecated in Java |
| `MediaItem!` | `[getMediaItem](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#getMediaItem())()` **This function is deprecated.** Deprecated in Java |
| `synchronized MediaSource!` | `[getMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#getMediaSource(int))(index: Int)` **This function is deprecated.** Deprecated in Java |
| `synchronized Int` | `[getSize](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#getSize())()` **This function is deprecated.** Deprecated in Java |
| `Boolean` | `[isSingleWindow](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#isSingleWindow())()` **This function is deprecated.** Deprecated in Java |
| `synchronized Unit` | `[moveMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#moveMediaSource(int,int))(currentIndex: Int, newIndex: Int)` **This function is deprecated.** Deprecated in Java |
| `synchronized Unit` | `[moveMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#moveMediaSource(int,int,android.os.Handler,java.lang.Runnable))( currentIndex: Int, newIndex: Int, handler: Handler!, onCompletionAction: Runnable! )` **This function is deprecated.** Deprecated in Java |
| `Unit` | `[releasePeriod](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#releasePeriod(androidx.media3.exoplayer.source.MediaPeriod))(mediaPeriod: MediaPeriod!)` **This function is deprecated.** Deprecated in Java |
| `synchronized MediaSource!` | `[removeMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#removeMediaSource(int))(index: Int)` **This function is deprecated.** Deprecated in Java |
| `synchronized MediaSource!` | `[removeMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#removeMediaSource(int,android.os.Handler,java.lang.Runnable))( index: Int, handler: Handler!, onCompletionAction: Runnable! )` **This function is deprecated.** Deprecated in Java |
| `synchronized Unit` | `[removeMediaSourceRange](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#removeMediaSourceRange(int,int))(fromIndex: Int, toIndex: Int)` **This function is deprecated.** Deprecated in Java |
| `synchronized Unit` | `[removeMediaSourceRange](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#removeMediaSourceRange(int,int,android.os.Handler,java.lang.Runnable))( fromIndex: Int, toIndex: Int, handler: Handler!, onCompletionAction: Runnable! )` **This function is deprecated.** Deprecated in Java |
| `synchronized Unit` | `[setShuffleOrder](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#setShuffleOrder(androidx.media3.exoplayer.source.ShuffleOrder))(shuffleOrder: ShuffleOrder!)` **This function is deprecated.** Deprecated in Java |
| `synchronized Unit` | `[setShuffleOrder](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#setShuffleOrder(androidx.media3.exoplayer.source.ShuffleOrder,android.os.Handler,java.lang.Runnable))( shuffleOrder: ShuffleOrder!, handler: Handler!, onCompletionAction: Runnable! )` **This function is deprecated.** Deprecated in Java |

| ### Protected functions |
|---|---|
| `Unit` | `[disableInternal](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#disableInternal())()` **This function is deprecated.** Deprecated in Java |
| `Unit` | `[enableInternal](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#enableInternal())()` **This function is deprecated.** Deprecated in Java |
| `MediaSource.MediaPeriodId?` | `[getMediaPeriodIdForChildMediaPeriodId](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#getMediaPeriodIdForChildMediaPeriodId(androidx.media3.exoplayer.source.ConcatenatingMediaSource.MediaSourceHolder,androidx.media3.exoplayer.source.MediaSource.MediaPeriodId))( childSourceId: ConcatenatingMediaSource.MediaSourceHolder!, mediaPeriodId: MediaSource.MediaPeriodId! )` **This function is deprecated.** Deprecated in Java |
| `Int` | `[getWindowIndexForChildWindowIndex](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#getWindowIndexForChildWindowIndex(androidx.media3.exoplayer.source.ConcatenatingMediaSource.MediaSourceHolder,int))( childSourceId: ConcatenatingMediaSource.MediaSourceHolder!, windowIndex: Int )` **This function is deprecated.** Deprecated in Java |
| `Unit` | `[onChildSourceInfoRefreshed](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#onChildSourceInfoRefreshed(androidx.media3.exoplayer.source.ConcatenatingMediaSource.MediaSourceHolder,androidx.media3.exoplayer.source.MediaSource,androidx.media3.common.Timeline))( childSourceId: ConcatenatingMediaSource.MediaSourceHolder!, mediaSource: MediaSource!, newTimeline: Timeline! )` **This function is deprecated.** Deprecated in Java |
| `synchronized Unit` | `[prepareSourceInternal](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#prepareSourceInternal(androidx.media3.datasource.TransferListener))(mediaTransferListener: TransferListener?)` **This function is deprecated.** Deprecated in Java |
| `synchronized Unit` | `[releaseSourceInternal](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#releaseSourceInternal())()` **This function is deprecated.** Deprecated in Java |

### Inherited functions

From [androidx.media3.exoplayer.source.BaseMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/BaseMediaSource.md.txt) `Unit` `@UnstableApi
[addDrmEventListener](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/BaseMediaSource.md.txt#addDrmEventListener(android.os.Handler,androidx.media3.exoplayer.drm.DrmSessionEventListener))(
handler: Handler!,
eventListener: DrmSessionEventListener!
)`

**This function is deprecated.** Deprecated in Java
`Unit` `@UnstableApi
[addEventListener](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/BaseMediaSource.md.txt#addEventListener(android.os.Handler,androidx.media3.exoplayer.source.MediaSourceEventListener))(
handler: Handler!,
eventListener: MediaSourceEventListener!
)`

**This function is deprecated.** Deprecated in Java
`DrmSessionEventListener.EventDispatcher!` `[createDrmEventDispatcher](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/BaseMediaSource#createDrmEventDispatcher(androidx.media3.exoplayer.source.MediaSource.MediaPeriodId))(mediaPeriodId: MediaSource.MediaPeriodId?)`

**This function is deprecated.** Deprecated in Java
`DrmSessionEventListener.EventDispatcher!` `[createDrmEventDispatcher](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/BaseMediaSource.md.txt#createDrmEventDispatcher(int,androidx.media3.exoplayer.source.MediaSource.MediaPeriodId))(
windowIndex: Int,
mediaPeriodId: MediaSource.MediaPeriodId?
)`

**This function is deprecated.** Deprecated in Java
`MediaSourceEventListener.EventDispatcher!` `[createEventDispatcher](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/BaseMediaSource#createEventDispatcher(androidx.media3.exoplayer.source.MediaSource.MediaPeriodId))(mediaPeriodId: MediaSource.MediaPeriodId?)`

**This function is deprecated.** Deprecated in Java
`MediaSourceEventListener.EventDispatcher!` `[createEventDispatcher](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/BaseMediaSource.md.txt#createEventDispatcher(androidx.media3.exoplayer.source.MediaSource.MediaPeriodId,long))(
mediaPeriodId: MediaSource.MediaPeriodId!,
mediaTimeOffsetMs: Long
)`

**This function is deprecated.**

Use `createEventDispatcher` instead.

<br />

`MediaSourceEventListener.EventDispatcher!` `[createEventDispatcher](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/BaseMediaSource.md.txt#createEventDispatcher(int,androidx.media3.exoplayer.source.MediaSource.MediaPeriodId))(
windowIndex: Int,
mediaPeriodId: MediaSource.MediaPeriodId?
)`

**This function is deprecated.** Deprecated in Java
`MediaSourceEventListener.EventDispatcher!` `[createEventDispatcher](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/BaseMediaSource.md.txt#createEventDispatcher(int,androidx.media3.exoplayer.source.MediaSource.MediaPeriodId,long))(
windowIndex: Int,
mediaPeriodId: MediaSource.MediaPeriodId?,
mediaTimeOffsetMs: Long
)`

**This function is deprecated.**

Use `createEventDispatcher` instead.

<br />

`Unit` `@UnstableApi
[disable](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/BaseMediaSource.md.txt#disable(androidx.media3.exoplayer.source.MediaSource.MediaSourceCaller))(caller: MediaSource.MediaSourceCaller!)`

**This function is deprecated.** Deprecated in Java
`Unit` `@UnstableApi
[enable](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/BaseMediaSource.md.txt#enable(androidx.media3.exoplayer.source.MediaSource.MediaSourceCaller))(caller: MediaSource.MediaSourceCaller!)`

**This function is deprecated.** Deprecated in Java
`Boolean` `[isEnabled](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/BaseMediaSource#isEnabled())()`

**This function is deprecated.** Deprecated in Java
`Unit` `@UnstableApi
[prepareSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/BaseMediaSource.md.txt#prepareSource(androidx.media3.exoplayer.source.MediaSource.MediaSourceCaller,androidx.media3.exoplayer.analytics.PlayerId,androidx.media3.exoplayer.upstream.BandwidthMeter))(
caller: MediaSource.MediaSourceCaller!,
playerId: PlayerId!,
bandwidthMeter: BandwidthMeter!
)`

**This function is deprecated.** Deprecated in Java
`Boolean` `[prepareSourceCalled](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/BaseMediaSource#prepareSourceCalled())()`

**This function is deprecated.** Deprecated in Java
`Unit` `[refreshSourceInfo](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/BaseMediaSource#refreshSourceInfo(androidx.media3.common.Timeline))(timeline: Timeline!)`

**This function is deprecated.** Deprecated in Java
`Unit` `@UnstableApi
[releaseSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/BaseMediaSource.md.txt#releaseSource(androidx.media3.exoplayer.source.MediaSource.MediaSourceCaller))(caller: MediaSource.MediaSourceCaller!)`

**This function is deprecated.** Deprecated in Java
`Unit` `@UnstableApi
[removeDrmEventListener](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/BaseMediaSource.md.txt#removeDrmEventListener(androidx.media3.exoplayer.drm.DrmSessionEventListener))(eventListener: DrmSessionEventListener!)`

**This function is deprecated.** Deprecated in Java
`Unit` `@UnstableApi
[removeEventListener](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/BaseMediaSource.md.txt#removeEventListener(androidx.media3.exoplayer.source.MediaSourceEventListener))(eventListener: MediaSourceEventListener!)`

**This function is deprecated.** Deprecated in Java
From [androidx.media3.exoplayer.source.CompositeMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/CompositeMediaSource.md.txt) `Unit` `[disableChildSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/CompositeMediaSource#disableChildSource(T))(id: T!)`

**This function is deprecated.** Deprecated in Java
`Unit` `[enableChildSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/CompositeMediaSource#enableChildSource(T))(id: T!)`

**This function is deprecated.** Deprecated in Java
`Long` `[getMediaTimeForChildMediaTime](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/CompositeMediaSource.md.txt#getMediaTimeForChildMediaTime(T,long,androidx.media3.exoplayer.source.MediaSource.MediaPeriodId))(
childSourceId: T!,
mediaTimeMs: Long,
mediaPeriodId: MediaSource.MediaPeriodId?
)`

**This function is deprecated.** Deprecated in Java
`Unit` `@CallSuper
[maybeThrowSourceInfoRefreshError](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/CompositeMediaSource.md.txt#maybeThrowSourceInfoRefreshError())()`

**This function is deprecated.** Deprecated in Java
`Unit` `[prepareChildSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/CompositeMediaSource#prepareChildSource(T,androidx.media3.exoplayer.source.MediaSource))(id: T!, mediaSource: MediaSource!)`

**This function is deprecated.** Deprecated in Java
`Unit` `[releaseChildSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/CompositeMediaSource#releaseChildSource(T))(id: T!)`

**This function is deprecated.** Deprecated in Java
From [androidx.media3.exoplayer.source.MediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/MediaSource.md.txt) `Boolean` `@UnstableApi
[canUpdateMediaItem](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/MediaSource.md.txt#canUpdateMediaItem(androidx.media3.common.MediaItem))(mediaItem: MediaItem!)`

**This function is deprecated.** Deprecated in Java
`Unit` `@UnstableApi
[prepareSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/MediaSource.md.txt#prepareSource(androidx.media3.exoplayer.source.MediaSource.MediaSourceCaller,androidx.media3.datasource.TransferListener,androidx.media3.exoplayer.analytics.PlayerId))(
caller: MediaSource.MediaSourceCaller!,
mediaTransferListener: TransferListener?,
playerId: PlayerId!
)`

**This function is deprecated.**

Use `prepareSource` instead.

<br />

`Unit` `@UnstableApi
[updateMediaItem](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/MediaSource.md.txt#updateMediaItem(androidx.media3.common.MediaItem))(mediaItem: MediaItem!)`

**This function is deprecated.** Deprecated in Java

### Inherited properties

From [androidx.media3.exoplayer.source.BaseMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/BaseMediaSource.md.txt) `BandwidthMeter?` `bandwidthMeter`

**This property is deprecated.** Deprecated in Java
`PlayerId?` `playerId`

**This property is deprecated.** Deprecated in Java

## Public constructors

### ConcatenatingMediaSource

```
[ConcatenatingMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#ConcatenatingMediaSource(androidx.media3.exoplayer.source.MediaSource...))(mediaSources: Array<MediaSource!>!)
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

| Parameters |
|---|---|
| `mediaSources: Array<MediaSource!>!` | The `MediaSource`s to concatenate. It is valid for the same `MediaSource` instance to be present more than once in the array. |

### ConcatenatingMediaSource

```
[ConcatenatingMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#ConcatenatingMediaSource(boolean,androidx.media3.exoplayer.source.MediaSource...))(
    isAtomic: Boolean,
    mediaSources: Array<MediaSource!>!
)
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

| Parameters |
|---|---|
| `isAtomic: Boolean` | Whether the concatenating media source will be treated as atomic, i.e., treated as a single item for repeating and shuffling. |
| `mediaSources: Array<MediaSource!>!` | The `MediaSource`s to concatenate. It is valid for the same `MediaSource` instance to be present more than once in the array. |

### ConcatenatingMediaSource

```
[ConcatenatingMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#ConcatenatingMediaSource(boolean,androidx.media3.exoplayer.source.ShuffleOrder,androidx.media3.exoplayer.source.MediaSource...))(
    isAtomic: Boolean,
    shuffleOrder: ShuffleOrder!,
    mediaSources: Array<MediaSource!>!
)
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

| Parameters |
|---|---|
| `isAtomic: Boolean` | Whether the concatenating media source will be treated as atomic, i.e., treated as a single item for repeating and shuffling. |
| `shuffleOrder: ShuffleOrder!` | The `ShuffleOrder` to use when shuffling the child media sources. |
| `mediaSources: Array<MediaSource!>!` | The `MediaSource`s to concatenate. It is valid for the same `MediaSource` instance to be present more than once in the array. |

### ConcatenatingMediaSource

```
[ConcatenatingMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#ConcatenatingMediaSource(boolean,boolean,androidx.media3.exoplayer.source.ShuffleOrder,androidx.media3.exoplayer.source.MediaSource...))(
    isAtomic: Boolean,
    useLazyPreparation: Boolean,
    shuffleOrder: ShuffleOrder!,
    mediaSources: Array<MediaSource!>!
)
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

| Parameters |
|---|---|
| `isAtomic: Boolean` | Whether the concatenating media source will be treated as atomic, i.e., treated as a single item for repeating and shuffling. |
| `useLazyPreparation: Boolean` | Whether playlist items are prepared lazily. If false, all manifest loads and other initial preparation steps happen immediately. If true, these initial preparations are triggered only when the player starts buffering the media. |
| `shuffleOrder: ShuffleOrder!` | The `ShuffleOrder` to use when shuffling the child media sources. |
| `mediaSources: Array<MediaSource!>!` | The `MediaSource`s to concatenate. It is valid for the same `MediaSource` instance to be present more than once in the array. |

## Public functions

### addMediaSource

```
synchronized fun [addMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#addMediaSource(androidx.media3.exoplayer.source.MediaSource))(mediaSource: MediaSource!): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Appends a `MediaSource` to the playlist.

| Parameters |
|---|---|
| `mediaSource: MediaSource!` | The `MediaSource` to be added to the list. |

### addMediaSource

```
synchronized fun [addMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#addMediaSource(int,androidx.media3.exoplayer.source.MediaSource))(index: Int, mediaSource: MediaSource!): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Adds a `MediaSource` to the playlist.

| Parameters |
|---|---|
| `index: Int` | The index at which the new `MediaSource` will be inserted. This index must be in the range of 0 \<= index \<= `getSize`. |
| `mediaSource: MediaSource!` | The `MediaSource` to be added to the list. |

### addMediaSource

```
synchronized fun [addMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#addMediaSource(androidx.media3.exoplayer.source.MediaSource,android.os.Handler,java.lang.Runnable))(
    mediaSource: MediaSource!,
    handler: Handler!,
    onCompletionAction: Runnable!
): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Appends a `MediaSource` to the playlist and executes a custom action on completion.

| Parameters |
|---|---|
| `mediaSource: MediaSource!` | The `MediaSource` to be added to the list. |
| `handler: Handler!` | The `Handler` to run `onCompletionAction`. |
| `onCompletionAction: Runnable!` | A `Runnable` which is executed immediately after the media source has been added to the playlist. |

### addMediaSource

```
synchronized fun [addMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#addMediaSource(int,androidx.media3.exoplayer.source.MediaSource,android.os.Handler,java.lang.Runnable))(
    index: Int,
    mediaSource: MediaSource!,
    handler: Handler!,
    onCompletionAction: Runnable!
): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Adds a `MediaSource` to the playlist and executes a custom action on completion.

| Parameters |
|---|---|
| `index: Int` | The index at which the new `MediaSource` will be inserted. This index must be in the range of 0 \<= index \<= `getSize`. |
| `mediaSource: MediaSource!` | The `MediaSource` to be added to the list. |
| `handler: Handler!` | The `Handler` to run `onCompletionAction`. |
| `onCompletionAction: Runnable!` | A `Runnable` which is executed immediately after the media source has been added to the playlist. |

### addMediaSources

```
synchronized fun [addMediaSources](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#addMediaSources(java.util.Collection<androidx.media3.exoplayer.source.MediaSource>))(mediaSources: (Mutable)Collection<MediaSource!>!): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Appends multiple `MediaSource`s to the playlist.

| Parameters |
|---|---|
| `mediaSources: (Mutable)Collection<MediaSource!>!` | A collection of `MediaSource`s to be added to the list. The media sources are added in the order in which they appear in this collection. |

### addMediaSources

```
synchronized fun [addMediaSources](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#addMediaSources(int,java.util.Collection<androidx.media3.exoplayer.source.MediaSource>))(
    index: Int,
    mediaSources: (Mutable)Collection<MediaSource!>!
): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Adds multiple `MediaSource`s to the playlist.

| Parameters |
|---|---|
| `index: Int` | The index at which the new `MediaSource`s will be inserted. This index must be in the range of 0 \<= index \<= `getSize`. |
| `mediaSources: (Mutable)Collection<MediaSource!>!` | A collection of `MediaSource`s to be added to the list. The media sources are added in the order in which they appear in this collection. |

### addMediaSources

```
synchronized fun [addMediaSources](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#addMediaSources(java.util.Collection<androidx.media3.exoplayer.source.MediaSource>,android.os.Handler,java.lang.Runnable))(
    mediaSources: (Mutable)Collection<MediaSource!>!,
    handler: Handler!,
    onCompletionAction: Runnable!
): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Appends multiple `MediaSource`s to the playlist and executes a custom action on completion.

| Parameters |
|---|---|
| `mediaSources: (Mutable)Collection<MediaSource!>!` | A collection of `MediaSource`s to be added to the list. The media sources are added in the order in which they appear in this collection. |
| `handler: Handler!` | The `Handler` to run `onCompletionAction`. |
| `onCompletionAction: Runnable!` | A `Runnable` which is executed immediately after the media sources have been added to the playlist. |

### addMediaSources

```
synchronized fun [addMediaSources](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#addMediaSources(int,java.util.Collection<androidx.media3.exoplayer.source.MediaSource>,android.os.Handler,java.lang.Runnable))(
    index: Int,
    mediaSources: (Mutable)Collection<MediaSource!>!,
    handler: Handler!,
    onCompletionAction: Runnable!
): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Adds multiple `MediaSource`s to the playlist and executes a custom action on completion.

| Parameters |
|---|---|
| `index: Int` | The index at which the new `MediaSource`s will be inserted. This index must be in the range of 0 \<= index \<= `getSize`. |
| `mediaSources: (Mutable)Collection<MediaSource!>!` | A collection of `MediaSource`s to be added to the list. The media sources are added in the order in which they appear in this collection. |
| `handler: Handler!` | The `Handler` to run `onCompletionAction`. |
| `onCompletionAction: Runnable!` | A `Runnable` which is executed immediately after the media sources have been added to the playlist. |

### clear

```
synchronized fun [clear](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#clear())(): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Clears the playlist.

### clear

```
synchronized fun [clear](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#clear(android.os.Handler,java.lang.Runnable))(handler: Handler!, onCompletionAction: Runnable!): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Clears the playlist and executes a custom action on completion.

| Parameters |
|---|---|
| `handler: Handler!` | The `Handler` to run `onCompletionAction`. |
| `onCompletionAction: Runnable!` | A `Runnable` which is executed immediately after the playlist has been cleared. |

### createPeriod

```
fun [createPeriod](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#createPeriod(androidx.media3.exoplayer.source.MediaSource.MediaPeriodId,androidx.media3.exoplayer.upstream.Allocator,long))(
    id: MediaSource.MediaPeriodId!,
    allocator: Allocator!,
    startPositionUs: Long
): MediaPeriod!
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Returns a new `MediaPeriod` identified by `periodId`.

Should not be called directly from application code.

This method must be called on the playback thread and only if the source is enabled.

| Parameters |
|---|---|
| `id: MediaSource.MediaPeriodId!` | The identifier of the period. |
| `allocator: Allocator!` | An `Allocator` from which to obtain media buffer allocations. |
| `startPositionUs: Long` | The expected start position, in microseconds. |

| Returns |
|---|---|
| `MediaPeriod!` | A new `MediaPeriod`. |

### getInitialTimeline

```
synchronized fun [getInitialTimeline](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#getInitialTimeline())(): Timeline!
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Returns the initial placeholder timeline that is returned immediately when the real timeline is not yet known, or null to let the player create an initial timeline.

Should not be called directly from application code.

The initial timeline must use the same uids for windows and periods that the real timeline will use. It also must provide windows which are marked as dynamic to indicate that the window is expected to change when the real timeline arrives.

Any media source which has multiple windows should typically provide such an initial timeline to make sure the player reports the correct number of windows immediately.

This method must be called on the application thread.

### getMediaItem

```
fun [getMediaItem](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#getMediaItem())(): MediaItem!
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Returns the `MediaItem` whose media is provided by the source.

Should not be called directly from application code.

This method must be called on the application thread.

### getMediaSource

```
synchronized fun [getMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#getMediaSource(int))(index: Int): MediaSource!
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Returns the `MediaSource` at a specified index.

| Parameters |
|---|---|
| `index: Int` | An index in the range of 0 \<= index \<= `getSize`. |

| Returns |
|---|---|
| `MediaSource!` | The `MediaSource` at this index. |

### getSize

```
synchronized fun [getSize](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#getSize())(): Int
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Returns the number of media sources in the playlist.

### isSingleWindow

```
fun [isSingleWindow](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#isSingleWindow())(): Boolean
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Returns true if the media source is guaranteed to never have zero or more than one window.

Should not be called directly from application code.

The default implementation returns `true`.

This method must be called on the application thread.

| Returns |
|---|---|
| `Boolean` | true if the source has exactly one window. |

### moveMediaSource

```
synchronized fun [moveMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#moveMediaSource(int,int))(currentIndex: Int, newIndex: Int): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Moves an existing `MediaSource` within the playlist.

| Parameters |
|---|---|
| `currentIndex: Int` | The current index of the media source in the playlist. This index must be in the range of 0 \<= index \<`getSize`. |
| `newIndex: Int` | The target index of the media source in the playlist. This index must be in the range of 0 \<= index \<`getSize`. |

### moveMediaSource

```
synchronized fun [moveMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#moveMediaSource(int,int,android.os.Handler,java.lang.Runnable))(
    currentIndex: Int,
    newIndex: Int,
    handler: Handler!,
    onCompletionAction: Runnable!
): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Moves an existing `MediaSource` within the playlist and executes a custom action on completion.

| Parameters |
|---|---|
| `currentIndex: Int` | The current index of the media source in the playlist. This index must be in the range of 0 \<= index \<`getSize`. |
| `newIndex: Int` | The target index of the media source in the playlist. This index must be in the range of 0 \<= index \<`getSize`. |
| `handler: Handler!` | The `Handler` to run `onCompletionAction`. |
| `onCompletionAction: Runnable!` | A `Runnable` which is executed immediately after the media source has been moved. |

### releasePeriod

```
fun [releasePeriod](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#releasePeriod(androidx.media3.exoplayer.source.MediaPeriod))(mediaPeriod: MediaPeriod!): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Releases the period.

Should not be called directly from application code.

This method must be called on the playback thread.

| Parameters |
|---|---|
| `mediaPeriod: MediaPeriod!` | The period to release. |

### removeMediaSource

```
synchronized fun [removeMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#removeMediaSource(int))(index: Int): MediaSource!
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Removes a `MediaSource` from the playlist.

Note: If you want to move the instance, it's preferable to use `moveMediaSource` instead.

Note: If you want to remove a set of contiguous sources, it's preferable to use `removeMediaSourceRange` instead.

| Parameters |
|---|---|
| `index: Int` | The index at which the media source will be removed. This index must be in the range of 0 \<= index \<`getSize`. |

| Returns |
|---|---|
| `MediaSource!` | The removed `MediaSource`. |

### removeMediaSource

```
synchronized fun [removeMediaSource](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#removeMediaSource(int,android.os.Handler,java.lang.Runnable))(
    index: Int,
    handler: Handler!,
    onCompletionAction: Runnable!
): MediaSource!
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Removes a `MediaSource` from the playlist and executes a custom action on completion.

Note: If you want to move the instance, it's preferable to use `moveMediaSource` instead.

Note: If you want to remove a set of contiguous sources, it's preferable to use `removeMediaSourceRange` instead.

| Parameters |
|---|---|
| `index: Int` | The index at which the media source will be removed. This index must be in the range of 0 \<= index \<`getSize`. |
| `handler: Handler!` | The `Handler` to run `onCompletionAction`. |
| `onCompletionAction: Runnable!` | A `Runnable` which is executed immediately after the media source has been removed from the playlist. |

| Returns |
|---|---|
| `MediaSource!` | The removed `MediaSource`. |

### removeMediaSourceRange

```
synchronized fun [removeMediaSourceRange](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#removeMediaSourceRange(int,int))(fromIndex: Int, toIndex: Int): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Removes a range of `MediaSource`s from the playlist, by specifying an initial index (included) and a final index (excluded).

Note: when specified range is empty, no actual media source is removed and no exception is thrown.

| Parameters |
|---|---|
| `fromIndex: Int` | The initial range index, pointing to the first media source that will be removed. This index must be in the range of 0 \<= index \<= `getSize`. |
| `toIndex: Int` | The final range index, pointing to the first media source that will be left untouched. This index must be in the range of 0 \<= index \<= `getSize`. |

| Throws |
|---|---|
| `java.lang.IndexOutOfBoundsException` | When the range is malformed, i.e. `fromIndex`\<0, `toIndex`\>`getSize`, `fromIndex`\>`toIndex` |

### removeMediaSourceRange

```
synchronized fun [removeMediaSourceRange](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#removeMediaSourceRange(int,int,android.os.Handler,java.lang.Runnable))(
    fromIndex: Int,
    toIndex: Int,
    handler: Handler!,
    onCompletionAction: Runnable!
): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Removes a range of `MediaSource`s from the playlist, by specifying an initial index (included) and a final index (excluded), and executes a custom action on completion.

Note: when specified range is empty, no actual media source is removed and no exception is thrown.

| Parameters |
|---|---|
| `fromIndex: Int` | The initial range index, pointing to the first media source that will be removed. This index must be in the range of 0 \<= index \<= `getSize`. |
| `toIndex: Int` | The final range index, pointing to the first media source that will be left untouched. This index must be in the range of 0 \<= index \<= `getSize`. |
| `handler: Handler!` | The `Handler` to run `onCompletionAction`. |
| `onCompletionAction: Runnable!` | A `Runnable` which is executed immediately after the media source range has been removed from the playlist. |

| Throws |
|---|---|
| `java.lang.IllegalArgumentException` | When the range is malformed, i.e. `fromIndex`\<0, `toIndex`\>`getSize`, `fromIndex`\>`toIndex` |

### setShuffleOrder

```
synchronized fun [setShuffleOrder](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#setShuffleOrder(androidx.media3.exoplayer.source.ShuffleOrder))(shuffleOrder: ShuffleOrder!): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Sets a new shuffle order to use when shuffling the child media sources.

| Parameters |
|---|---|
| `shuffleOrder: ShuffleOrder!` | A `ShuffleOrder`. |

### setShuffleOrder

```
synchronized fun [setShuffleOrder](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#setShuffleOrder(androidx.media3.exoplayer.source.ShuffleOrder,android.os.Handler,java.lang.Runnable))(
    shuffleOrder: ShuffleOrder!,
    handler: Handler!,
    onCompletionAction: Runnable!
): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Sets a new shuffle order to use when shuffling the child media sources.

| Parameters |
|---|---|
| `shuffleOrder: ShuffleOrder!` | A `ShuffleOrder`. |
| `handler: Handler!` | The `Handler` to run `onCompletionAction`. |
| `onCompletionAction: Runnable!` | A `Runnable` which is executed immediately after the shuffle order has been changed. |

## Protected functions

### disableInternal

```
protected fun [disableInternal](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#disableInternal())(): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Disables the source, see `disable`.

### enableInternal

```
protected fun [enableInternal](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#enableInternal())(): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Enables the source, see `enable`.

### getMediaPeriodIdForChildMediaPeriodId

```
protected fun [getMediaPeriodIdForChildMediaPeriodId](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#getMediaPeriodIdForChildMediaPeriodId(androidx.media3.exoplayer.source.ConcatenatingMediaSource.MediaSourceHolder,androidx.media3.exoplayer.source.MediaSource.MediaPeriodId))(
    childSourceId: ConcatenatingMediaSource.MediaSourceHolder!,
    mediaPeriodId: MediaSource.MediaPeriodId!
): MediaSource.MediaPeriodId?
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Returns the `MediaPeriodId` in the composite source corresponding to the specified `MediaPeriodId` in a child source. The default implementation does not change the media period id.

| Parameters |
|---|---|
| `childSourceId: ConcatenatingMediaSource.MediaSourceHolder!` | The unique id used to prepare the child source. |
| `mediaPeriodId: MediaSource.MediaPeriodId!` | A `MediaPeriodId` of the child source. |

| Returns |
|---|---|
| `MediaSource.MediaPeriodId?` | The corresponding `MediaPeriodId` in the composite source. Null if no corresponding media period id can be determined. |

### getWindowIndexForChildWindowIndex

```
protected fun [getWindowIndexForChildWindowIndex](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#getWindowIndexForChildWindowIndex(androidx.media3.exoplayer.source.ConcatenatingMediaSource.MediaSourceHolder,int))(
    childSourceId: ConcatenatingMediaSource.MediaSourceHolder!,
    windowIndex: Int
): Int
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Returns the window index in the composite source corresponding to the specified window index in a child source. The default implementation does not change the window index.

| Parameters |
|---|---|
| `childSourceId: ConcatenatingMediaSource.MediaSourceHolder!` | The unique id used to prepare the child source. |
| `windowIndex: Int` | A window index of the child source. |

| Returns |
|---|---|
| `Int` | The corresponding window index in the composite source. |

### onChildSourceInfoRefreshed

```
protected fun [onChildSourceInfoRefreshed](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#onChildSourceInfoRefreshed(androidx.media3.exoplayer.source.ConcatenatingMediaSource.MediaSourceHolder,androidx.media3.exoplayer.source.MediaSource,androidx.media3.common.Timeline))(
    childSourceId: ConcatenatingMediaSource.MediaSourceHolder!,
    mediaSource: MediaSource!,
    newTimeline: Timeline!
): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Called when the source info of a child source has been refreshed.

| Parameters |
|---|---|
| `childSourceId: ConcatenatingMediaSource.MediaSourceHolder!` | The unique id used to prepare the child source. |
| `mediaSource: MediaSource!` | The child source whose source info has been refreshed. |
| `newTimeline: Timeline!` | The timeline of the child source. |

### prepareSourceInternal

```
synchronized protected fun [prepareSourceInternal](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#prepareSourceInternal(androidx.media3.datasource.TransferListener))(mediaTransferListener: TransferListener?): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Starts source preparation and enables the source, see `prepareSource`. This method is called at most once until the next call to `releaseSourceInternal`.

This method is called on the playback thread.

| Parameters |
|---|---|
| `mediaTransferListener: TransferListener?` | The transfer listener which should be informed of any media data transfers. May be null if no listener is available. Note that this listener should usually be only informed of transfers related to the media loads and not of auxiliary loads for manifests and other data. |

### releaseSourceInternal

```
synchronized protected fun [releaseSourceInternal](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ConcatenatingMediaSource#releaseSourceInternal())(): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Releases the source, see `releaseSource`. This method is called exactly once after each call to `prepareSourceInternal`.

This method is called on the playback thread.