react-native-audio-api 0.11.0-nightly-db51488-20251208 → 0.11.0-nightly-6ba0571-20251209

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.
Files changed (134) hide show
  1. package/android/src/main/java/com/swmansion/audioapi/AudioAPIModule.kt +164 -16
  2. package/android/src/main/java/com/swmansion/audioapi/core/NativeAudioPlayer.kt +10 -8
  3. package/android/src/main/java/com/swmansion/audioapi/core/NativeAudioRecorder.kt +10 -8
  4. package/android/src/main/java/com/swmansion/audioapi/system/AudioFocusListener.kt +8 -23
  5. package/android/src/main/java/com/swmansion/audioapi/system/CentralizedForegroundService.kt +127 -0
  6. package/android/src/main/java/com/swmansion/audioapi/system/ForegroundServiceManager.kt +116 -0
  7. package/android/src/main/java/com/swmansion/audioapi/system/MediaSessionManager.kt +115 -107
  8. package/android/src/main/java/com/swmansion/audioapi/system/PermissionRequestListener.kt +2 -1
  9. package/android/src/main/java/com/swmansion/audioapi/system/notification/BaseNotification.kt +47 -0
  10. package/android/src/main/java/com/swmansion/audioapi/system/notification/NotificationRegistry.kt +191 -0
  11. package/android/src/main/java/com/swmansion/audioapi/system/notification/PlaybackNotification.kt +668 -0
  12. package/android/src/main/java/com/swmansion/audioapi/system/notification/PlaybackNotificationReceiver.kt +33 -0
  13. package/android/src/main/java/com/swmansion/audioapi/system/notification/RecordingNotification.kt +303 -0
  14. package/android/src/main/java/com/swmansion/audioapi/system/notification/RecordingNotificationReceiver.kt +43 -0
  15. package/android/src/main/java/com/swmansion/audioapi/system/notification/SimpleNotification.kt +119 -0
  16. package/ios/audioapi/ios/AudioAPIModule.h +2 -2
  17. package/ios/audioapi/ios/AudioAPIModule.mm +108 -18
  18. package/ios/audioapi/ios/system/AudioEngine.mm +2 -2
  19. package/ios/audioapi/ios/system/AudioSessionManager.mm +1 -1
  20. package/ios/audioapi/ios/system/NotificationManager.mm +1 -1
  21. package/ios/audioapi/ios/system/notification/BaseNotification.h +58 -0
  22. package/ios/audioapi/ios/system/notification/NotificationRegistry.h +70 -0
  23. package/ios/audioapi/ios/system/notification/NotificationRegistry.mm +172 -0
  24. package/ios/audioapi/ios/system/notification/PlaybackNotification.h +27 -0
  25. package/ios/audioapi/ios/system/notification/PlaybackNotification.mm +427 -0
  26. package/lib/commonjs/api.js +59 -10
  27. package/lib/commonjs/api.js.map +1 -1
  28. package/lib/commonjs/api.web.js +27 -14
  29. package/lib/commonjs/api.web.js.map +1 -1
  30. package/lib/commonjs/specs/NativeAudioAPIModule.js.map +1 -1
  31. package/lib/commonjs/system/AudioManager.js +6 -9
  32. package/lib/commonjs/system/AudioManager.js.map +1 -1
  33. package/lib/commonjs/system/index.js +13 -0
  34. package/lib/commonjs/system/index.js.map +1 -1
  35. package/lib/commonjs/system/notification/PlaybackNotificationManager.js +135 -0
  36. package/lib/commonjs/system/notification/PlaybackNotificationManager.js.map +1 -0
  37. package/lib/commonjs/system/notification/RecordingNotificationManager.js +182 -0
  38. package/lib/commonjs/system/notification/RecordingNotificationManager.js.map +1 -0
  39. package/lib/commonjs/system/notification/SimpleNotificationManager.js +122 -0
  40. package/lib/commonjs/system/notification/SimpleNotificationManager.js.map +1 -0
  41. package/lib/commonjs/system/notification/index.js +45 -0
  42. package/lib/commonjs/system/notification/index.js.map +1 -0
  43. package/lib/commonjs/system/notification/types.js +6 -0
  44. package/lib/commonjs/system/notification/types.js.map +1 -0
  45. package/lib/commonjs/web-system/index.js +17 -0
  46. package/lib/commonjs/web-system/index.js.map +1 -0
  47. package/lib/commonjs/web-system/notification/PlaybackNotificationManager.js +34 -0
  48. package/lib/commonjs/web-system/notification/PlaybackNotificationManager.js.map +1 -0
  49. package/lib/commonjs/web-system/notification/RecordingNotificationManager.js +34 -0
  50. package/lib/commonjs/web-system/notification/RecordingNotificationManager.js.map +1 -0
  51. package/lib/commonjs/web-system/notification/index.js +21 -0
  52. package/lib/commonjs/web-system/notification/index.js.map +1 -0
  53. package/lib/module/api.js +5 -1
  54. package/lib/module/api.js.map +1 -1
  55. package/lib/module/api.web.js +3 -1
  56. package/lib/module/api.web.js.map +1 -1
  57. package/lib/module/specs/NativeAudioAPIModule.js.map +1 -1
  58. package/lib/module/system/AudioManager.js +6 -9
  59. package/lib/module/system/AudioManager.js.map +1 -1
  60. package/lib/module/system/index.js +1 -0
  61. package/lib/module/system/index.js.map +1 -1
  62. package/lib/module/system/notification/PlaybackNotificationManager.js +131 -0
  63. package/lib/module/system/notification/PlaybackNotificationManager.js.map +1 -0
  64. package/lib/module/system/notification/RecordingNotificationManager.js +178 -0
  65. package/lib/module/system/notification/RecordingNotificationManager.js.map +1 -0
  66. package/lib/module/system/notification/SimpleNotificationManager.js +118 -0
  67. package/lib/module/system/notification/SimpleNotificationManager.js.map +1 -0
  68. package/lib/module/system/notification/index.js +7 -0
  69. package/lib/module/system/notification/index.js.map +1 -0
  70. package/lib/module/system/notification/types.js +4 -0
  71. package/lib/module/system/notification/types.js.map +1 -0
  72. package/lib/module/web-system/index.js +4 -0
  73. package/lib/module/web-system/index.js.map +1 -0
  74. package/lib/module/web-system/notification/PlaybackNotificationManager.js +30 -0
  75. package/lib/module/web-system/notification/PlaybackNotificationManager.js.map +1 -0
  76. package/lib/module/web-system/notification/RecordingNotificationManager.js +30 -0
  77. package/lib/module/web-system/notification/RecordingNotificationManager.js.map +1 -0
  78. package/lib/module/web-system/notification/index.js +5 -0
  79. package/lib/module/web-system/notification/index.js.map +1 -0
  80. package/lib/typescript/api.d.ts +3 -1
  81. package/lib/typescript/api.d.ts.map +1 -1
  82. package/lib/typescript/api.web.d.ts +3 -1
  83. package/lib/typescript/api.web.d.ts.map +1 -1
  84. package/lib/typescript/events/types.d.ts +4 -18
  85. package/lib/typescript/events/types.d.ts.map +1 -1
  86. package/lib/typescript/specs/NativeAudioAPIModule.d.ts +16 -5
  87. package/lib/typescript/specs/NativeAudioAPIModule.d.ts.map +1 -1
  88. package/lib/typescript/system/AudioManager.d.ts +4 -5
  89. package/lib/typescript/system/AudioManager.d.ts.map +1 -1
  90. package/lib/typescript/system/index.d.ts +1 -0
  91. package/lib/typescript/system/index.d.ts.map +1 -1
  92. package/lib/typescript/system/notification/PlaybackNotificationManager.d.ts +22 -0
  93. package/lib/typescript/system/notification/PlaybackNotificationManager.d.ts.map +1 -0
  94. package/lib/typescript/system/notification/RecordingNotificationManager.d.ts +23 -0
  95. package/lib/typescript/system/notification/RecordingNotificationManager.d.ts.map +1 -0
  96. package/lib/typescript/system/notification/SimpleNotificationManager.d.ts +20 -0
  97. package/lib/typescript/system/notification/SimpleNotificationManager.d.ts.map +1 -0
  98. package/lib/typescript/system/notification/index.d.ts +5 -0
  99. package/lib/typescript/system/notification/index.d.ts.map +1 -0
  100. package/lib/typescript/system/notification/types.d.ts +65 -0
  101. package/lib/typescript/system/notification/types.d.ts.map +1 -0
  102. package/lib/typescript/system/types.d.ts +0 -16
  103. package/lib/typescript/system/types.d.ts.map +1 -1
  104. package/lib/typescript/web-system/index.d.ts +2 -0
  105. package/lib/typescript/web-system/index.d.ts.map +1 -0
  106. package/lib/typescript/web-system/notification/PlaybackNotificationManager.d.ts +19 -0
  107. package/lib/typescript/web-system/notification/PlaybackNotificationManager.d.ts.map +1 -0
  108. package/lib/typescript/web-system/notification/RecordingNotificationManager.d.ts +19 -0
  109. package/lib/typescript/web-system/notification/RecordingNotificationManager.d.ts.map +1 -0
  110. package/lib/typescript/web-system/notification/index.d.ts +3 -0
  111. package/lib/typescript/web-system/notification/index.d.ts.map +1 -0
  112. package/package.json +1 -1
  113. package/src/api.ts +17 -2
  114. package/src/api.web.ts +7 -2
  115. package/src/events/types.ts +4 -20
  116. package/src/specs/NativeAudioAPIModule.ts +23 -7
  117. package/src/system/AudioManager.ts +10 -23
  118. package/src/system/index.ts +1 -0
  119. package/src/system/notification/PlaybackNotificationManager.ts +193 -0
  120. package/src/system/notification/RecordingNotificationManager.ts +242 -0
  121. package/src/system/notification/SimpleNotificationManager.ts +170 -0
  122. package/src/system/notification/index.ts +4 -0
  123. package/src/system/notification/types.ts +110 -0
  124. package/src/system/types.ts +0 -18
  125. package/src/web-system/index.ts +1 -0
  126. package/src/web-system/notification/PlaybackNotificationManager.ts +60 -0
  127. package/src/web-system/notification/RecordingNotificationManager.ts +60 -0
  128. package/src/web-system/notification/index.ts +2 -0
  129. package/android/src/main/java/com/swmansion/audioapi/system/LockScreenManager.kt +0 -347
  130. package/android/src/main/java/com/swmansion/audioapi/system/MediaNotificationManager.kt +0 -273
  131. package/android/src/main/java/com/swmansion/audioapi/system/MediaReceiver.kt +0 -57
  132. package/android/src/main/java/com/swmansion/audioapi/system/MediaSessionCallback.kt +0 -61
  133. package/ios/audioapi/ios/system/LockScreenManager.h +0 -23
  134. package/ios/audioapi/ios/system/LockScreenManager.mm +0 -314
