2024-02-02 04:24:16 +05:30
|
|
|
import Defaults
|
|
|
|
import SwiftyJSON
|
|
|
|
|
|
|
|
final class PlayerSettingsGroupExporter: SettingsGroupExporter {
|
|
|
|
override var globalJSON: JSON {
|
|
|
|
[
|
|
|
|
"playerInstanceID": Defaults[.playerInstanceID] ?? "",
|
|
|
|
"pauseOnHidingPlayer": Defaults[.pauseOnHidingPlayer],
|
|
|
|
"closeVideoOnEOF": Defaults[.closeVideoOnEOF],
|
2024-08-21 02:26:55 +05:30
|
|
|
"exitFullscreenOnEOF": Defaults[.exitFullscreenOnEOF],
|
2024-02-02 04:24:16 +05:30
|
|
|
"expandVideoDescription": Defaults[.expandVideoDescription],
|
|
|
|
"collapsedLinesDescription": Defaults[.collapsedLinesDescription],
|
|
|
|
"showChapters": Defaults[.showChapters],
|
2024-07-06 16:02:31 +05:30
|
|
|
"showChapterThumbnails": Defaults[.showChapterThumbnails],
|
|
|
|
"showChapterThumbnailsOnlyWhenDifferent": Defaults[.showChapterThumbnailsOnlyWhenDifferent],
|
2024-02-02 04:24:16 +05:30
|
|
|
"expandChapters": Defaults[.expandChapters],
|
|
|
|
"showRelated": Defaults[.showRelated],
|
|
|
|
"showInspector": Defaults[.showInspector].rawValue,
|
|
|
|
"playerSidebar": Defaults[.playerSidebar].rawValue,
|
|
|
|
"showKeywords": Defaults[.showKeywords],
|
|
|
|
"enableReturnYouTubeDislike": Defaults[.enableReturnYouTubeDislike],
|
|
|
|
"closePiPOnNavigation": Defaults[.closePiPOnNavigation],
|
|
|
|
"closePiPOnOpeningPlayer": Defaults[.closePiPOnOpeningPlayer],
|
2024-07-06 16:02:31 +05:30
|
|
|
"closePlayerOnOpeningPiP": Defaults[.closePlayerOnOpeningPiP],
|
|
|
|
"captionsAutoShow": Defaults[.captionsAutoShow],
|
|
|
|
"captionsDefaultLanguageCode": Defaults[.captionsDefaultLanguageCode],
|
|
|
|
"captionsFallbackLanguageCode": Defaults[.captionsFallbackLanguageCode],
|
|
|
|
"captionsFontScaleSize": Defaults[.captionsFontScaleSize],
|
|
|
|
"captionsFontColor": Defaults[.captionsFontColor]
|
2024-02-02 04:24:16 +05:30
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
override var platformJSON: JSON {
|
|
|
|
var export = JSON()
|
|
|
|
|
|
|
|
#if !os(macOS)
|
|
|
|
export["pauseOnEnteringBackground"].bool = Defaults[.pauseOnEnteringBackground]
|
|
|
|
#endif
|
|
|
|
|
2024-08-21 00:08:18 +05:30
|
|
|
export["showComments"].bool = Defaults[.showComments]
|
|
|
|
|
2024-02-02 04:24:16 +05:30
|
|
|
#if !os(tvOS)
|
|
|
|
export["showScrollToTopInComments"].bool = Defaults[.showScrollToTopInComments]
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if os(iOS)
|
2024-09-01 16:12:31 +05:30
|
|
|
export["isOrientationLocked"].bool = Defaults[.isOrientationLocked]
|
2024-02-02 04:24:16 +05:30
|
|
|
export["enterFullscreenInLandscape"].bool = Defaults[.enterFullscreenInLandscape]
|
|
|
|
export["rotateToLandscapeOnEnterFullScreen"].string = Defaults[.rotateToLandscapeOnEnterFullScreen].rawValue
|
|
|
|
#endif
|
|
|
|
|
|
|
|
return export
|
|
|
|
}
|
|
|
|
}
|