@capgo/capacitor-audio-recorder 8.0.3 → 8.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3,7 +3,6 @@ package app.capgo.audiorecorder;
|
|
|
3
3
|
import android.Manifest;
|
|
4
4
|
import android.media.MediaRecorder;
|
|
5
5
|
import android.net.Uri;
|
|
6
|
-
import android.os.Build;
|
|
7
6
|
import android.os.SystemClock;
|
|
8
7
|
import androidx.annotation.Nullable;
|
|
9
8
|
import com.getcapacitor.JSObject;
|
|
@@ -25,7 +24,7 @@ import java.util.Locale;
|
|
|
25
24
|
)
|
|
26
25
|
public class CapacitorAudioRecorderPlugin extends com.getcapacitor.Plugin {
|
|
27
26
|
|
|
28
|
-
private final String pluginVersion = "8.0.
|
|
27
|
+
private final String pluginVersion = "8.0.5";
|
|
29
28
|
|
|
30
29
|
private enum RecordingStatus {
|
|
31
30
|
INACTIVE,
|
|
@@ -78,11 +77,6 @@ public class CapacitorAudioRecorderPlugin extends com.getcapacitor.Plugin {
|
|
|
78
77
|
return;
|
|
79
78
|
}
|
|
80
79
|
|
|
81
|
-
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) {
|
|
82
|
-
call.reject("Pausing is not supported on this Android version.");
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
80
|
try {
|
|
87
81
|
mediaRecorder.pause();
|
|
88
82
|
pauseStartTime = SystemClock.elapsedRealtime();
|
|
@@ -101,11 +95,6 @@ public class CapacitorAudioRecorderPlugin extends com.getcapacitor.Plugin {
|
|
|
101
95
|
return;
|
|
102
96
|
}
|
|
103
97
|
|
|
104
|
-
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) {
|
|
105
|
-
call.reject("Resuming is not supported on this Android version.");
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
98
|
try {
|
|
110
99
|
mediaRecorder.resume();
|
|
111
100
|
if (pauseStartTime > 0) {
|
|
@@ -4,7 +4,7 @@ import Foundation
|
|
|
4
4
|
|
|
5
5
|
@objc(CapacitorAudioRecorderPlugin)
|
|
6
6
|
public class CapacitorAudioRecorderPlugin: CAPPlugin, CAPBridgedPlugin, AVAudioRecorderDelegate {
|
|
7
|
-
private let pluginVersion: String = "8.0.
|
|
7
|
+
private let pluginVersion: String = "8.0.5"
|
|
8
8
|
public let identifier = "CapacitorAudioRecorderPlugin"
|
|
9
9
|
public let jsName = "CapacitorAudioRecorder"
|
|
10
10
|
public let pluginMethods: [CAPPluginMethod] = [
|
|
@@ -279,10 +279,7 @@ public class CapacitorAudioRecorderPlugin: CAPPlugin, CAPBridgedPlugin, AVAudioR
|
|
|
279
279
|
case "ALLOW_BLUETOOTH":
|
|
280
280
|
return .allowBluetooth
|
|
281
281
|
case "ALLOW_BLUETOOTH_A2DP":
|
|
282
|
-
|
|
283
|
-
return .allowBluetoothA2DP
|
|
284
|
-
}
|
|
285
|
-
return nil
|
|
282
|
+
return .allowBluetoothA2DP
|
|
286
283
|
case "DEFAULT_TO_SPEAKER":
|
|
287
284
|
return .defaultToSpeaker
|
|
288
285
|
case "DUCK_OTHERS":
|
|
@@ -292,10 +289,7 @@ public class CapacitorAudioRecorderPlugin: CAPPlugin, CAPBridgedPlugin, AVAudioR
|
|
|
292
289
|
case "MIX_WITH_OTHERS":
|
|
293
290
|
return .mixWithOthers
|
|
294
291
|
case "OVERRIDE_MUTED_MICROPHONE_INTERRUPTION":
|
|
295
|
-
|
|
296
|
-
return .overrideMutedMicrophoneInterruption
|
|
297
|
-
}
|
|
298
|
-
return nil
|
|
292
|
+
return .overrideMutedMicrophoneInterruption
|
|
299
293
|
default:
|
|
300
294
|
return nil
|
|
301
295
|
}
|