Merge pull request #570 from stonerl/close-fullscreen-on-end

add option to exit fullscreen on end
This commit is contained in:
Arkadiusz Fal
2024-08-24 12:16:26 +02:00
committed by GitHub
6 changed files with 32 additions and 6 deletions

View File

@@ -12,6 +12,7 @@ struct PlayerSettings: View {
#if !os(tvOS)
@Default(.showScrollToTopInComments) private var showScrollToTopInComments
@Default(.collapsedLinesDescription) private var collapsedLinesDescription
@Default(.exitFullscreenOnEOF) private var exitFullscreenOnEOF
#endif
@Default(.expandVideoDescription) private var expandVideoDescription
@Default(.pauseOnHidingPlayer) private var pauseOnHidingPlayer
@@ -86,6 +87,9 @@ struct PlayerSettings: View {
}
pauseOnHidingPlayerToggle
closeVideoOnEOFToggle
#if !os(tvOS)
exitFullscreenOnEOFToggle
#endif
#if !os(macOS)
pauseOnEnteringBackgroundToogle
#endif
@@ -300,6 +304,13 @@ struct PlayerSettings: View {
Toggle("Close video and player on end", isOn: $closeVideoOnEOF)
}
#if !os(tvOS)
private var exitFullscreenOnEOFToggle: some View {
Toggle("Exit fullscreen on end", isOn: $exitFullscreenOnEOF)
.disabled(closeVideoOnEOF)
}
#endif
#if !os(macOS)
private var pauseOnEnteringBackgroundToogle: some View {
Toggle("Pause when entering background", isOn: $pauseOnEnteringBackground)