Improve opening videos

This commit is contained in:
Arkadiusz Fal 2022-11-11 12:34:55 +01:00
parent 38454720de
commit a3ba1cb6df

View File

@ -97,7 +97,15 @@ struct OpenVideosModel {
if playbackMode == .playNow || playbackMode == .shuffleAll {
player.show()
player.advanceToNextItem()
#if os(iOS)
if player.presentingPlayer {
player.advanceToNextItem()
} else {
player.onPresentPlayer.append { [weak player] in player?.advanceToNextItem() }
}
#else
player.advanceToNextItem()
#endif
}
}