Fixed crash

This commit is contained in:
Rasmus Krämer
2022-05-03 15:01:30 +02:00
parent 9a81fc3688
commit 0708133779
4 changed files with 12 additions and 7 deletions
+5 -4
View File
@@ -71,10 +71,6 @@ public class AbsAudioPlayer: CAPPlugin {
call.resolve()
}
@objc func playPause(_ call: CAPPluginCall) {
PlayerHandler.paused = !PlayerHandler.paused
call.resolve([ "playing": !PlayerHandler.paused ])
}
@objc func playPlayer(_ call: CAPPluginCall) {
PlayerHandler.paused = false
call.resolve()
@@ -83,6 +79,11 @@ public class AbsAudioPlayer: CAPPlugin {
PlayerHandler.paused = true
call.resolve()
}
// I have no clue why but after i moved this block of code from above "playPlayer" to here the app stopped crashing. Move it back up if you want to
@objc func playPause(_ call: CAPPluginCall) {
PlayerHandler.paused = !PlayerHandler.paused
call.resolve([ "playing": !PlayerHandler.paused ])
}
@objc func seek(_ call: CAPPluginCall) {
PlayerHandler.seek(amount: call.getDouble("value", 0.0))