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
This commit is contained in:
tonihei 2023-05-24 15:42:33 +01:00
parent a944ffecb9
commit acb567d5a7

View File

@ -2169,6 +2169,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