@@ -0,0 +1,427 @@
1
+ #import <audioapi/ios/AudioAPIModule.h>
2
+ #import <audioapi/ios/system/notification/PlaybackNotification.h>
3
+
4
+ #define NOW_PLAYING_INFO_KEYS \
5
+ @{ \
6
+ @"title" : MPMediaItemPropertyTitle, \
7
+ @"artist" : MPMediaItemPropertyArtist, \
8
+ @"album" : MPMediaItemPropertyAlbumTitle, \
9
+ @"duration" : MPMediaItemPropertyPlaybackDuration, \
10
+ @"elapsedTime" : MPNowPlayingInfoPropertyElapsedPlaybackTime, \
11
+ @"speed" : MPNowPlayingInfoPropertyPlaybackRate, \
12
+ @"artwork" : MPMediaItemPropertyArtwork \
13
+ }
14
+
15
+ @implementation PlaybackNotification {
16
+ BOOL _isInitialized;
17
+ NSMutableDictionary *_currentInfo;
18
+ }
19
+
20
+ - (instancetype)initWithAudioAPIModule:(AudioAPIModule *)audioAPIModule
21
+ {
22
+ if (self = [super init]) {
23
+ self.audioAPIModule = audioAPIModule;
24
+ self.playingInfoCenter = [MPNowPlayingInfoCenter defaultCenter];
25
+ _isInitialized = false;
26
+ _isActive = false;
27
+ _currentInfo = [[NSMutableDictionary alloc] init];
28
+ }
29
+
30
+ return self;
31
+ }
32
+
33
+ #pragma mark - BaseNotification Protocol
34
+
35
+ - (BOOL)initializeWithOptions:(NSDictionary *)options
36
+ {
37
+ if (_isInitialized) {
38
+ return true;
39
+ }
40
+
41
+ // Enable remote control events
42
+ dispatch_async(dispatch_get_main_queue(), ^{
43
+ [[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
44
+ });
45
+
46
+ // Enable default remote commands
47
+ [self enableRemoteCommand:@"play" enabled:true];
48
+ [self enableRemoteCommand:@"pause" enabled:true];
49
+ [self enableRemoteCommand:@"next" enabled:true];
50
+ [self enableRemoteCommand:@"previous" enabled:true];
51
+ [self enableRemoteCommand:@"skipForward" enabled:true];
52
+ [self enableRemoteCommand:@"skipBackward" enabled:true];
53
+ [self enableRemoteCommand:@"seek" enabled:true];
54
+
55
+ _isInitialized = true;
56
+ return true;
57
+ }
58
+
59
+ - (BOOL)showWithOptions:(NSDictionary *)options
60
+ {
61
+ if (!_isInitialized) {
62
+ if (![self initializeWithOptions:options]) {
63
+ return false;
64
+ }
65
+ }
66
+
67
+ // Update the now playing info
68
+ [self updateNowPlayingInfo:options];
69
+
70
+ _isActive = true;
71
+
72
+ return true;
73
+ }
74
+
75
+ - (BOOL)updateWithOptions:(NSDictionary *)options
76
+ {
77
+ if (!_isActive) {
78
+ return false;
79
+ }
80
+
81
+ // Handle control enable/disable
82
+ if (options[@"control"] && options[@"enabled"]) {
83
+ NSString *control = options[@"control"];
84
+ BOOL enabled = [options[@"enabled"] boolValue];
85
+ [self enableControl:control enabled:enabled];
86
+ return true;
87
+ }
88
+
89
+ // Update the now playing info
90
+ [self updateNowPlayingInfo:options];
91
+
92
+ return true;
93
+ }
94
+
95
+ - (BOOL)hide
96
+ {
97
+ if (!_isActive) {
98
+ return true;
99
+ }
100
+
101
+ // Clear now playing info
102
+ self.playingInfoCenter.nowPlayingInfo = nil;
103
+ self.artworkUrl = nil;
104
+ [_currentInfo removeAllObjects];
105
+
106
+ _isActive = false;
107
+
108
+ return true;
109
+ }
110
+
111
+ - (void)cleanup
112
+ {
113
+ // Hide if active
114
+ if (_isActive) {
115
+ [self hide];
116
+ }
117
+
118
+ // Disable all remote commands
119
+ MPRemoteCommandCenter *remoteCenter = [MPRemoteCommandCenter sharedCommandCenter];
120
+ [remoteCenter.playCommand removeTarget:self];
121
+ [remoteCenter.pauseCommand removeTarget:self];
122
+ [remoteCenter.stopCommand removeTarget:self];
123
+ [remoteCenter.togglePlayPauseCommand removeTarget:self];
124
+ [remoteCenter.nextTrackCommand removeTarget:self];
125
+ [remoteCenter.previousTrackCommand removeTarget:self];
126
+ [remoteCenter.skipForwardCommand removeTarget:self];
127
+ [remoteCenter.skipBackwardCommand removeTarget:self];
128
+ [remoteCenter.seekForwardCommand removeTarget:self];
129
+ [remoteCenter.seekBackwardCommand removeTarget:self];
130
+ [remoteCenter.changePlaybackPositionCommand removeTarget:self];
131
+
132
+ // Disable remote control events
133
+ dispatch_async(dispatch_get_main_queue(), ^{
134
+ [[UIApplication sharedApplication] endReceivingRemoteControlEvents];
135
+ });
136
+
137
+ _isInitialized = false;
138
+ }
139
+
140
+ - (BOOL)isActive
141
+ {
142
+ return _isActive;
143
+ }
144
+
145
+ - (NSString *)getNotificationType
146
+ {
147
+ return @"playback";
148
+ }
149
+
150
+ #pragma mark - Private Methods
151
+
152
+ - (void)updateNowPlayingInfo:(NSDictionary *)info
153
+ {
154
+ if (!info) {
155
+ return;
156
+ }
157
+
158
+ // Get existing now playing info or create new one
159
+ NSMutableDictionary *nowPlayingInfo = [self.playingInfoCenter.nowPlayingInfo mutableCopy];
160
+ if (!nowPlayingInfo) {
161
+ nowPlayingInfo = [[NSMutableDictionary alloc] init];
162
+ }
163
+
164
+ // Map keys from our API to MPNowPlayingInfoCenter keys
165
+ NSDictionary *keyMap = NOW_PLAYING_INFO_KEYS;
166
+
167
+ // Only update the keys that are provided in this update
168
+ for (NSString *key in info) {
169
+ NSString *mpKey = keyMap[key];
170
+ if (mpKey) {
171
+ // Handle artwork specially - don't set it directly to nowPlayingInfo
172
+ if ([key isEqualToString:@"artwork"]) {
173
+ _currentInfo[key] = info[key];
174
+ } else {
175
+ nowPlayingInfo[mpKey] = info[key];
176
+ _currentInfo[key] = info[key];
177
+ }
178
+ }
179
+ }
180
+
181
+ self.playingInfoCenter.nowPlayingInfo = nowPlayingInfo;
182
+
183
+ // Handle playback state
184
+ NSString *state = _currentInfo[@"state"];
185
+ MPNowPlayingPlaybackState playbackState = MPNowPlayingPlaybackStatePaused;
186
+
187
+ if (state) {
188
+ if ([state isEqualToString:@"playing"]) {
189
+ playbackState = MPNowPlayingPlaybackStatePlaying;
190
+ } else if ([state isEqualToString:@"paused"]) {
191
+ playbackState = MPNowPlayingPlaybackStatePaused;
192
+ } else {
193
+ playbackState = MPNowPlayingPlaybackStatePaused;
194
+ }
195
+ }
196
+
197
+ self.playingInfoCenter.playbackState = playbackState;
198
+
199
+ // Handle artwork
200
+ NSString *artworkUrl = [self getArtworkUrl:_currentInfo[@"artwork"]];
201
+ [self updateArtworkIfNeeded:artworkUrl];
202
+ }
203
+
204
+ - (NSString *)getArtworkUrl:(id)artwork
205
+ {
206
+ if (!artwork) {
207
+ return nil;
208
+ }
209
+
210
+ // Handle both string and dictionary formats
211
+ if ([artwork isKindOfClass:[NSString class]]) {
212
+ return artwork;
213
+ } else if ([artwork isKindOfClass:[NSDictionary class]]) {
214
+ return artwork[@"uri"];
215
+ }
216
+
217
+ return nil;
218
+ }
219
+
220
+ - (void)updateArtworkIfNeeded:(NSString *)artworkUrl
221
+ {
222
+ if (!artworkUrl) {
223
+ return;
224
+ }
225
+
226
+ MPNowPlayingInfoCenter *center = [MPNowPlayingInfoCenter defaultCenter];
227
+ if ([artworkUrl isEqualToString:self.artworkUrl] &&
228
+ center.nowPlayingInfo[MPMediaItemPropertyArtwork] != nil) {
229
+ return;
230
+ }
231
+
232
+ self.artworkUrl = artworkUrl;
233
+
234
+ // Load artwork asynchronously
235
+ dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^{
236
+ NSURL *url = nil;
237
+ NSData *imageData = nil;
238
+ UIImage *image = nil;
239
+
240
+ @try {
241
+ if ([artworkUrl hasPrefix:@"http://"] || [artworkUrl hasPrefix:@"https://"]) {
242
+ // Remote URL
243
+ url = [NSURL URLWithString:artworkUrl];
244
+ imageData = [NSData dataWithContentsOfURL:url];
245
+ } else {
246
+ // Local file - try as resource or file path
247
+ NSString *imagePath = [[NSBundle mainBundle] pathForResource:artworkUrl ofType:nil];
248
+ if (imagePath) {
249
+ imageData = [NSData dataWithContentsOfFile:imagePath];
250
+ } else {
251
+ // Try as absolute path
252
+ imageData = [NSData dataWithContentsOfFile:artworkUrl];
253
+ }
254
+ }
255
+
256
+ if (imageData) {
257
+ image = [UIImage imageWithData:imageData];
258
+ }
259
+ } @catch (NSException *exception) {
260
+ // Failed to load artwork
261
+ }
262
+
263
+ if (image) {
264
+ MPMediaItemArtwork *artwork = [[MPMediaItemArtwork alloc]
265
+ initWithBoundsSize:image.size
266
+ requestHandler:^UIImage *_Nonnull(CGSize size) { return image; }];
267
+
268
+ dispatch_async(dispatch_get_main_queue(), ^{
269
+ NSMutableDictionary *nowPlayingInfo = [center.nowPlayingInfo mutableCopy];
270
+ if (!nowPlayingInfo) {
271
+ nowPlayingInfo = [[NSMutableDictionary alloc] init];
272
+ }
273
+ nowPlayingInfo[MPMediaItemPropertyArtwork] = artwork;
274
+ center.nowPlayingInfo = nowPlayingInfo;
275
+ });
276
+ }
277
+ });
278
+ }
279
+
280
+ - (void)enableControl:(NSString *)control enabled:(BOOL)enabled
281
+ {
282
+ NSSet *validControls = [NSSet setWithObjects:@"play",
283
+ @"pause",
284
+ @"next",
285
+ @"previous",
286
+ @"skipForward",
287
+ @"skipBackward",
288
+ @"seek",
289
+ nil];
290
+ if ([validControls containsObject:control]) {
291
+ [self enableRemoteCommand:control enabled:enabled];
292
+ }
293
+ }
294
+
295
+ - (void)enableRemoteCommand:(NSString *)name enabled:(BOOL)enabled
296
+ {
297
+ MPRemoteCommandCenter *remoteCenter = [MPRemoteCommandCenter sharedCommandCenter];
298
+
299
+ if ([name isEqualToString:@"play"]) {
300
+ [self enableCommand:remoteCenter.playCommand withSelector:@selector(onPlay:) enabled:enabled];
301
+ } else if ([name isEqualToString:@"pause"]) {
302
+ [self enableCommand:remoteCenter.pauseCommand withSelector:@selector(onPause:) enabled:enabled];
303
+ } else if ([name isEqualToString:@"stop"]) {
304
+ [self enableCommand:remoteCenter.stopCommand withSelector:@selector(onStop:) enabled:enabled];
305
+ } else if ([name isEqualToString:@"togglePlayPause"]) {
306
+ [self enableCommand:remoteCenter.togglePlayPauseCommand
307
+ withSelector:@selector(onTogglePlayPause:)
308
+ enabled:enabled];
309
+ } else if ([name isEqualToString:@"next"]) {
310
+ [self enableCommand:remoteCenter.nextTrackCommand
311
+ withSelector:@selector(onNextTrack:)
312
+ enabled:enabled];
313
+ } else if ([name isEqualToString:@"previous"]) {
314
+ [self enableCommand:remoteCenter.previousTrackCommand
315
+ withSelector:@selector(onPreviousTrack:)
316
+ enabled:enabled];
317
+ } else if ([name isEqualToString:@"skipForward"]) {
318
+ remoteCenter.skipForwardCommand.preferredIntervals = @[ @(15) ];
319
+ [self enableCommand:remoteCenter.skipForwardCommand
320
+ withSelector:@selector(onSkipForward:)
321
+ enabled:enabled];
322
+ } else if ([name isEqualToString:@"skipBackward"]) {
323
+ remoteCenter.skipBackwardCommand.preferredIntervals = @[ @(15) ];
324
+ [self enableCommand:remoteCenter.skipBackwardCommand
325
+ withSelector:@selector(onSkipBackward:)
326
+ enabled:enabled];
327
+ } else if ([name isEqualToString:@"seekForward"]) {
328
+ [self enableCommand:remoteCenter.seekForwardCommand
329
+ withSelector:@selector(onSeekForward:)
330
+ enabled:enabled];
331
+ } else if ([name isEqualToString:@"seekBackward"]) {
332
+ [self enableCommand:remoteCenter.seekBackwardCommand
333
+ withSelector:@selector(onSeekBackward:)
334
+ enabled:enabled];
335
+ } else if ([name isEqualToString:@"seek"]) {
336
+ [self enableCommand:remoteCenter.changePlaybackPositionCommand
337
+ withSelector:@selector(onChangePlaybackPosition:)
338
+ enabled:enabled];
339
+ }
340
+ }
341
+
342
+ - (void)enableCommand:(MPRemoteCommand *)command withSelector:(SEL)selector enabled:(BOOL)enabled
343
+ {
344
+ [command removeTarget:self];
345
+ command.enabled = enabled;
346
+ if (enabled) {
347
+ [command addTarget:self action:selector];
348
+ }
349
+ }
350
+
351
+ #pragma mark - Remote Command Handlers
352
+
353
+ - (MPRemoteCommandHandlerStatus)onPlay:(MPRemoteCommandEvent *)event
354
+ {
355
+ [self.audioAPIModule invokeHandlerWithEventName:@"playbackNotificationPlay" eventBody:@{}];
356
+ return MPRemoteCommandHandlerStatusSuccess;
357
+ }
358
+
359
+ - (MPRemoteCommandHandlerStatus)onPause:(MPRemoteCommandEvent *)event
360
+ {
361
+ [self.audioAPIModule invokeHandlerWithEventName:@"playbackNotificationPause" eventBody:@{}];
362
+ return MPRemoteCommandHandlerStatusSuccess;
363
+ }
364
+
365
+ - (MPRemoteCommandHandlerStatus)onStop:(MPRemoteCommandEvent *)event
366
+ {
367
+ [self.audioAPIModule invokeHandlerWithEventName:@"playbackNotificationStop" eventBody:@{}];
368
+ return MPRemoteCommandHandlerStatusSuccess;
369
+ }
370
+
371
+ - (MPRemoteCommandHandlerStatus)onTogglePlayPause:(MPRemoteCommandEvent *)event
372
+ {
373
+ [self.audioAPIModule invokeHandlerWithEventName:@"playbackNotificationTogglePlayPause"
374
+ eventBody:@{}];
375
+ return MPRemoteCommandHandlerStatusSuccess;
376
+ }
377
+
378
+ - (MPRemoteCommandHandlerStatus)onNextTrack:(MPRemoteCommandEvent *)event
379
+ {
380
+ [self.audioAPIModule invokeHandlerWithEventName:@"playbackNotificationNext" eventBody:@{}];
381
+ return MPRemoteCommandHandlerStatusSuccess;
382
+ }
383
+
384
+ - (MPRemoteCommandHandlerStatus)onPreviousTrack:(MPRemoteCommandEvent *)event
385
+ {
386
+ [self.audioAPIModule invokeHandlerWithEventName:@"playbackNotificationPrevious" eventBody:@{}];
387
+ return MPRemoteCommandHandlerStatusSuccess;
388
+ }
389
+
390
+ - (MPRemoteCommandHandlerStatus)onSeekForward:(MPRemoteCommandEvent *)event
391
+ {
392
+ [self.audioAPIModule invokeHandlerWithEventName:@"playbackNotificationSeekForward" eventBody:@{}];
393
+ return MPRemoteCommandHandlerStatusSuccess;
394
+ }
395
+
396
+ - (MPRemoteCommandHandlerStatus)onSeekBackward:(MPRemoteCommandEvent *)event
397
+ {
398
+ [self.audioAPIModule invokeHandlerWithEventName:@"playbackNotificationSeekBackward"
399
+ eventBody:@{}];
400
+ return MPRemoteCommandHandlerStatusSuccess;
401
+ }
402
+
403
+ - (MPRemoteCommandHandlerStatus)onSkipForward:(MPSkipIntervalCommandEvent *)event
404
+ {
405
+ NSDictionary *body = @{@"value" : @(event.interval)};
406
+ [self.audioAPIModule invokeHandlerWithEventName:@"playbackNotificationSkipForward"
407
+ eventBody:body];
408
+ return MPRemoteCommandHandlerStatusSuccess;
409
+ }
410
+
411
+ - (MPRemoteCommandHandlerStatus)onSkipBackward:(MPSkipIntervalCommandEvent *)event
412
+ {
413
+ NSDictionary *body = @{@"value" : @(event.interval)};
414
+ [self.audioAPIModule invokeHandlerWithEventName:@"playbackNotificationSkipBackward"
415
+ eventBody:body];
416
+ return MPRemoteCommandHandlerStatusSuccess;
417
+ }
418
+
419
+ - (MPRemoteCommandHandlerStatus)onChangePlaybackPosition:
420
+ (MPChangePlaybackPositionCommandEvent *)event
421
+ {
422
+ NSDictionary *body = @{@"value" : @(event.positionTime)};
423
+ [self.audioAPIModule invokeHandlerWithEventName:@"playbackNotificationSeekTo" eventBody:body];
424
+ return MPRemoteCommandHandlerStatusSuccess;
425
+ }
426
+
427
+ @end
@@ -165,22 +165,16 @@ Object.defineProperty(exports, "InvalidStateError", {
165
165
  return _errors.InvalidStateError;
166
166
  }
167
167
  });
