Document C.TIME_UNSET on Player.setMediaItem(.., startPositonMs)

This wasn't properly documented yet (unlike the longer setMediaItems
method that already includes this documentation).

Issue: androidx/media#607
PiperOrigin-RevId: 561910073
This commit is contained in:
tonihei 2023-09-01 03:42:13 -07:00 committed by Copybara-Service
parent 5944adcc78
commit f6be4bc526
2 changed files with 7 additions and 5 deletions

View file

@ -2146,7 +2146,8 @@ public interface Player {
* #getAvailableCommands() available}. * #getAvailableCommands() available}.
* *
* @param mediaItem The new {@link MediaItem}. * @param mediaItem The new {@link MediaItem}.
* @param startPositionMs The position in milliseconds to start playback from. * @param startPositionMs The position in milliseconds to start playback from. If {@link
* C#TIME_UNSET} is passed, the default position of the given {@link MediaItem} is used.
*/ */
void setMediaItem(MediaItem mediaItem, long startPositionMs); void setMediaItem(MediaItem mediaItem, long startPositionMs);

View file

@ -1423,9 +1423,9 @@ public interface ExoPlayer extends Player {
* @param startMediaItemIndex The media item index to start playback from. If {@link * @param startMediaItemIndex The media item index to start playback from. If {@link
* C#INDEX_UNSET} is passed, the current position is not reset. * C#INDEX_UNSET} is passed, the current position is not reset.
* @param startPositionMs The position in milliseconds to start playback from. If {@link * @param startPositionMs The position in milliseconds to start playback from. If {@link
* C#TIME_UNSET} is passed, the default position of the given media item is used. In any case, * C#TIME_UNSET} is passed, the default position of the given media source is used. In any
* if {@code startMediaItemIndex} is set to {@link C#INDEX_UNSET}, this parameter is ignored * case, if {@code startMediaItemIndex} is set to {@link C#INDEX_UNSET}, this parameter is
* and the position is not reset at all. * ignored and the position is not reset at all.
*/ */
@UnstableApi @UnstableApi
void setMediaSources( void setMediaSources(
@ -1444,7 +1444,8 @@ public interface ExoPlayer extends Player {
* Clears the playlist and adds the specified {@link MediaSource}. * Clears the playlist and adds the specified {@link MediaSource}.
* *
* @param mediaSource The new {@link MediaSource}. * @param mediaSource The new {@link MediaSource}.
* @param startPositionMs The position in milliseconds to start playback from. * @param startPositionMs The position in milliseconds to start playback from. If {@link
* C#TIME_UNSET} is passed, the default position of the given media source is used.
*/ */
@UnstableApi @UnstableApi
void setMediaSource(MediaSource mediaSource, long startPositionMs); void setMediaSource(MediaSource mediaSource, long startPositionMs);