Add support for fading out on sleep timer end

Playback will start to fadeout during last 60 seconds of the sleep timer. Once faded out, playback will be paused, volume reset, and playback seeked to start of fadeout.
This commit is contained in:
Adam Traeger
2025-03-09 13:14:15 -05:00
parent 769ce0ade9
commit 33c738873f
6 changed files with 75 additions and 5 deletions
+2
View File
@@ -246,6 +246,7 @@ public class AbsDatabase: CAPPlugin {
let languageCode = call.getString("languageCode") ?? "en-us"
let downloadUsingCellular = call.getString("downloadUsingCellular") ?? "ALWAYS"
let streamingUsingCellular = call.getString("streamingUsingCellular") ?? "ALWAYS"
let disableSleepTimerFadeOut = call.getBool("disableSleepTimerFadeOut") ?? false
let settings = DeviceSettings()
settings.disableAutoRewind = disableAutoRewind
settings.enableAltView = enableAltView
@@ -257,6 +258,7 @@ public class AbsDatabase: CAPPlugin {
settings.languageCode = languageCode
settings.downloadUsingCellular = downloadUsingCellular
settings.streamingUsingCellular = streamingUsingCellular
settings.disableSleepTimerFadeOut = disableSleepTimerFadeOut
Database.shared.setDeviceSettings(deviceSettings: settings)