Deprecate multi-window time bar mode

It's much better to merge the windows at source level to reflect the
same state everywhere (e.g. notifications, player state, etc). This
can be done with ConcatenatingMediaSource2.

PiperOrigin-RevId: 563715718
This commit is contained in:
tonihei 2023-09-08 04:43:46 -07:00 committed by Copybara-Service
parent 4afecc9099
commit f285334a15
3 changed files with 10 additions and 15 deletions

View File

@ -561,13 +561,10 @@ public class LegacyPlayerControlView extends FrameLayout {
}
/**
* Sets whether the time bar should show all windows, as opposed to just the current one. If the
* timeline has a period with unknown duration or more than {@link
* #MAX_WINDOWS_FOR_MULTI_WINDOW_TIME_BAR} windows the time bar will fall back to showing a single
* window.
*
* @param showMultiWindowTimeBar Whether the time bar should show all windows.
* @deprecated Replace multi-window time bar display by merging source windows together instead,
* for example using ExoPlayer's {@code ConcatenatingMediaSource2}.
*/
@Deprecated
public void setShowMultiWindowTimeBar(boolean showMultiWindowTimeBar) {
this.showMultiWindowTimeBar = showMultiWindowTimeBar;
updateTimeline();

View File

@ -663,13 +663,10 @@ public class PlayerControlView extends FrameLayout {
}
/**
* Sets whether the time bar should show all windows, as opposed to just the current one. If the
* timeline has a period with unknown duration or more than {@link
* #MAX_WINDOWS_FOR_MULTI_WINDOW_TIME_BAR} windows the time bar will fall back to showing a single
* window.
*
* @param showMultiWindowTimeBar Whether the time bar should show all windows.
* @deprecated Replace multi-window time bar display by merging source windows together instead,
* for example using ExoPlayer's {@code ConcatenatingMediaSource2}.
*/
@Deprecated
public void setShowMultiWindowTimeBar(boolean showMultiWindowTimeBar) {
this.showMultiWindowTimeBar = showMultiWindowTimeBar;
updateTimeline();

View File

@ -1113,10 +1113,11 @@ public class PlayerView extends FrameLayout implements AdViewProvider {
}
/**
* Sets whether the time bar should show all windows, as opposed to just the current one.
*
* @param showMultiWindowTimeBar Whether to show all windows.
* @deprecated Replace multi-window time bar display by merging source windows together instead,
* for example using ExoPlayer's {@code ConcatenatingMediaSource2}.
*/
@SuppressWarnings("deprecation") // Forwarding to deprecated method.
@Deprecated
@UnstableApi
public void setShowMultiWindowTimeBar(boolean showMultiWindowTimeBar) {
Assertions.checkStateNotNull(controller);