@capgo/native-audio 6.0.9 → 6.0.11
Sign up to get free protection for your applications and to get access to all the features.
- package/ios/Plugin/AudioAsset.swift +10 -6
- package/package.json +1 -1
@@ -69,12 +69,16 @@ public class AudioAsset: NSObject, AVAudioPlayerDelegate {
|
|
69
69
|
}
|
70
70
|
|
71
71
|
func play(time: TimeInterval) {
|
72
|
-
let player: AVAudioPlayer
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
72
|
+
let player: AVAudioPlayer
|
73
|
+
|
74
|
+
if channels.count > 0 {
|
75
|
+
player = channels[playIndex]
|
76
|
+
player.currentTime = time
|
77
|
+
player.numberOfLoops = 0
|
78
|
+
player.play()
|
79
|
+
playIndex += 1
|
80
|
+
playIndex = playIndex % channels.count
|
81
|
+
}
|
78
82
|
}
|
79
83
|
|
80
84
|
func playWithFade(time: TimeInterval) {
|