Do not clear the timeline after the Cast receiver disconnects
The goal is to enable the app to fetch the timeline after a disconnection in order to prepare and resume local playback. PiperOrigin-RevId: 671022044
This commit is contained in:
parent
87bd9ba585
commit
a00c446529
@ -42,6 +42,8 @@
|
|||||||
* MIDI extension:
|
* MIDI extension:
|
||||||
* Leanback extension:
|
* Leanback extension:
|
||||||
* Cast Extension:
|
* Cast Extension:
|
||||||
|
* Stop clearning the timeline after the CastSession disconnects, which
|
||||||
|
enables the sender app to resume playback locally after a disconnection.
|
||||||
* Test Utilities:
|
* Test Utilities:
|
||||||
* Demo app:
|
* Demo app:
|
||||||
* Remove deprecated symbols:
|
* Remove deprecated symbols:
|
||||||
|
@ -1283,13 +1283,10 @@ public final class CastPlayer extends BasePlayer {
|
|||||||
remoteMediaClient.registerCallback(statusListener);
|
remoteMediaClient.registerCallback(statusListener);
|
||||||
remoteMediaClient.addProgressListener(statusListener, PROGRESS_REPORT_PERIOD_MS);
|
remoteMediaClient.addProgressListener(statusListener, PROGRESS_REPORT_PERIOD_MS);
|
||||||
updateInternalStateAndNotifyIfChanged();
|
updateInternalStateAndNotifyIfChanged();
|
||||||
} else {
|
} else if (sessionAvailabilityListener != null) {
|
||||||
updateTimelineAndNotifyIfChanged();
|
|
||||||
if (sessionAvailabilityListener != null) {
|
|
||||||
sessionAvailabilityListener.onCastSessionUnavailable();
|
sessionAvailabilityListener.onCastSessionUnavailable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private MediaStatus getMediaStatus() {
|
private MediaStatus getMediaStatus() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user