react-native-audio-api 0.8.1-nightly-2c9c6a6-20250903 → 0.8.1-nightly-da0ddc8-20250904
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.
- package/README.md +1 -1
- package/android/src/main/cpp/audioapi/android/core/AudioPlayer.cpp +4 -0
- package/android/src/main/cpp/audioapi/android/core/AudioPlayer.h +10 -1
- package/android/src/main/cpp/audioapi/android/core/NativeAudioPlayer.hpp +36 -0
- package/android/src/main/java/com/swmansion/audioapi/core/NativeAudioPlayer.kt +24 -0
- package/android/src/main/java/com/swmansion/audioapi/system/LockScreenManager.kt +4 -4
- package/android/src/main/java/com/swmansion/audioapi/system/MediaNotificationManager.kt +78 -70
- package/android/src/main/java/com/swmansion/audioapi/system/MediaReceiver.kt +2 -1
- package/android/src/main/java/com/swmansion/audioapi/system/MediaSessionCallback.kt +3 -11
- package/android/src/main/java/com/swmansion/audioapi/system/MediaSessionManager.kt +57 -39
- package/android/src/main/res/drawable/logo.xml +16 -0
- package/common/cpp/audioapi/HostObjects/AudioContextHostObject.h +17 -23
- package/common/cpp/audioapi/HostObjects/AudioParamHostObject.h +4 -2
- package/common/cpp/audioapi/core/AudioParam.cpp +205 -254
- package/common/cpp/audioapi/core/AudioParam.h +98 -21
- package/common/cpp/audioapi/core/AudioParamEventQueue.cpp +65 -0
- package/common/cpp/audioapi/core/AudioParamEventQueue.h +63 -0
- package/common/cpp/audioapi/core/sources/StreamerNode.cpp +6 -5
- package/common/cpp/audioapi/core/sources/StreamerNode.h +5 -4
- package/common/cpp/audioapi/core/utils/ParamChangeEvent.cpp +2 -39
- package/common/cpp/audioapi/core/utils/ParamChangeEvent.h +53 -12
- package/common/cpp/audioapi/libs/ffmpeg/FFmpegDecoding.cpp +10 -0
- package/common/cpp/audioapi/libs/ffmpeg/FFmpegDecoding.h +10 -0
- package/common/cpp/audioapi/utils/CrossThreadEventScheduler.hpp +58 -0
- package/common/cpp/audioapi/utils/RingBiDirectionalBuffer.hpp +199 -0
- package/ios/audioapi/ios/system/AudioEngine.mm +1 -0
- package/lib/commonjs/plugin/withAudioAPI.js +1 -1
- package/lib/commonjs/plugin/withAudioAPI.js.map +1 -1
- package/lib/module/plugin/withAudioAPI.js +1 -1
- package/lib/module/plugin/withAudioAPI.js.map +1 -1
- package/package.json +1 -1
- package/src/plugin/withAudioAPI.ts +1 -1
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include <bit>
|
|
4
|
+
#include <memory>
|
|
5
|
+
#include <type_traits>
|
|
6
|
+
|
|
7
|
+
namespace audioapi {
|
|
8
|
+
|
|
9
|
+
/// @brief A ring buffer implementation (non thread safe).
|
|
10
|
+
/// @tparam T The type of elements stored in the buffer.
|
|
11
|
+
/// @tparam capacity_ The maximum number of elements that can be held in the buffer.
|
|
12
|
+
/// @note This implementation is NOT thread-safe.
|
|
13
|
+
/// @note Can be refered as bounded queue
|
|
14
|
+
/// @note Capacity must be a valid power of two and must be greater than zero.
|
|
15
|
+
template <typename T, size_t capacity_>
|
|
16
|
+
class RingBiDirectionalBuffer {
|
|
17
|
+
public:
|
|
18
|
+
/// @brief Constructor for RingBuffer.
|
|
19
|
+
RingBiDirectionalBuffer()
|
|
20
|
+
: headIndex_(0), tailIndex_(0) {
|
|
21
|
+
static_assert(isPowerOfTwo(capacity_), "RingBiDirectionalBuffer's capacity must be power of 2");
|
|
22
|
+
buffer_ = static_cast<T*>(
|
|
23
|
+
::operator new[](
|
|
24
|
+
capacity_ * sizeof(T),
|
|
25
|
+
static_cast<std::align_val_t>(alignof(T))
|
|
26
|
+
)
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/// @brief Destructor for RingBuffer.
|
|
31
|
+
~RingBiDirectionalBuffer() {
|
|
32
|
+
for (int i = headIndex_; i != tailIndex_; i = nextIndex(i)) {
|
|
33
|
+
buffer_[i].~T();
|
|
34
|
+
}
|
|
35
|
+
::operator delete[](
|
|
36
|
+
buffer_,
|
|
37
|
+
capacity_ * sizeof(T),
|
|
38
|
+
static_cast<std::align_val_t>(alignof(T))
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/// @brief Push a value into the ring buffer.
|
|
43
|
+
/// @tparam U The type of the value to push.
|
|
44
|
+
/// @param value The value to push.
|
|
45
|
+
/// @return True if the value was pushed successfully, false if the buffer is full.
|
|
46
|
+
template <typename U>
|
|
47
|
+
bool pushBack(U&& value) noexcept(std::is_nothrow_constructible_v<T, U&&>) {
|
|
48
|
+
if (isFull()) [[ unlikely ]] {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
new (&buffer_[tailIndex_]) T(std::forward<U>(value));
|
|
52
|
+
tailIndex_ = nextIndex(tailIndex_);
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/// @brief Push a value to the front of the buffer.
|
|
57
|
+
/// @tparam U The type of the value to push.
|
|
58
|
+
/// @param value The value to push.
|
|
59
|
+
/// @return True if the value was pushed successfully, false if the buffer is full.
|
|
60
|
+
template <typename U>
|
|
61
|
+
bool pushFront(U&& value) noexcept(std::is_nothrow_constructible_v<T, U&&>) {
|
|
62
|
+
if (isFull()) [[ unlikely ]] {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
headIndex_ = prevIndex(headIndex_);
|
|
66
|
+
new (&buffer_[headIndex_]) T(std::forward<U>(value));
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/// @brief Pop a value from the front of the buffer.
|
|
71
|
+
/// @param out The value popped from the buffer.
|
|
72
|
+
/// @return True if the value was popped successfully, false if the buffer is empty.
|
|
73
|
+
bool popFront(T& out) noexcept(std::is_nothrow_move_constructible_v<T> && std::is_nothrow_destructible_v<T>) {
|
|
74
|
+
if (isEmpty()) [[ unlikely ]] {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
out = std::move(buffer_[headIndex_]);
|
|
78
|
+
buffer_[headIndex_].~T();
|
|
79
|
+
headIndex_ = nextIndex(headIndex_);
|
|
80
|
+
return true;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/// @brief Pop a value from the front of the buffer.
|
|
84
|
+
/// @return True if the value was popped successfully, false if the buffer is empty.
|
|
85
|
+
bool popFront() noexcept(std::is_nothrow_destructible_v<T>) {
|
|
86
|
+
if (isEmpty()) [[ unlikely ]] {
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
buffer_[headIndex_].~T();
|
|
90
|
+
headIndex_ = nextIndex(headIndex_);
|
|
91
|
+
return true;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/// @brief Pop a value from the back of the buffer.
|
|
95
|
+
/// @param out The value popped from the buffer.
|
|
96
|
+
/// @return True if the value was popped successfully, false if the buffer is empty.
|
|
97
|
+
bool popBack(T& out) noexcept(std::is_nothrow_move_constructible_v<T> && std::is_nothrow_destructible_v<T>) {
|
|
98
|
+
if (isEmpty()) [[ unlikely ]] {
|
|
99
|
+
return false;
|
|
100
|
+
}
|
|
101
|
+
tailIndex_ = prevIndex(tailIndex_);
|
|
102
|
+
out = std::move(buffer_[tailIndex_]);
|
|
103
|
+
buffer_[tailIndex_].~T();
|
|
104
|
+
return true;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/// @brief Pop a value from the back of the buffer.
|
|
108
|
+
/// @return True if the value was popped successfully, false if the buffer is empty.
|
|
109
|
+
bool popBack() noexcept(std::is_nothrow_destructible_v<T>) {
|
|
110
|
+
if (isEmpty()) [[ unlikely ]] {
|
|
111
|
+
return false;
|
|
112
|
+
}
|
|
113
|
+
tailIndex_ = prevIndex(tailIndex_);
|
|
114
|
+
buffer_[tailIndex_].~T();
|
|
115
|
+
return true;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/// @brief Peek at the front of the buffer.
|
|
119
|
+
/// @return A const reference to the front element of the buffer.
|
|
120
|
+
const inline T& peekFront() const noexcept {
|
|
121
|
+
return buffer_[headIndex_];
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/// @brief Peek at the back of the buffer.
|
|
125
|
+
/// @return A const reference to the back element of the buffer.
|
|
126
|
+
const inline T& peekBack() const noexcept {
|
|
127
|
+
return buffer_[prevIndex(tailIndex_)];
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/// @brief Peek at the front of the buffer.
|
|
131
|
+
/// @return A mutable reference to the front element of the buffer.
|
|
132
|
+
inline T& peekFrontMut() noexcept {
|
|
133
|
+
return buffer_[headIndex_];
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/// @brief Peek at the back of the buffer.
|
|
137
|
+
/// @return A mutable reference to the back element of the buffer.
|
|
138
|
+
inline T& peekBackMut() noexcept {
|
|
139
|
+
return buffer_[prevIndex(tailIndex_)];
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/// @brief Check if the buffer is empty.
|
|
143
|
+
/// @return True if the buffer is empty, false otherwise.
|
|
144
|
+
inline bool isEmpty() const noexcept {
|
|
145
|
+
return headIndex_ == tailIndex_;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/// @brief Check if the buffer is full.
|
|
149
|
+
/// @return True if the buffer is full, false otherwise.
|
|
150
|
+
inline bool isFull() const noexcept {
|
|
151
|
+
return nextIndex(tailIndex_) == headIndex_;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/// @brief Get the capacity of the buffer.
|
|
155
|
+
/// @return The capacity of the buffer.
|
|
156
|
+
inline size_t getCapacity() const noexcept {
|
|
157
|
+
return capacity_;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/// @brief Get the real capacity of the buffer (excluding one slot for the empty state).
|
|
161
|
+
/// @return The real capacity of the buffer.
|
|
162
|
+
inline size_t getRealCapacity() const noexcept {
|
|
163
|
+
return capacity_ - 1;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/// @brief Get the number of elements in the buffer.
|
|
167
|
+
/// @return The number of elements in the buffer.
|
|
168
|
+
inline size_t size() const noexcept {
|
|
169
|
+
return (capacity_ + tailIndex_ - headIndex_) & (capacity_ - 1);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
private:
|
|
173
|
+
T *buffer_;
|
|
174
|
+
size_t headIndex_;
|
|
175
|
+
size_t tailIndex_;
|
|
176
|
+
|
|
177
|
+
/// @brief Get the next index in the buffer.
|
|
178
|
+
/// @param n The current index.
|
|
179
|
+
/// @return The next index in the buffer.
|
|
180
|
+
inline size_t nextIndex(const size_t n) const noexcept {
|
|
181
|
+
return (n + 1) & (capacity_ - 1);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/// @brief Get the previous index in the buffer.
|
|
185
|
+
/// @param n The current index.
|
|
186
|
+
/// @return The previous index in the buffer.
|
|
187
|
+
inline size_t prevIndex(const size_t n) const noexcept {
|
|
188
|
+
return (n - 1) & (capacity_ - 1);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/// @brief Check if a number is a power of two.
|
|
192
|
+
/// @param n The number to check.
|
|
193
|
+
/// @return True if n is a power of two, false otherwise.
|
|
194
|
+
static constexpr bool isPowerOfTwo(size_t n) {
|
|
195
|
+
return std::has_single_bit(n);
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
};
|
|
@@ -43,7 +43,7 @@ const withForegroundService = (config, {
|
|
|
43
43
|
const SFTypes = androidFSTypes.join('|');
|
|
44
44
|
const serviceElement = {
|
|
45
45
|
$: {
|
|
46
|
-
'android:name': 'com.swmansion.audioapi.system.MediaNotificationManager$
|
|
46
|
+
'android:name': 'com.swmansion.audioapi.system.MediaNotificationManager$AudioForegroundService',
|
|
47
47
|
'android:stopWithTask': 'true',
|
|
48
48
|
'android:foregroundServiceType': SFTypes
|
|
49
49
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_configPlugins","require","pkg","withDefaultOptions","options","iosBackgroundMode","androidPermissions","androidForegroundService","androidFSTypes","withBackgroundAudio","config","withInfoPlist","iosConfig","modResults","UIBackgroundModes","Array","from","Set","withIosMicrophonePermission","iosMicrophonePermission","NSMicrophoneUsageDescription","withAndroidPermissions","AndroidConfig","Permissions","withPermissions","withForegroundService","withAndroidManifest","mod","manifest","mainApplication","Manifest","getMainApplicationOrThrow","SFTypes","join","serviceElement","$","intentFilter","service","push","withAudioAPI","optionsIn","_default","exports","default","createRunOncePlugin","name","version"],"sourceRoot":"../../../src","sources":["plugin/withAudioAPI.ts"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AAOA,MAAMC,GAAG,GAAGD,OAAO,CAAC,qCAAqC,CAAC;AAU1D,MAAME,kBAAkB,GAAIC,OAAyB,IAAc;EACjE,OAAO;IACLC,iBAAiB,EAAE,IAAI;IACvBC,kBAAkB,EAAE,CAClB,uCAAuC,EACvC,sDAAsD,CACvD;IACDC,wBAAwB,EAAE,IAAI;IAC9BC,cAAc,EAAE,CAAC,eAAe,CAAC;IACjC,GAAGJ;EACL,CAAC;AACH,CAAC;AAED,MAAMK,mBAAiC,GAAIC,MAAM,IAAK;EACpD,OAAO,IAAAC,4BAAa,EAACD,MAAM,EAAGE,SAAS,IAAK;IAC1CA,SAAS,CAACC,UAAU,CAACC,iBAAiB,GAAG,CACvC,GAAGC,KAAK,CAACC,IAAI,CACX,IAAIC,GAAG,CAAC,CAAC,IAAIL,SAAS,CAACC,UAAU,CAACC,iBAAiB,IAAI,EAAE,CAAC,EAAE,OAAO,CAAC,CACtE,CAAC,CACF;IAED,OAAOF,SAAS;EAClB,CAAC,CAAC;AACJ,CAAC;AAED,MAAMM,2BAAkD,GAAGA,CACzDR,MAAM,EACN;EAAES;AAAwB,CAAC,KACxB;EACH,OAAO,IAAAR,4BAAa,EAACD,MAAM,EAAGE,SAAS,IAAK;IAC1CA,SAAS,CAACC,UAAU,CAACO,4BAA4B,GAAGD,uBAAuB;IAC3E,OAAOP,SAAS;EAClB,CAAC,CAAC;AACJ,CAAC;AAED,MAAMS,sBAA6C,GAAGA,CACpDX,MAAM,EACN;EAAEJ;AAA4B,CAAC,KAC5B;EACH,OAAOgB,4BAAa,CAACC,WAAW,CAACC,eAAe,CAACd,MAAM,EAAEJ,kBAAkB,CAAC;AAC9E,CAAC;AAED,MAAMmB,qBAA4C,GAAGA,CACnDf,MAAM,EACN;EAAEF;AAAwB,CAAC,KACxB;EACH,OAAO,IAAAkB,kCAAmB,EAAChB,MAAM,EAAGiB,GAAG,IAAK;IAC1C,MAAMC,QAAQ,GAAGD,GAAG,CAACd,UAAU;IAC/B,MAAMgB,eAAe,GACnBP,4BAAa,CAACQ,QAAQ,CAACC,yBAAyB,CAACH,QAAQ,CAAC;IAE5D,MAAMI,OAAO,GAAGxB,cAAc,CAACyB,IAAI,CAAC,GAAG,CAAC;IAExC,MAAMC,cAAc,GAAG;MACrBC,CAAC,EAAE;QACD,cAAc,EACZ
|
|
1
|
+
{"version":3,"names":["_configPlugins","require","pkg","withDefaultOptions","options","iosBackgroundMode","androidPermissions","androidForegroundService","androidFSTypes","withBackgroundAudio","config","withInfoPlist","iosConfig","modResults","UIBackgroundModes","Array","from","Set","withIosMicrophonePermission","iosMicrophonePermission","NSMicrophoneUsageDescription","withAndroidPermissions","AndroidConfig","Permissions","withPermissions","withForegroundService","withAndroidManifest","mod","manifest","mainApplication","Manifest","getMainApplicationOrThrow","SFTypes","join","serviceElement","$","intentFilter","service","push","withAudioAPI","optionsIn","_default","exports","default","createRunOncePlugin","name","version"],"sourceRoot":"../../../src","sources":["plugin/withAudioAPI.ts"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AAOA,MAAMC,GAAG,GAAGD,OAAO,CAAC,qCAAqC,CAAC;AAU1D,MAAME,kBAAkB,GAAIC,OAAyB,IAAc;EACjE,OAAO;IACLC,iBAAiB,EAAE,IAAI;IACvBC,kBAAkB,EAAE,CAClB,uCAAuC,EACvC,sDAAsD,CACvD;IACDC,wBA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,+EAA+E;QACjF,sBAAsB,EAAE,MAAM;QAC9B,+BAA+B,EAAEH;MACnC,CAAC;MACDI,YAAY,EAAE;IAChB,CAAC;IAED,IAAI,CAACP,eAAe,CAACQ,OAAO,EAAE;MAC5BR,eAAe,CAACQ,OAAO,GAAG,EAAE;IAC9B;IAEAR,eAAe,CAACQ,OAAO,CAACC,IAAI,CAACJ,cAAc,CAAC;IAE5C,OAAOP,GAAG;EACZ,CAAC,CAAC;AACJ,CAAC;AAED,MAAMY,YAAmC,GAAGA,CAAC7B,MAAM,EAAE8B,SAAS,KAAK;EACjE,MAAMpC,OAAO,GAAGD,kBAAkB,CAACqC,SAAS,IAAI,CAAC,CAAC,CAAC;EAEnD,IAAIpC,OAAO,CAACC,iBAAiB,EAAE;IAC7BK,MAAM,GAAGD,mBAAmB,CAACC,MAAM,CAAC;EACtC;EAEAA,MAAM,GAAGW,sBAAsB,CAACX,MAAM,EAAEN,OAAO,CAAC;EAEhD,IAAIA,OAAO,CAACG,wBAAwB,EAAE;IACpCG,MAAM,GAAGe,qBAAqB,CAACf,MAAM,EAAEN,OAAO,CAAC;EACjD;EAEA,IAAIA,OAAO,CAACe,uBAAuB,EAAE;IACnCT,MAAM,GAAGQ,2BAA2B,CAACR,MAAM,EAAEN,OAAO,CAAC;EACvD;EAEA,OAAOM,MAAM;AACf,CAAC;AAAC,IAAA+B,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEa,IAAAC,kCAAmB,EAACL,YAAY,EAAErC,GAAG,CAAC2C,IAAI,EAAE3C,GAAG,CAAC4C,OAAO,CAAC","ignoreList":[]}
|
|
@@ -39,7 +39,7 @@ const withForegroundService = (config, {
|
|
|
39
39
|
const SFTypes = androidFSTypes.join('|');
|
|
40
40
|
const serviceElement = {
|
|
41
41
|
$: {
|
|
42
|
-
'android:name': 'com.swmansion.audioapi.system.MediaNotificationManager$
|
|
42
|
+
'android:name': 'com.swmansion.audioapi.system.MediaNotificationManager$AudioForegroundService',
|
|
43
43
|
'android:stopWithTask': 'true',
|
|
44
44
|
'android:foregroundServiceType': SFTypes
|
|
45
45
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["AndroidConfig","createRunOncePlugin","withInfoPlist","withAndroidManifest","pkg","require","withDefaultOptions","options","iosBackgroundMode","androidPermissions","androidForegroundService","androidFSTypes","withBackgroundAudio","config","iosConfig","modResults","UIBackgroundModes","Array","from","Set","withIosMicrophonePermission","iosMicrophonePermission","NSMicrophoneUsageDescription","withAndroidPermissions","Permissions","withPermissions","withForegroundService","mod","manifest","mainApplication","Manifest","getMainApplicationOrThrow","SFTypes","join","serviceElement","$","intentFilter","service","push","withAudioAPI","optionsIn","name","version"],"sourceRoot":"../../../src","sources":["plugin/withAudioAPI.ts"],"mappings":";;AAAA,SACEA,aAAa,EACbC,mBAAmB,EAEnBC,aAAa,EACbC,mBAAmB,QACd,sBAAsB;AAC7B,MAAMC,GAAG,GAAGC,OAAO,CAAC,qCAAqC,CAAC;AAU1D,MAAMC,kBAAkB,GAAIC,OAAyB,IAAc;EACjE,OAAO;IACLC,iBAAiB,EAAE,IAAI;IACvBC,kBAAkB,EAAE,CAClB,uCAAuC,EACvC,sDAAsD,CACvD;IACDC,wBAAwB,EAAE,IAAI;IAC9BC,cAAc,EAAE,CAAC,eAAe,CAAC;IACjC,GAAGJ;EACL,CAAC;AACH,CAAC;AAED,MAAMK,mBAAiC,GAAIC,MAAM,IAAK;EACpD,OAAOX,aAAa,CAACW,MAAM,EAAGC,SAAS,IAAK;IAC1CA,SAAS,CAACC,UAAU,CAACC,iBAAiB,GAAG,CACvC,GAAGC,KAAK,CAACC,IAAI,CACX,IAAIC,GAAG,CAAC,CAAC,IAAIL,SAAS,CAACC,UAAU,CAACC,iBAAiB,IAAI,EAAE,CAAC,EAAE,OAAO,CAAC,CACtE,CAAC,CACF;IAED,OAAOF,SAAS;EAClB,CAAC,CAAC;AACJ,CAAC;AAED,MAAMM,2BAAkD,GAAGA,CACzDP,MAAM,EACN;EAAEQ;AAAwB,CAAC,KACxB;EACH,OAAOnB,aAAa,CAACW,MAAM,EAAGC,SAAS,IAAK;IAC1CA,SAAS,CAACC,UAAU,CAACO,4BAA4B,GAAGD,uBAAuB;IAC3E,OAAOP,SAAS;EAClB,CAAC,CAAC;AACJ,CAAC;AAED,MAAMS,sBAA6C,GAAGA,CACpDV,MAAM,EACN;EAAEJ;AAA4B,CAAC,KAC5B;EACH,OAAOT,aAAa,CAACwB,WAAW,CAACC,eAAe,CAACZ,MAAM,EAAEJ,kBAAkB,CAAC;AAC9E,CAAC;AAED,MAAMiB,qBAA4C,GAAGA,CACnDb,MAAM,EACN;EAAEF;AAAwB,CAAC,KACxB;EACH,OAAOR,mBAAmB,CAACU,MAAM,EAAGc,GAAG,IAAK;IAC1C,MAAMC,QAAQ,GAAGD,GAAG,CAACZ,UAAU;IAC/B,MAAMc,eAAe,GACnB7B,aAAa,CAAC8B,QAAQ,CAACC,yBAAyB,CAACH,QAAQ,CAAC;IAE5D,MAAMI,OAAO,GAAGrB,cAAc,CAACsB,IAAI,CAAC,GAAG,CAAC;IAExC,MAAMC,cAAc,GAAG;MACrBC,CAAC,EAAE;QACD,cAAc,EACZ
|
|
1
|
+
{"version":3,"names":["AndroidConfig","createRunOncePlugin","withInfoPlist","withAndroidManifest","pkg","require","withDefaultOptions","options","iosBackgroundMode","androidPermissions","androidForegroundService","androidFSTypes","withBackgroundAudio","config","iosConfig","modResults","UIBackgroundModes","Array","from","Set","withIosMicrophonePermission","iosMicrophonePermission","NSMicrophoneUsageDescription","withAndroidPermissions","Permissions","withPermissions","withForegroundService","mod","manifest","mainApplication","Manifest","getMainApplicationOrThrow","SFTypes","join","serviceElement","$","intentFilter","service","push","withAudioAPI","optionsIn","name","version"],"sourceRoot":"../../../src","sources":["plugin/withAudioAPI.ts"],"mappings":";;AAAA,SACEA,aAAa,EACbC,mBAAmB,EAEnBC,aAAa,EACbC,mBAAmB,QACd,sBAAsB;AAC7B,MAAMC,GAAG,GA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.8.1-nightly-da0ddc8-20250904",
|
|
4
4
|
"description": "react-native-audio-api provides system for controlling audio in React Native environment compatible with Web Audio API specification",
|
|
5
5
|
"bin": {
|
|
6
6
|
"setup-rn-audio-api-web": "./scripts/setup-rn-audio-api-web.js"
|
|
@@ -71,7 +71,7 @@ const withForegroundService: ConfigPlugin<Options> = (
|
|
|
71
71
|
const serviceElement = {
|
|
72
72
|
$: {
|
|
73
73
|
'android:name':
|
|
74
|
-
'com.swmansion.audioapi.system.MediaNotificationManager$
|
|
74
|
+
'com.swmansion.audioapi.system.MediaNotificationManager$AudioForegroundService',
|
|
75
75
|
'android:stopWithTask': 'true',
|
|
76
76
|
'android:foregroundServiceType': SFTypes,
|
|
77
77
|
},
|