168
- Object.defineProperty(exports, "LockScreenInfo", {
168
+ Object.defineProperty(exports, "NotSupportedError", {
169
169
  enumerable: true,
170
170
  get: function () {
171
- return _types2.LockScreenInfo;
171
+ return _errors.NotSupportedError;
172
172
  }
173
173
  });
174
- Object.defineProperty(exports, "MediaState", {
174
+ Object.defineProperty(exports, "NotificationManager", {
175
175
  enumerable: true,
176
176
  get: function () {
177
- return _types2.MediaState;
178
- }
179
- });
180
- Object.defineProperty(exports, "NotSupportedError", {
181
- enumerable: true,
182
- get: function () {
183
- return _errors.NotSupportedError;
177
+ return _notification.NotificationManager;
184
178
  }
185
179
  });
186
180
  Object.defineProperty(exports, "OfflineAudioContext", {
@@ -213,6 +207,30 @@ Object.defineProperty(exports, "PermissionStatus", {
213
207
  return _types2.PermissionStatus;
214
208
  }
215
209
  });
210
+ Object.defineProperty(exports, "PlaybackControlName", {
211
+ enumerable: true,
212
+ get: function () {
213
+ return _notification.PlaybackControlName;
214
+ }
215
+ });
216
+ Object.defineProperty(exports, "PlaybackNotificationEventName", {
217
+ enumerable: true,
218
+ get: function () {
219
+ return _notification.PlaybackNotificationEventName;
220
+ }
221
+ });
222
+ Object.defineProperty(exports, "PlaybackNotificationInfo", {
223
+ enumerable: true,
224
+ get: function () {
225
+ return _notification.PlaybackNotificationInfo;
226
+ }
227
+ });
228
+ Object.defineProperty(exports, "PlaybackNotificationManager", {
229
+ enumerable: true,
230
+ get: function () {
231
+ return _notification.PlaybackNotificationManager;
232
+ }
233
+ });
216
234
  Object.defineProperty(exports, "RangeError", {
217
235
  enumerable: true,
218
236
  get: function () {
@@ -225,12 +243,42 @@ Object.defineProperty(exports, "RecorderAdapterNode", {
225
243
  return _RecorderAdapterNode.default;
226
244
  }
227
245
  });
246
+ Object.defineProperty(exports, "RecordingControlName", {
247
+ enumerable: true,
248
+ get: function () {
249
+ return _notification.RecordingControlName;
250
+ }
251
+ });
252
+ Object.defineProperty(exports, "RecordingNotificationEventName", {
253
+ enumerable: true,
254
+ get: function () {
255
+ return _notification.RecordingNotificationEventName;
256
+ }
257
+ });
258
+ Object.defineProperty(exports, "RecordingNotificationInfo", {
259
+ enumerable: true,
260
+ get: function () {
261
+ return _notification.RecordingNotificationInfo;
262
+ }
263
+ });
264
+ Object.defineProperty(exports, "RecordingNotificationManager", {
265
+ enumerable: true,
266
+ get: function () {
267
+ return _notification.RecordingNotificationManager;
268
+ }
269
+ });
228
270
  Object.defineProperty(exports, "SessionOptions", {
229
271
  enumerable: true,
230
272
  get: function () {
231
273
  return _types2.SessionOptions;
232
274
  }
233
275
  });
276
+ Object.defineProperty(exports, "SimpleNotificationOptions", {
277
+ enumerable: true,
278
+ get: function () {
279
+ return _notification.SimpleNotificationOptions;
280
+ }
281
+ });
234
282
  Object.defineProperty(exports, "StereoPannerNode", {
235
283
  enumerable: true,
236
284
  get: function () {
@@ -319,6 +367,7 @@ var _WorkletProcessingNode = _interopRequireDefault(require("./core/WorkletProce
319
367
  var _WorkletSourceNode = _interopRequireDefault(require("./core/WorkletSourceNode"));
320
368
  var _useSystemVolume = _interopRequireDefault(require("./hooks/useSystemVolume"));
321
369
  var _system = _interopRequireDefault(require("./system"));
370
+ var _notification = require("./system/notification");
322
371
  var _types = require("./types");
323
372
  var _types2 = require("./system/types");
324
373
  var _errors = require("./errors");
@@ -1 +1 @@
1
- {"version":3,"names":["require","_AnalyserNode","_interopRequireDefault","_AudioBuffer","_AudioBufferQueueSourceNode","_AudioBufferSourceNode","_AudioContext","_AudioDecoder","_AudioDestinationNode","_AudioNode","_AudioParam","_AudioRecorder","_AudioScheduledSourceNode","_AudioStretcher","_BaseAudioContext","_BiquadFilterNode","_ConstantSourceNode","_ConvolverNode","_GainNode","_OfflineAudioContext","_OscillatorNode","_RecorderAdapterNode","_StereoPannerNode","_StreamerNode","_WorkletNode","_WorkletProcessingNode","_WorkletSourceNode","_useSystemVolume","_system","_types","_types2","_errors","e","__esModule","default"],"sourceRoot":"../../src","sources":["api.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ApB,sBAAA,CAAAF,OAAA;AACA,IAAAuB,aAAA,GAAArB,sBAAA,CAAAF,OAAA;AACA,IAAAwB,YAAA,GAAAtB,sBAAA,CAAAF,OAAA;AACA,IAAAyB,sBAAA,GAAAvB,sBAAA,CAAAF,OAAA;AACA,IAAA0B,kBAAA,GAAAxB,sBAAA,CAAAF,OAAA;AACA,IAAA2B,gBAAA,GAAAzB,sBAAA,CAAAF,OAAA;AACA,IAAA4B,OAAA,GAAA1B,sBAAA,CAAAF,OAAA;AAEA,IAAA6B,MAAA,GAAA7B,OAAA;AAWA,IAAA8B,OAAA,GAAA9B,OAAA;AAUA,IAAA+B,OAAA,GAAA/B,OAAA;AAMkB,SAAAE,uBAAA8B,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
1
+ {"version":3,"names":["require","_AnalyserNode","_interopRequireDefault","_AudioBuffer","_AudioBufferQueueSourceNode","_AudioBufferSourceNode","_AudioContext","_AudioDecoder","_AudioDestinationNode","_AudioNode","_AudioParam","_AudioRecorder","_AudioScheduledSourceNode","_AudioStretcher","_BaseAudioContext","_BiquadFilterNode","_ConstantSourceNode","_ConvolverNode","_GainNode","_OfflineAudioContext","_OscillatorNode","_RecorderAdapterNode","_StereoPannerNode","_StreamerNode","_WorkletNode","_WorkletProcessingNode","_WorkletSourceNode","_useSystemVolume","_system","_notification","_types","_types2","_errors","e","__esModule","default"],"sourceRoot":"../../src","sources":["api.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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GAAAvB,sBAAA,CAAAF,OAAA;AACA,IAAA0B,kBAAA,GAAAxB,sBAAA,CAAAF,OAAA;AACA,IAAA2B,gBAAA,GAAAzB,sBAAA,CAAAF,OAAA;AACA,IAAA4B,OAAA,GAAA1B,sBAAA,CAAAF,OAAA;AAGA,IAAA6B,aAAA,GAAA7B,OAAA;AAKA,IAAA8B,MAAA,GAAA9B,OAAA;AAWA,IAAA+B,OAAA,GAAA/B,OAAA;AAmBA,IAAAgC,OAAA,GAAAhC,OAAA;AAMkB,SAAAE,uBAAA+B,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
@@ -31,9 +31,9 @@ var _exportNames = {
31
31
  IOSMode: true,
32
32
  IOSOption: true,
33
33
  SessionOptions: true,
34
- MediaState: true,
35
- LockScreenInfo: true,
36
34
  PermissionStatus: true,
35
+ PlaybackNotificationManager: true,
36
+ RecordingNotificationManager: true,
37
37
  IndexSizeError: true,
38
38
  InvalidAccessError: true,
39
39
  InvalidStateError: true,
@@ -178,18 +178,6 @@ Object.defineProperty(exports, "InvalidStateError", {
178
178
  return _errors.InvalidStateError;
179
179
  }
180
180
  });
181
- Object.defineProperty(exports, "LockScreenInfo", {
182
- enumerable: true,
183
- get: function () {
184
- return _types2.LockScreenInfo;
185
- }
186
- });
187
- Object.defineProperty(exports, "MediaState", {
188
- enumerable: true,
189
- get: function () {
190
- return _types2.MediaState;
191
- }
192
- });
193
181
  Object.defineProperty(exports, "NotSupportedError", {
194
182
  enumerable: true,
195
183
  get: function () {
@@ -226,12 +214,24 @@ Object.defineProperty(exports, "PermissionStatus", {
226
214
  return _types2.PermissionStatus;
227
215
  }
228
216
  });
217
+ Object.defineProperty(exports, "PlaybackNotificationManager", {
218
+ enumerable: true,
219
+ get: function () {
220
+ return _webSystem.PlaybackNotificationManager;
221
+ }
222
+ });
229
223
  Object.defineProperty(exports, "RangeError", {
230
224
  enumerable: true,
231
225
  get: function () {
232
226
  return _errors.RangeError;
233
227
  }
234
228
  });
229
+ Object.defineProperty(exports, "RecordingNotificationManager", {
230
+ enumerable: true,
231
+ get: function () {
232
+ return _webSystem.RecordingNotificationManager;
233
+ }
234
+ });
235
235
  Object.defineProperty(exports, "SessionOptions", {
236
236
  enumerable: true,
237
237
  get: function () {
@@ -280,6 +280,19 @@ Object.keys(_custom).forEach(function (key) {
280
280
  });
281
281
  var _types = require("./types");
282
282
  var _types2 = require("./system/types");
283
+ var _webSystem = require("./web-system");
284
+ var _types3 = require("./system/notification/types");
285
+ Object.keys(_types3).forEach(function (key) {
286
+ if (key === "default" || key === "__esModule") return;
287
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
288
+ if (key in exports && exports[key] === _types3[key]) return;
289
+ Object.defineProperty(exports, key, {
290
+ enumerable: true,
291
+ get: function () {
292
+ return _types3[key];
293
+ }
294
+ });
295
+ });
283
296
  var _errors = require("./errors");
284
297
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
285
298
  //# sourceMappingURL=api.web.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_AudioBuffer","_interopRequireDefault","require","_AudioBufferSourceNode","_AudioContext","_OfflineAudioContext","_AudioDestinationNode","_AudioNode","_AnalyserNode","_AudioParam","_AudioScheduledSourceNode","_BaseAudioContext","_BiquadFilterNode","_GainNode","_OscillatorNode","_StereoPannerNode","_ConstantSourceNode","_ConvolverNode","_custom","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_types","_types2","_errors","e","__esModule","default"],"sourceRoot":"../../src","sources":["api.web.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AA,WAAAA,CAAA;MAAA,OAAAZ,OAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AAEA,IAAAS,MAAA,GAAA7B,OAAA;AAUA,IAAA8B,OAAA,GAAA9B,OAAA;AAUA,IAAA+B,OAAA,GAAA/B,OAAA;AAMkB,SAAAD,uBAAAiC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
1
+ {"version":3,"names":["_AudioBuffer","_interopRequireDefault","require","_AudioBufferSourceNode","_AudioContext","_OfflineAudioContext","_AudioDestinationNode","_AudioNode","_AnalyserNode","_AudioParam","_AudioScheduledSourceNode","_BaseAudioContext","_BiquadFilterNode","_GainNode","_OscillatorNode","_StereoPannerNode","_ConstantSourceNode","_ConvolverNode","_custom","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_types","_types2","_webSystem","_types3","_errors","e","__esModule","default"],"sourceRoot":"../../src","sources":["api.web.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,aAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,oBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,qBAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,UAAA,GAAAN,sBAAA,CAAAC,OAAA;A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AAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAY,OAAA,CAAAZ,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAI,OAAA,CAAAZ,GAAA;IAAA;EAAA;AAAA;AAEA,IAAAa,OAAA,GAAAjC,OAAA;AAMkB,SAAAD,uBAAAmC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["Object","defineProperty","exports","value","NativeAudioAPIModule","_reactNative","require","TurboModuleRegistry","get"],"sourceRoot":"../../../src","sources":["specs/NativeAudioAPIModule.ts"],"mappings":"AAAA,YAAY;;AAACA,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,KAAA;AAAA;AAAAD,OAAA,CAAAE,oBAAA;AACb,IAAAC,YAAA,GAAAC,OAAA;AAsCA,MAAMF,oBAAoB,GAAAF,OAAA,CAAAE,oBAAA,GAAGG,gCAAmB,CAACC,GAAG,CAAO,gBAAgB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["Object","defineProperty","exports","value","NativeAudioAPIModule","_reactNative","require","TurboModuleRegistry","get"],"sourceRoot":"../../../src","sources":["specs/NativeAudioAPIModule.ts"],"mappings":"AAAA,YAAY;;AAACA,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,KAAA;AAAA;AAAAD,OAAA,CAAAE,oBAAA;AACb,IAAAC,YAAA,GAAAC,OAAA;AAsDA,MAAMF,oBAAoB,GAAAF,OAAA,CAAAE,oBAAA,GAAGG,gCAAmB,CAACC,GAAG,CAAO,gBAAgB,CAAC","ignoreList":[]}
@@ -22,12 +22,6 @@ class AudioManager {
22
22
  disableSessionManagement() {
23
23
  _specs.NativeAudioAPIModule.disableSessionManagement();
24
24
  }
25
- setLockScreenInfo(info) {
26
- _specs.NativeAudioAPIModule.setLockScreenInfo(info);
27
- }
28
- resetLockScreenInfo() {
29
- _specs.NativeAudioAPIModule.resetLockScreenInfo();
30
- }
31
25
  observeAudioInterruptions(enabled) {
32
26
  _specs.NativeAudioAPIModule.observeAudioInterruptions(enabled);
33
27
  }
@@ -51,9 +45,6 @@ class AudioManager {
51
45
  observeVolumeChanges(enabled) {
52
46
  _specs.NativeAudioAPIModule.observeVolumeChanges(enabled);
53
47
  }
54
- enableRemoteCommand(name, enabled) {
55
- _specs.NativeAudioAPIModule.enableRemoteCommand(name, enabled);
56
- }
57
48
  addSystemEventListener(name, callback) {
58
49
  return this.audioEventEmitter.addAudioEventListener(name, callback);
59
50
  }
@@ -63,6 +54,12 @@ class AudioManager {
63
54
  async checkRecordingPermissions() {
64
55
  return _specs.NativeAudioAPIModule.checkRecordingPermissions();
65
56
  }
57
+ async requestNotificationPermissions() {
58
+ return _specs.NativeAudioAPIModule.requestNotificationPermissions();
59
+ }
60
+ async checkNotificationPermissions() {
61
+ return _specs.NativeAudioAPIModule.checkNotificationPermissions();
62
+ }
66
63
  async getDevicesInfo() {
67
64
  return _specs.NativeAudioAPIModule.getDevicesInfo();
68
65
  }