Remove deprecated CastPlayer methods

PiperOrigin-RevId: 371102614
This commit is contained in:
olly 2021-04-29 13:50:48 +01:00 committed by bachinger
parent b9b405ef35
commit b65945b38f
2 changed files with 3 additions and 61 deletions

View File

@ -104,6 +104,9 @@
`programInformation` and `serviceDescription` set to `null` instead.
* Remove `CryptoInfo.getFrameworkCryptoInfoV16`. Use
`CryptoInfo.getFrameworkCryptoInfo` instead.
* Remove `CastPlayer` specific playlist manipulation methods. Use
`setMediaItems`, `addMediaItems`, `removeMediaItem` and `moveMediaItem`
instead.
* DRM:
* Only dispatch DRM session acquire and release events once per period
when playing content that uses the same encryption keys for both audio &

View File

@ -185,67 +185,6 @@ public final class CastPlayer extends BasePlayer {
updateInternalStateAndNotifyIfChanged();
}
// Media Queue manipulation methods.
/** @deprecated Use {@link #setMediaItems(List, int, long)} instead. */
@Deprecated
@Nullable
public PendingResult<MediaChannelResult> loadItem(MediaQueueItem item, long positionMs) {
return setMediaItemsInternal(
new MediaQueueItem[] {item}, /* startWindowIndex= */ 0, positionMs, repeatMode.value);
}
/**
* @deprecated Use {@link #setMediaItems(List, int, long)} and {@link #setRepeatMode(int)}
* instead.
*/
@Deprecated
@Nullable
public PendingResult<MediaChannelResult> loadItems(
MediaQueueItem[] items, int startIndex, long positionMs, @RepeatMode int repeatMode) {
return setMediaItemsInternal(items, startIndex, positionMs, repeatMode);
}
/** @deprecated Use {@link #addMediaItems(List)} instead. */
@Deprecated
@Nullable
public PendingResult<MediaChannelResult> addItems(MediaQueueItem... items) {
return addMediaItemsInternal(items, MediaQueueItem.INVALID_ITEM_ID);
}
/** @deprecated Use {@link #addMediaItems(int, List)} instead. */
@Deprecated
@Nullable
public PendingResult<MediaChannelResult> addItems(int periodId, MediaQueueItem... items) {
if (periodId == MediaQueueItem.INVALID_ITEM_ID
|| currentTimeline.getIndexOfPeriod(periodId) != C.INDEX_UNSET) {
return addMediaItemsInternal(items, periodId);
}
return null;
}
/** @deprecated Use {@link #removeMediaItem(int)} instead. */
@Deprecated
@Nullable
public PendingResult<MediaChannelResult> removeItem(int periodId) {
if (currentTimeline.getIndexOfPeriod(periodId) != C.INDEX_UNSET) {
return removeMediaItemsInternal(new int[] {periodId});
}
return null;
}
/** @deprecated Use {@link #moveMediaItem(int, int)} instead. */
@Deprecated
@Nullable
public PendingResult<MediaChannelResult> moveItem(int periodId, int newIndex) {
Assertions.checkArgument(newIndex >= 0 && newIndex < currentTimeline.getWindowCount());
int fromIndex = currentTimeline.getIndexOfPeriod(periodId);
if (fromIndex != C.INDEX_UNSET && fromIndex != newIndex) {
return moveMediaItemsInternal(new int[] {periodId}, fromIndex, newIndex);
}
return null;
}
/**
* Returns the item that corresponds to the period with the given id, or null if no media queue or
* period with id {@code periodId} exist.