docs/doc/reference/com/google/android/exoplayer2/source/MaskingMediaSource.html
Package com.google.android.exoplayer2.source
All Implemented Interfaces:MediaSource
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classMaskingMediaSourceextends[WrappingMediaSource](WrappingMediaSource.html "class in com.google.android.exoplayer2.source")
Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
A MediaSource that masks the Timeline with a placeholder until the actual media structure is known.
Nested Classes | Modifier and Type | Class | Description |
| --- | --- | --- |
| static class | MaskingMediaSource.PlaceholderTimeline |
Deprecated.
A timeline with one dynamic window with a period of indeterminate duration. |
-
MediaSource.Factory, MediaSource.MediaPeriodId, MediaSource.MediaSourceCaller
-
mediaSource
Constructors | Constructor | Description |
| --- | --- |
| MaskingMediaSource(MediaSource mediaSource, boolean useLazyPreparation) |
Deprecated.
Creates the masking media source. |
All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| MaskingMediaPeriod | createPeriod(MediaSource.MediaPeriodId id, Allocator allocator, long startPositionUs) |
Deprecated.
Creates the requested MediaPeriod.
|
| protected MediaSource.MediaPeriodId | getMediaPeriodIdForChildMediaPeriodId(MediaSource.MediaPeriodId mediaPeriodId) |
Deprecated.
Returns the MediaSource.MediaPeriodId in the wrapping source corresponding to the specified MediaSource.MediaPeriodId in a child source.
|
| Timeline | getTimeline() |
Deprecated.
Returns the Timeline.
|
| void | maybeThrowSourceInfoRefreshError() |
Deprecated.
Throws any pending error encountered while loading or refreshing source information.
|
| protected void | onChildSourceInfoRefreshed(Timeline newTimeline) |
Deprecated.
Called when the child source info has been refreshed.
|
| void | prepareSourceInternal() |
Deprecated.
Starts source preparation and enables the source, see BaseMediaSource.prepareSource(MediaSourceCaller, TransferListener, PlayerId).
|
| void | releasePeriod(MediaPeriod mediaPeriod) |
Deprecated.
Releases a MediaPeriod.
|
| void | releaseSourceInternal() |
Deprecated.
Releases the source, see BaseMediaSource.releaseSource(MediaSourceCaller).
|
-
disableChildSource, enableChildSource, getInitialTimeline, getMediaItem, getMediaPeriodIdForChildMediaPeriodId, getMediaTimeForChildMediaTime, getMediaTimeForChildMediaTime, getWindowIndexForChildWindowIndex, getWindowIndexForChildWindowIndex, isSingleWindow, onChildSourceInfoRefreshed, prepareChildSource, prepareSourceInternal, releaseChildSource
-
disableChildSource, disableInternal, enableChildSource, enableInternal, prepareChildSource, releaseChildSource
-
addDrmEventListener, addEventListener, createDrmEventDispatcher, createDrmEventDispatcher, createEventDispatcher, createEventDispatcher, createEventDispatcher, createEventDispatcher, disable, enable, getPlayerId, isEnabled, prepareSource, prepareSource, refreshSourceInfo, releaseSource, removeDrmEventListener, removeEventListener
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public MaskingMediaSource([MediaSource](MediaSource.html "interface in com.google.android.exoplayer2.source")mediaSource,
boolean useLazyPreparation)
Deprecated.
Creates the masking media source.
Parameters:mediaSource - A MediaSource.useLazyPreparation - Whether the mediaSource is 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.
-
public[Timeline](../Timeline.html "class in com.google.android.exoplayer2")getTimeline()
Deprecated.
Returns the Timeline.
-
public void prepareSourceInternal()
Deprecated.
Description copied from class: WrappingMediaSource
Starts source preparation and enables the source, see BaseMediaSource.prepareSource(MediaSourceCaller, TransferListener, PlayerId). This method is called at most once until the next call to CompositeMediaSource.releaseSourceInternal().
Overrides:prepareSourceInternal in class WrappingMediaSource
-
public void maybeThrowSourceInfoRefreshError()
Deprecated.
Description copied from interface: MediaSource
Throws any pending error encountered while loading or refreshing source information.
Should not be called directly from application code.
This method must be called on the playback thread and only after MediaSource.prepareSource(MediaSourceCaller, TransferListener, PlayerId).
Specified by:maybeThrowSourceInfoRefreshError in interface MediaSourceOverrides:maybeThrowSourceInfoRefreshError in class CompositeMediaSource<Void>
-
public[MaskingMediaPeriod](MaskingMediaPeriod.html "class in com.google.android.exoplayer2.source")createPeriod([MediaSource.MediaPeriodId](MediaSource.MediaPeriodId.html "class in com.google.android.exoplayer2.source")id,[Allocator](../upstream/Allocator.html "interface in com.google.android.exoplayer2.upstream")allocator,
long startPositionUs)
Deprecated.
Description copied from class: WrappingMediaSource
Creates the requested MediaPeriod.
This method typically forwards to the wrapped media source and optionally wraps the returned MediaPeriod.
Specified by:createPeriod in interface MediaSourceOverrides:createPeriod in class WrappingMediaSourceParameters:id - The identifier of the period.allocator - An Allocator from which to obtain media buffer allocations.startPositionUs - The expected start position, in microseconds.Returns:A new MediaPeriod.See Also:MediaSource.createPeriod(MediaPeriodId, Allocator, long)
-
public void releasePeriod([MediaPeriod](MediaPeriod.html "interface in com.google.android.exoplayer2.source")mediaPeriod)
Deprecated.
Description copied from class: WrappingMediaSource
Releases a MediaPeriod.
This method typically forwards to the wrapped media source and optionally unwraps the provided MediaPeriod.
Specified by:releasePeriod in interface MediaSourceOverrides:releasePeriod in class WrappingMediaSourceParameters:mediaPeriod - The period to release.See Also:MediaSource.releasePeriod(MediaPeriod)
-
public void releaseSourceInternal()
Deprecated.
Description copied from class: BaseMediaSource
Releases the source, see BaseMediaSource.releaseSource(MediaSourceCaller). This method is called exactly once after each call to BaseMediaSource.prepareSourceInternal(TransferListener).
Overrides:releaseSourceInternal in class CompositeMediaSource<Void>
-
protected void onChildSourceInfoRefreshed([Timeline](../Timeline.html "class in com.google.android.exoplayer2")newTimeline)
Deprecated.
Description copied from class: WrappingMediaSource
Called when the child source info has been refreshed.
This Timeline can be amended if needed, for example using ForwardingTimeline. The Timeline for the wrapping source needs to be published with BaseMediaSource.refreshSourceInfo(Timeline).
Overrides:onChildSourceInfoRefreshed in class WrappingMediaSourceParameters:newTimeline - The timeline of the child source.
-
@Nullable
protected[MediaSource.MediaPeriodId](MediaSource.MediaPeriodId.html "class in com.google.android.exoplayer2.source")getMediaPeriodIdForChildMediaPeriodId([MediaSource.MediaPeriodId](MediaSource.MediaPeriodId.html "class in com.google.android.exoplayer2.source")mediaPeriodId)
Deprecated.
Description copied from class: WrappingMediaSource
Returns the MediaSource.MediaPeriodId in the wrapping source corresponding to the specified MediaSource.MediaPeriodId in a child source. The default implementation does not change the media period id.
Overrides:getMediaPeriodIdForChildMediaPeriodId in class WrappingMediaSourceParameters:mediaPeriodId - A MediaSource.MediaPeriodId of the child source.Returns:The corresponding MediaSource.MediaPeriodId in the wrapping source. Null if no corresponding media period id can be determined.