Commit 75af95e8 by tonihei Committed by Tofunmi Adigun-Hameed

Add clarifiying note to Player.replaceMediaItem

This helps to highlight that the replaced range doesn't need to have
the same size as before.

#minor-release

PiperOrigin-RevId: 534834917
(cherry picked from commit 19ded9c7912c0ed85a791d352fecdb0d1030bde3)
parent 348157a5
...@@ -2158,6 +2158,11 @@ public interface Player { ...@@ -2158,6 +2158,11 @@ public interface Player {
* <p>This method must only be called if {@link #COMMAND_CHANGE_MEDIA_ITEMS} is {@linkplain * <p>This method must only be called if {@link #COMMAND_CHANGE_MEDIA_ITEMS} is {@linkplain
* #getAvailableCommands() available}. * #getAvailableCommands() available}.
* *
* <p>Note that it is possible to replace a range with an arbitrary number of new items, so that
* the number of removed items defined by {@code fromIndex} and {@code toIndex} does not have to
* match the number of added items defined by {@code mediaItems}. As result, it may also change
* the index of subsequent items not touched by this operation.
*
* @param fromIndex The start of the range. If the index is larger than the size of the playlist, * @param fromIndex The start of the range. If the index is larger than the size of the playlist,
* the request is ignored. * the request is ignored.
* @param toIndex The first item not to be included in the range (exclusive). If the index is * @param toIndex The first item not to be included in the range (exclusive). If the index is
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment