Package com.google.android.exoplayer2
Class Player.PositionInfo
- java.lang.Object
-
- com.google.android.exoplayer2.Player.PositionInfo
-
- All Implemented Interfaces:
Bundleable
- Enclosing interface:
- Player
public static final class Player.PositionInfo extends Object implements Bundleable
Position info describing a playback position involved in a discontinuity.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.google.android.exoplayer2.Bundleable
Bundleable.Creator<T extends Bundleable>
-
-
Field Summary
Fields Modifier and Type Field Description int
adGroupIndex
The ad group index if the playback position is within an ad,C.INDEX_UNSET
otherwise.int
adIndexInAdGroup
The index of the ad within the ad group if the playback position is within an ad,C.INDEX_UNSET
otherwise.long
contentPositionMs
The content position, in milliseconds.static Bundleable.Creator<Player.PositionInfo>
CREATOR
Object that can restorePlayer.PositionInfo
from aBundle
.MediaItem
mediaItem
The media item, ornull
if the timeline isempty
.int
mediaItemIndex
The media item index.int
periodIndex
The period index.Object
periodUid
The UID of the period, ornull
if the timeline isempty
.long
positionMs
The playback position, in milliseconds.int
windowIndex
Deprecated.UsemediaItemIndex
instead.Object
windowUid
The UID of the window, ornull
if the timeline isempty
.
-
Constructor Summary
Constructors Constructor Description PositionInfo(Object windowUid, int mediaItemIndex, MediaItem mediaItem, Object periodUid, int periodIndex, long positionMs, long contentPositionMs, int adGroupIndex, int adIndexInAdGroup)
Creates an instance.PositionInfo(Object windowUid, int mediaItemIndex, Object periodUid, int periodIndex, long positionMs, long contentPositionMs, int adGroupIndex, int adIndexInAdGroup)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
int
hashCode()
Bundle
toBundle()
Returns aBundle
representing the information stored in this object.
-
-
-
Field Detail
-
windowUid
@Nullable public final Object windowUid
The UID of the window, ornull
if the timeline isempty
.
-
windowIndex
@Deprecated public final int windowIndex
Deprecated.UsemediaItemIndex
instead.
-
mediaItemIndex
public final int mediaItemIndex
The media item index.
-
mediaItem
@Nullable public final MediaItem mediaItem
The media item, ornull
if the timeline isempty
.
-
periodUid
@Nullable public final Object periodUid
The UID of the period, ornull
if the timeline isempty
.
-
periodIndex
public final int periodIndex
The period index.
-
positionMs
public final long positionMs
The playback position, in milliseconds.
-
contentPositionMs
public final long contentPositionMs
The content position, in milliseconds.If
adGroupIndex
isC.INDEX_UNSET
, this is the same aspositionMs
.
-
adGroupIndex
public final int adGroupIndex
The ad group index if the playback position is within an ad,C.INDEX_UNSET
otherwise.
-
adIndexInAdGroup
public final int adIndexInAdGroup
The index of the ad within the ad group if the playback position is within an ad,C.INDEX_UNSET
otherwise.
-
CREATOR
public static final Bundleable.Creator<Player.PositionInfo> CREATOR
Object that can restorePlayer.PositionInfo
from aBundle
.
-
-
Constructor Detail
-
PositionInfo
@Deprecated public PositionInfo(@Nullable Object windowUid, int mediaItemIndex, @Nullable Object periodUid, int periodIndex, long positionMs, long contentPositionMs, int adGroupIndex, int adIndexInAdGroup)
Deprecated.
-
-