Fixed videos not automatically going to next video in playlist when casting.

This commit is contained in:
Koen 2023-11-05 15:12:15 +01:00
parent 4aade35d19
commit ea0c27936e

View file

@ -494,8 +494,14 @@ class VideoDetailView : ConstraintLayout {
updatePillButtonVisibilities();
StateCasting.instance.onActiveDevicePlayChanged.subscribe(this) {
if (StateCasting.instance.activeDevice != null) {
val activeDevice = StateCasting.instance.activeDevice;
if (activeDevice != null) {
handlePlayChanged(it);
val v = video;
if (!it && v != null && v.duration - activeDevice.time.toLong() < 2L) {
nextVideo();
}
}
};