react-native-audio-api 0.11.0-nightly-db51488-20251207 → 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 @@
1
+ {"version":3,"names":["default","PlaybackNotificationManager","RecordingNotificationManager","SimpleNotificationManager"],"sourceRoot":"../../../../src","sources":["system/notification/index.ts"],"mappings":";;AAAA,SAASA,OAAO,IAAIC,2BAA2B,QAAQ,kCAA+B;AACtF,SAASD,OAAO,IAAIE,4BAA4B,QAAQ,mCAAgC;AACxF,SAASF,OAAO,IAAIG,yBAAyB,QAAQ,gCAA6B;AAClF,cAAc,YAAS","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["system/notification/types.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export * from "./notification/index.js";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["web-system/index.ts"],"mappings":";;AAAA,cAAc,yBAAgB","ignoreList":[]}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ /* eslint-disable @typescript-eslint/no-unused-vars */
4
+ /* eslint-disable no-useless-constructor */
5
+ /* eslint-disable @typescript-eslint/require-await */
6
+
7
+ /// Mock Manager for playback notifications. Does nothing.
8
+ class PlaybackNotificationManager {
9
+ isRegistered = false;
10
+ isShown = false;
11
+ constructor() {}
12
+ async register() {}
13
+ async show(info) {}
14
+ async update(info) {}
15
+ async hide() {}
16
+ async unregister() {}
17
+ async enableControl(control, enabled) {}
18
+ async isActive() {
19
+ return this.isShown;
20
+ }
21
+ addEventListener(eventName, callback) {
22
+ // dummy subscription object with a no-op remove method
23
+ return {
24
+ remove: () => {}
25
+ };
26
+ }
27
+ removeEventListener(subscription) {}
28
+ }
29
+ export default new PlaybackNotificationManager();
30
+ //# sourceMappingURL=PlaybackNotificationManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["PlaybackNotificationManager","isRegistered","isShown","constructor","register","show","info","update","hide","unregister","enableControl","control","enabled","isActive","addEventListener","eventName","callback","remove","removeEventListener","subscription"],"sourceRoot":"../../../../src","sources":["web-system/notification/PlaybackNotificationManager.ts"],"mappings":";;AAAA;AACA;AACA;;AAWA;AACA,MAAMA,2BAA2B,CAOjC;EACUC,YAAY,GAAG,KAAK;EACpBC,OAAO,GAAG,KAAK;EAEvBC,WAAWA,CAAA,EAAG,CAAC;EAEf,MAAMC,QAAQA,CAAA,EAAkB,CAAC;EAEjC,MAAMC,IAAIA,CAACC,IAA8B,EAAiB,CAAC;EAE3D,MAAMC,MAAMA,CAACD,IAA8B,EAAiB,CAAC;EAE7D,MAAME,IAAIA,CAAA,EAAkB,CAAC;EAE7B,MAAMC,UAAUA,CAAA,EAAkB,CAAC;EAEnC,MAAMC,aAAaA,CACjBC,OAA4B,EAC5BC,OAAgB,EACD,CAAC;EAElB,MAAMC,QAAQA,CAAA,EAAqB;IACjC,OAAO,IAAI,CAACX,OAAO;EACrB;EAEAY,gBAAgBA,CACdC,SAAY,EACZC,QAAgD,EACxB;IACxB;IACA,OAAO;MACLC,MAAM,EAAEA,CAAA,KAAM,CAAC;IACjB,CAAC;EACH;EAEAC,mBAAmBA,CAACC,YAAoC,EAAQ,CAAC;AACnE;AAEA,eAAe,IAAInB,2BAA2B,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ /* eslint-disable @typescript-eslint/no-unused-vars */
4
+ /* eslint-disable no-useless-constructor */
5
+ /* eslint-disable @typescript-eslint/require-await */
6
+
7
+ /// Mock Manager for recording notifications. Does nothing.
8
+ class RecordingNotificationManager {
9
+ isRegistered = false;
10
+ isShown = false;
11
+ constructor() {}
12
+ async register() {}
13
+ async show(info) {}
14
+ async update(info) {}
15
+ async hide() {}
16
+ async unregister() {}
17
+ async enableControl(control, enabled) {}
18
+ async isActive() {
19
+ return this.isShown;
20
+ }
21
+ addEventListener(eventName, callback) {
22
+ // dummy subscription object with a no-op remove method
23
+ return {
24
+ remove: () => {}
25
+ };
26
+ }
27
+ removeEventListener(subscription) {}
28
+ }
29
+ export default new RecordingNotificationManager();
30
+ //# sourceMappingURL=RecordingNotificationManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["RecordingNotificationManager","isRegistered","isShown","constructor","register","show","info","update","hide","unregister","enableControl","control","enabled","isActive","addEventListener","eventName","callback","remove","removeEventListener","subscription"],"sourceRoot":"../../../../src","sources":["web-system/notification/RecordingNotificationManager.ts"],"mappings":";;AAAA;AACA;AACA;;AAWA;AACA,MAAMA,4BAA4B,CAOlC;EACUC,YAAY,GAAG,KAAK;EACpBC,OAAO,GAAG,KAAK;EAEvBC,WAAWA,CAAA,EAAG,CAAC;EAEf,MAAMC,QAAQA,CAAA,EAAkB,CAAC;EAEjC,MAAMC,IAAIA,CAACC,IAA+B,EAAiB,CAAC;EAE5D,MAAMC,MAAMA,CAACD,IAA+B,EAAiB,CAAC;EAE9D,MAAME,IAAIA,CAAA,EAAkB,CAAC;EAE7B,MAAMC,UAAUA,CAAA,EAAkB,CAAC;EAEnC,MAAMC,aAAaA,CACjBC,OAA6B,EAC7BC,OAAgB,EACD,CAAC;EAElB,MAAMC,QAAQA,CAAA,EAAqB;IACjC,OAAO,IAAI,CAACX,OAAO;EACrB;EAEAY,gBAAgBA,CACdC,SAAY,EACZC,QAAgD,EACxB;IACxB;IACA,OAAO;MACLC,MAAM,EAAEA,CAAA,KAAM,CAAC;IACjB,CAAC;EACH;EAEAC,mBAAmBA,CAACC,YAAoC,EAAQ,CAAC;AACnE;AAEA,eAAe,IAAInB,4BAA4B,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ export { default as PlaybackNotificationManager } from "./PlaybackNotificationManager.js";
4
+ export { default as RecordingNotificationManager } from "./RecordingNotificationManager.js";
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["default","PlaybackNotificationManager","RecordingNotificationManager"],"sourceRoot":"../../../../src","sources":["web-system/notification/index.ts"],"mappings":";;AAAA,SAASA,OAAO,IAAIC,2BAA2B,QAAQ,kCAA+B;AACtF,SAASD,OAAO,IAAIE,4BAA4B,QAAQ,mCAAgC","ignoreList":[]}
@@ -26,7 +26,9 @@ export { default as WorkletProcessingNode } from './core/WorkletProcessingNode';
26
26
  export { default as WorkletSourceNode } from './core/WorkletSourceNode';
27
27
  export { default as useSystemVolume } from './hooks/useSystemVolume';
28
28
  export { default as AudioManager } from './system';
29
+ export { PlaybackNotificationManager, RecordingNotificationManager, } from './system/notification';
29
30
  export { AudioWorkletRuntime, BiquadFilterType, ChannelCountMode, ChannelInterpretation, ContextState, OscillatorType, PeriodicWaveConstraints, WindowType, } from './types';
30
- export { IOSCategory, IOSMode, IOSOption, LockScreenInfo, MediaState, PermissionStatus, SessionOptions, } from './system/types';
31
+ export { IOSCategory, IOSMode, IOSOption, PermissionStatus, SessionOptions, } from './system/types';
32
+ export { NotificationManager, PlaybackNotificationInfo, PlaybackControlName, PlaybackNotificationEventName, RecordingNotificationInfo, RecordingControlName, RecordingNotificationEventName, SimpleNotificationOptions, } from './system/notification';
31
33
  export { IndexSizeError, InvalidAccessError, InvalidStateError, NotSupportedError, RangeError, } from './errors';
32
34
  //# sourceMappingURL=api.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAC1F,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAChF,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AACtF,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,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AAgB,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAChF,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,UAAU,CAAC;AAGnD,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,GAC7B,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,EACrB,YAAY,EACZ,cAAc,EACd,uBAAuB,EACvB,UAAU,GACX,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,WAAW,EACX,OAAO,EACP,SAAS,EACT,gBAAgB,EAChB,cAAc,GACf,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,6BAA6B,EAC7B,yBAAyB,EACzB,oBAAoB,EACpB,8BAA8B,EAC9B,yBAAyB,GAC1B,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,GACX,MAAM,UAAU,CAAC"}
@@ -16,6 +16,8 @@ export { default as ConstantSourceNode } from './web-core/ConstantSourceNode';
16
16
  export { default as ConvolverNode } from './web-core/ConvolverNode';
17
17
  export * from './web-core/custom';
18
18
  export { OscillatorType, BiquadFilterType, ChannelCountMode, ChannelInterpretation, ContextState, WindowType, PeriodicWaveConstraints, } from './types';
19
- export { IOSCategory, IOSMode, IOSOption, SessionOptions, MediaState, LockScreenInfo, PermissionStatus, } from './system/types';
19
+ export { IOSCategory, IOSMode, IOSOption, SessionOptions, PermissionStatus, } from './system/types';
20
+ export { PlaybackNotificationManager, RecordingNotificationManager, } from './web-system';
21
+ export * from './system/notification/types';
20
22
  export { IndexSizeError, InvalidAccessError, InvalidStateError, RangeError, NotSupportedError, } from './errors';
21
23
  //# sourceMappingURL=api.web.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api.web.d.ts","sourceRoot":"","sources":["../../src/api.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAC1F,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC1E,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O,IAAI,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEpE,cAAc,mBAAmB,CAAC;AAElC,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,EACrB,YAAY,EACZ,UAAU,EACV,uBAAuB,GACxB,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,WAAW,EACX,OAAO,EACP,SAAS,EACT,cAAc,EACd,gBAAgB,GACjB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,GAC7B,MAAM,cAAc,CAAC;AAEtB,cAAc,6BAA6B,CAAC;AAE5C,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,UAAU,EACV,iBAAiB,GAClB,MAAM,UAAU,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import AudioBuffer from '../core/AudioBuffer';
2
+ import { NotificationEvents } from '../system';
2
3
  export interface EventEmptyType {
3
4
  }
4
5
  export interface EventTypeWithValue {
@@ -6,26 +7,12 @@ export interface EventTypeWithValue {
6
7
  }
7
8
  interface OnInterruptionEventType {
8
9
  type: 'ended' | 'began';
9
- shouldResume: boolean;
10
+ isTransient: boolean;
10
11
  }
11
12
  interface OnRouteChangeEventType {
12
13
  reason: 'Unknown' | 'Override' | 'CategoryChange' | 'WakeFromSleep' | 'NewDeviceAvailable' | 'OldDeviceUnavailable' | 'ConfigurationChange' | 'NoSuitableRouteForCategory';
13
14
  }
14
- interface RemoteCommandEvents {
15
- remotePlay: EventEmptyType;
16
- remotePause: EventEmptyType;
17
- remoteStop: EventEmptyType;
18
- remoteTogglePlayPause: EventEmptyType;
19
- remoteChangePlaybackRate: EventTypeWithValue;
20
- remoteNextTrack: EventEmptyType;
21
- remotePreviousTrack: EventEmptyType;
22
- remoteSkipForward: EventTypeWithValue;
23
- remoteSkipBackward: EventTypeWithValue;
24
- remoteSeekForward: EventEmptyType;
25
- remoteSeekBackward: EventEmptyType;
26
- remoteChangePlaybackPosition: EventTypeWithValue;
27
- }
28
- type SystemEvents = RemoteCommandEvents & {
15
+ type SystemEvents = {
29
16
  volumeChange: EventTypeWithValue;
30
17
  interruption: OnInterruptionEventType;
31
18
  routeChange: OnRouteChangeEventType;
@@ -47,8 +34,7 @@ interface AudioAPIEvents {
47
34
  audioError: EventEmptyType;
48
35
  systemStateChanged: EventEmptyType;
49
36
  }
50
- type AudioEvents = SystemEvents & AudioAPIEvents;
51
- export type RemoteCommandEventName = keyof RemoteCommandEvents;
37
+ type AudioEvents = SystemEvents & AudioAPIEvents & NotificationEvents;
52
38
  export type SystemEventName = keyof SystemEvents;
53
39
  export type SystemEventCallback<Name extends SystemEventName> = (event: SystemEvents[Name]) => void;
54
40
  export type AudioAPIEventName = keyof AudioAPIEvents;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/events/types.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,qBAAqB,CAAC;AAE9C,MAAM,WAAW,cAAc;CAAG;AAElC,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,uBAAuB;IAC/B,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC;IACxB,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,UAAU,sBAAsB;IAC9B,MAAM,EACF,SAAS,GACT,UAAU,GACV,gBAAgB,GAChB,eAAe,GACf,oBAAoB,GACpB,sBAAsB,GACtB,qBAAqB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ACpC,MAAM,EAAE,WAAW,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,UAAU,cAAc;IACtB,KAAK,EAAE,gBAAgB,CAAC;IACxB,SAAS,EAAE,cAAc,CAAC;IAC1B,UAAU,EAAE,qBAAqB,CAAC;IAClC,eAAe,EAAE,kBAAkB,CAAC;IACpC,UAAU,EAAE,cAAc,CAAC;IAC3B,kBAAkB,EAAE,cAAc,CAAC;CACpC;AAED,KAAK,WAAW,GAAG,YAAY,GAAG,cAAc,GAAG,kBAAkB,CAAC;AAEtE,MAAM,MAAM,eAAe,GAAG,MAAM,YAAY,CAAC;AACjD,MAAM,MAAM,mBAAmB,CAAC,IAAI,SAAS,eAAe,IAAI,CAC9D,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,KACtB,IAAI,CAAC;AAEV,MAAM,MAAM,iBAAiB,GAAG,MAAM,cAAc,CAAC;AACrD,MAAM,MAAM,qBAAqB,CAAC,IAAI,SAAS,iBAAiB,IAAI,CAClE,KAAK,EAAE,cAAc,CAAC,IAAI,CAAC,KACxB,IAAI,CAAC;AAEV,MAAM,MAAM,cAAc,GAAG,MAAM,WAAW,CAAC;AAC/C,MAAM,MAAM,kBAAkB,CAAC,IAAI,SAAS,cAAc,IAAI,CAC5D,KAAK,EAAE,WAAW,CAAC,IAAI,CAAC,KACrB,IAAI,CAAC"}
@@ -1,22 +1,33 @@
1
1
  import type { TurboModule } from 'react-native';
2
2
  import { PermissionStatus, AudioDevicesInfo } from '../system/types';
3
+ type OptionsMap = {
4
+ [key: string]: string | boolean | number | undefined;
5
+ };
6
+ type NotificationOpResponse = {
7
+ success: boolean;
8
+ error?: string;
9
+ };
10
+ type NotificationType = 'playback' | 'recording' | 'simple';
3
11
  interface Spec extends TurboModule {
4
12
  install(): boolean;
5
13
  getDevicePreferredSampleRate(): number;
6
14
  setAudioSessionActivity(enabled: boolean): Promise<boolean>;
7
15
  setAudioSessionOptions(category: string, mode: string, options: Array<string>, allowHaptics: boolean): void;
8
16
  disableSessionManagement(): void;
9
- setLockScreenInfo(info: {
10
- [key: string]: string | boolean | number | undefined;
11
- }): void;
12
- resetLockScreenInfo(): void;
13
- enableRemoteCommand(name: string, enabled: boolean): void;
14
17
  observeAudioInterruptions(enabled: boolean): void;
15
18
  activelyReclaimSession(enabled: boolean): void;
16
19
  observeVolumeChanges(enabled: boolean): void;
17
20
  requestRecordingPermissions(): Promise<PermissionStatus>;
18
21
  checkRecordingPermissions(): Promise<PermissionStatus>;
22
+ requestNotificationPermissions(): Promise<PermissionStatus>;
23
+ checkNotificationPermissions(): Promise<PermissionStatus>;
19
24
  getDevicesInfo(): Promise<AudioDevicesInfo>;
25
+ registerNotification(type: NotificationType, key: string): Promise<NotificationOpResponse>;
26
+ showNotification(key: string, options: OptionsMap): Promise<NotificationOpResponse>;
27
+ updateNotification(key: string, options: OptionsMap): Promise<NotificationOpResponse>;
28
+ hideNotification(key: string): Promise<NotificationOpResponse>;
29
+ unregisterNotification(key: string): Promise<NotificationOpResponse>;
30
+ isNotificationActive(key: string): Promise<boolean>;
20
31
  }
21
32
  declare const NativeAudioAPIModule: Spec | null;
22
33
  export { NativeAudioAPIModule };
@@ -1 +1 @@
1
- {"version":3,"file":"NativeAudioAPIModule.d.ts","sourceRoot":"","sources":["../../../src/specs/NativeAudioAPIModule.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAErE,UAAU,IAAK,SAAQ,WAAW;IAChC,OAAO,IAAI,OAAO,CAAC;IACnB,4BAA4B,IAAI,MAAM,CAAC;IAGvC,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC5D,sBAAsB,CACpB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,OAA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AAsB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;IACrE,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACrD;AAED,QAAA,MAAM,oBAAoB,aAAkD,CAAC;AAE7E,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
@@ -1,6 +1,6 @@
1
+ import { SessionOptions, PermissionStatus, AudioDevicesInfo } from './types';
2
+ import { SystemEventName, SystemEventCallback } from '../events/types';
1
3
  import { AudioEventSubscription } from '../events';
2
- import { RemoteCommandEventName, SystemEventCallback, SystemEventName } from '../events/types';
3
- import { AudioDevicesInfo, LockScreenInfo, PermissionStatus, SessionOptions } from './types';
4
4
  declare class AudioManager {
5
5
  private readonly audioEventEmitter;
6
6
  constructor();
@@ -8,8 +8,6 @@ declare class AudioManager {
8
8
  setAudioSessionActivity(enabled: boolean): Promise<boolean>;
9
9
  setAudioSessionOptions(options: SessionOptions): void;
10
10
  disableSessionManagement(): void;
11
- setLockScreenInfo(info: LockScreenInfo): void;
12
- resetLockScreenInfo(): void;
13
11
  observeAudioInterruptions(enabled: boolean): void;
14
12
  /**
15
13
  * @param enabled - Whether to actively reclaim the session or not
@@ -26,10 +24,11 @@ declare class AudioManager {
26
24
  */
27
25
  activelyReclaimSession(enabled: boolean): void;
28
26
  observeVolumeChanges(enabled: boolean): void;
29
- enableRemoteCommand(name: RemoteCommandEventName, enabled: boolean): void;
30
27
  addSystemEventListener<Name extends SystemEventName>(name: Name, callback: SystemEventCallback<Name>): AudioEventSubscription;
31
28
  requestRecordingPermissions(): Promise<PermissionStatus>;
32
29
  checkRecordingPermissions(): Promise<PermissionStatus>;
30
+ requestNotificationPermissions(): Promise<PermissionStatus>;
31
+ checkNotificationPermissions(): Promise<PermissionStatus>;
33
32
  getDevicesInfo(): Promise<AudioDevicesInfo>;
34
33
  }
35
34
  declare const _default: AudioManager;
@@ -1 +1 @@
1
- {"version":3,"file":"AudioManager.d.ts","sourceRoot":"","sources":["../../../src/system/AudioManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACtE,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,eAAe,EAChB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACf,MAAM,SAAS,CAAC;AAEjB,cAAM,YAAY;IAChB,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAoB;;IAKtD,4BAA4B,IAAI,MAAM;IAItC,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAI3D,sBAAsB,CAAC,OAAO,EAAE,cAAc;IAS9C,wBAAwB;IAIxB,iBAAiB,CAAC,IAAI,EAAE,cAAc;IAItC,mBAAmB;IAInB,yBAAyB,CAAC,OAAO,EAAE,OAAO;IAI1C;;;;;;;;;;;;OAYG;IACH,sBAAsB,CAAC,OAAO,EAAE,OAAO;IAIvC,oBAAoB,CAAC,OAAO,EAAE,OAAO;IAIrC,mBAAmB,CAAC,IAAI,EAAE,sBAAsB,EAAE,OAAO,EAAE,OAAO;IAIlE,sBAAsB,CAAC,IAAI,SAAS,eAAe,EACjD,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,mBAAmB,CAAC,IAAI,CAAC,GAClC,sBAAsB;IAInB,2BAA2B,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAIxD,yBAAyB,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAItD,cAAc,IAAI,OAAO,CAAC,gBAAgB,CAAC;CAGlD;;AAED,wBAAkC"}
1
+ {"version":3,"file":"AudioManager.d.ts","sourceRoot":"","sources":["../../../src/system/AudioManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAAqB,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAGtE,cAAM,YAAY;IAChB,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAoB;;IAKtD,4BAA4B,IAAI,MAAM;IAItC,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAI3D,sBAAsB,CAAC,OAAO,EAAE,cAAc;IAS9C,wBAAwB;IAIxB,yBAAyB,CAAC,OAAO,EAAE,OAAO;IAI1C;;;;;;;;;;;;OAYG;IACH,sBAAsB,CAAC,OAAO,EAAE,OAAO;IAIvC,oBAAoB,CAAC,OAAO,EAAE,OAAO;IAIrC,sBAAsB,CAAC,IAAI,SAAS,eAAe,EACjD,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,mBAAmB,CAAC,IAAI,CAAC,GAClC,sBAAsB;IAInB,2BAA2B,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAIxD,yBAAyB,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAItD,8BAA8B,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAI3D,4BAA4B,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAIzD,cAAc,IAAI,OAAO,CAAC,gBAAgB,CAAC;CAGlD;;AAED,wBAAkC"}
@@ -1,2 +1,3 @@
1
1
  export { default } from './AudioManager';
2
+ export * from './notification';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/system/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/system/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { AudioEventSubscription } from '../../events';
2
+ import type { NotificationManager, PlaybackNotificationInfo, PlaybackControlName, PlaybackNotificationEventName, NotificationEvents } from './types';
3
+ declare class PlaybackNotificationManager implements NotificationManager<PlaybackNotificationInfo, PlaybackNotificationInfo, PlaybackNotificationEventName> {
4
+ private notificationKey;
5
+ private isRegistered;
6
+ private isShown;
7
+ private audioEventEmitter;
8
+ constructor();
9
+ register(): Promise<void>;
10
+ show(info: PlaybackNotificationInfo): Promise<void>;
11
+ update(info: PlaybackNotificationInfo): Promise<void>;
12
+ hide(): Promise<void>;
13
+ unregister(): Promise<void>;
14
+ enableControl(control: PlaybackControlName, enabled: boolean): Promise<void>;
15
+ isActive(): Promise<boolean>;
16
+ addEventListener<T extends PlaybackNotificationEventName>(eventName: T, callback: (event: NotificationEvents[T]) => void): AudioEventSubscription;
17
+ /** Remove an event listener. */
18
+ removeEventListener(subscription: AudioEventSubscription): void;
19
+ }
20
+ declare const _default: PlaybackNotificationManager;
21
+ export default _default;
22
+ //# sourceMappingURL=PlaybackNotificationManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PlaybackNotificationManager.d.ts","sourceRoot":"","sources":["../../../../src/system/notification/PlaybackNotificationManager.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,KAAK,EACV,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,6BAA6B,EAC7B,kBAAkB,EACnB,MAAM,SAAS,CAAC;AAGjB,cAAM,2BACJ,YACE,mBAAmB,CACjB,wBAAwB,EACxB,wBAAwB,EACxB,6BAA6B,CAC9B;IAEH,OAAO,CAAC,eAAe,CAAc;IACrC,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,iBAAiB,CAAoB;;IAOvC,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAuBzB,IAAI,CAAC,IAAI,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC;IAwBnD,MAAM,CAAC,IAAI,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC;IAqBrD,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAqBrB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAyB3B,aAAa,CACjB,OAAO,EAAE,mBAAmB,EAC5B,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,IAAI,CAAC;IAsBV,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC;IAWlC,gBAAgB,CAAC,CAAC,SAAS,6BAA6B,EACtD,SAAS,EAAE,CAAC,EACZ,QAAQ,EAAE,CAAC,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC,KAAK,IAAI,GAC/C,sBAAsB;IAIzB,gCAAgC;IAChC,mBAAmB,CAAC,YAAY,EAAE,sBAAsB,GAAG,IAAI;CAGhE;;AAED,wBAAiD"}
@@ -0,0 +1,23 @@
1
+ import { AudioEventSubscription } from '../../events';
2
+ import type { NotificationManager, RecordingNotificationInfo, RecordingControlName, RecordingNotificationEventName, NotificationEvents } from './types';
3
+ declare class RecordingNotificationManager implements NotificationManager<RecordingNotificationInfo, RecordingNotificationInfo, RecordingNotificationEventName> {
4
+ private notificationKey;
5
+ private isRegistered;
6
+ private isShown;
7
+ private audioEventEmitter;
8
+ private isIOS;
9
+ constructor();
10
+ register(): Promise<void>;
11
+ show(info: RecordingNotificationInfo): Promise<void>;
12
+ update(info: RecordingNotificationInfo): Promise<void>;
13
+ hide(): Promise<void>;
14
+ unregister(): Promise<void>;
15
+ enableControl(control: RecordingControlName, enabled: boolean): Promise<void>;
16
+ isActive(): Promise<boolean>;
17
+ addEventListener<T extends RecordingNotificationEventName>(eventName: T, callback: (event: NotificationEvents[T]) => void): AudioEventSubscription;
18
+ /** Remove an event listener. */
19
+ removeEventListener(subscription: AudioEventSubscription): void;
20
+ }
21
+ declare const _default: RecordingNotificationManager;
22
+ export default _default;
23
+ //# sourceMappingURL=RecordingNotificationManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RecordingNotificationManager.d.ts","sourceRoot":"","sources":["../../../../src/system/notification/RecordingNotificationManager.ts"],"names":[],"mappings":"AAEA,OAAO,EAAqB,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,KAAK,EACV,mBAAmB,EACnB,yBAAyB,EACzB,oBAAoB,EACpB,8BAA8B,EAC9B,kBAAkB,EACnB,MAAM,SAAS,CAAC;AAGjB,cAAM,4BACJ,YACE,mBAAmB,CACjB,yBAAyB,EACzB,yBAAyB,EACzB,8BAA8B,CAC/B;IAEH,OAAO,CAAC,eAAe,CAAe;IACtC,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,iBAAiB,CAAoB;IAC7C,OAAO,CAAC,KAAK,CAAyB;;IAOhC,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IA6BzB,IAAI,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC;IA8BpD,MAAM,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC;IA0BtD,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IA2BrB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IA+B3B,aAAa,CACjB,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,IAAI,CAAC;IA2BV,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC;IAgBlC,gBAAgB,CAAC,CAAC,SAAS,8BAA8B,EACvD,SAAS,EAAE,CAAC,EACZ,QAAQ,EAAE,CAAC,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC,KAAK,IAAI,GAC/C,sBAAsB;IAYzB,gCAAgC;IAChC,mBAAmB,CAAC,YAAY,EAAE,sBAAsB,GAAG,IAAI;CAGhE;;AAED,wBAAkD"}
@@ -0,0 +1,20 @@
1
+ import { AudioEventSubscription } from '../../events';
2
+ import type { NotificationManager, SimpleNotificationOptions } from './types';
3
+ declare class SimpleNotificationManager implements NotificationManager<SimpleNotificationOptions, SimpleNotificationOptions, never> {
4
+ private notificationKey;
5
+ private isRegistered;
6
+ private isShown;
7
+ private audioEventEmitter;
8
+ constructor();
9
+ register(): Promise<void>;
10
+ show(options: SimpleNotificationOptions): Promise<void>;
11
+ update(options: SimpleNotificationOptions): Promise<void>;
12
+ hide(): Promise<void>;
13
+ unregister(): Promise<void>;
14
+ isActive(): Promise<boolean>;
15
+ addEventListener<T extends never>(_eventName: T, _callback: (event: never) => void): AudioEventSubscription;
16
+ removeEventListener(subscription: AudioEventSubscription): void;
17
+ }
18
+ declare const _default: SimpleNotificationManager;
19
+ export default _default;
20
+ //# sourceMappingURL=SimpleNotificationManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SimpleNotificationManager.d.ts","sourceRoot":"","sources":["../../../../src/system/notification/SimpleNotificationManager.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAK9E,cAAM,yBACJ,YACE,mBAAmB,CACjB,yBAAyB,EACzB,yBAAyB,EACzB,KAAK,CACN;IAEH,OAAO,CAAC,eAAe,CAAY;IACnC,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,iBAAiB,CAAoB;;IAOvC,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAuBzB,IAAI,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC;IAwBvD,MAAM,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC;IAqBzD,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAqBrB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAyB3B,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC;IAWlC,gBAAgB,CAAC,CAAC,SAAS,KAAK,EAC9B,UAAU,EAAE,CAAC,EACb,SAAS,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAChC,sBAAsB;IAWzB,mBAAmB,CAAC,YAAY,EAAE,sBAAsB,GAAG,IAAI;CAGhE;;AAED,wBAA+C"}
@@ -0,0 +1,5 @@
1
+ export { default as PlaybackNotificationManager } from './PlaybackNotificationManager';
2
+ export { default as RecordingNotificationManager } from './RecordingNotificationManager';
3
+ export { default as SimpleNotificationManager } from './SimpleNotificationManager';
4
+ export * from './types';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/system/notification/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACnF,cAAc,SAAS,CAAC"}
@@ -0,0 +1,65 @@
1
+ import type { AudioEventSubscription } from '../../events';
2
+ import { EventEmptyType, EventTypeWithValue } from '../../events/types';
3
+ export interface NotificationManager<TShowOptions, TUpdateOptions, TEventName extends NotificationEventName> {
4
+ register(): Promise<void>;
5
+ show(options: TShowOptions): Promise<void>;
6
+ update(options: TUpdateOptions): Promise<void>;
7
+ hide(): Promise<void>;
8
+ unregister(): Promise<void>;
9
+ isActive(): Promise<boolean>;
10
+ addEventListener<T extends TEventName>(eventName: T, callback: NotificationCallback<T>): AudioEventSubscription;
11
+ removeEventListener(subscription: AudioEventSubscription): void;
12
+ }
13
+ export interface PlaybackNotificationInfo {
14
+ title?: string;
15
+ artist?: string;
16
+ album?: string;
17
+ artwork?: string | {
18
+ uri: string;
19
+ };
20
+ androidSmallIcon?: string | {
21
+ uri: string;
22
+ };
23
+ duration?: number;
24
+ elapsedTime?: number;
25
+ speed?: number;
26
+ state?: 'playing' | 'paused';
27
+ }
28
+ export type PlaybackControlName = 'play' | 'pause' | 'next' | 'previous' | 'skipForward' | 'skipBackward' | 'seekTo';
29
+ interface PlaybackNotificationEvent {
30
+ playbackNotificationPlay: EventEmptyType;
31
+ playbackNotificationPause: EventEmptyType;
32
+ playbackNotificationNext: EventEmptyType;
33
+ playbackNotificationPrevious: EventEmptyType;
34
+ playbackNotificationSkipForward: EventTypeWithValue;
35
+ playbackNotificationSkipBackward: EventTypeWithValue;
36
+ playbackNotificationSeekTo: EventTypeWithValue;
37
+ playbackNotificationDismissed: EventEmptyType;
38
+ }
39
+ export type PlaybackNotificationEventName = keyof PlaybackNotificationEvent;
40
+ export interface RecordingNotificationInfo {
41
+ title?: string;
42
+ description?: string;
43
+ artwork?: string | {
44
+ uri: string;
45
+ };
46
+ state?: 'recording' | 'stopped';
47
+ control?: RecordingControlName;
48
+ enabled?: boolean;
49
+ }
50
+ export type RecordingControlName = 'start' | 'stop';
51
+ interface RecordingNotificationEvent {
52
+ recordingNotificationStart: EventEmptyType;
53
+ recordingNotificationStop: EventEmptyType;
54
+ recordingNotificationDismissed: EventEmptyType;
55
+ }
56
+ export type RecordingNotificationEventName = keyof RecordingNotificationEvent;
57
+ export type NotificationEvents = PlaybackNotificationEvent & RecordingNotificationEvent;
58
+ export type NotificationEventName = keyof NotificationEvents;
59
+ export type NotificationCallback<Name extends NotificationEventName> = (event: NotificationEvents[Name]) => void;
60
+ export interface SimpleNotificationOptions {
61
+ title?: string;
62
+ text?: string;
63
+ }
64
+ export {};
65
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/system/notification/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,C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I,CAAC,EAAE,MAAM,CAAC;CACf"}
@@ -7,21 +7,6 @@ export interface SessionOptions {
7
7
  iosCategory?: IOSCategory;
8
8
  iosAllowHaptics?: boolean;
9
9
  }
10
- export type MediaState = 'state_playing' | 'state_paused';
11
- interface BaseLockScreenInfo {
12
- [key: string]: string | boolean | number | undefined;
13
- }
14
- export interface LockScreenInfo extends BaseLockScreenInfo {
15
- title?: string;
16
- artwork?: string;
17
- artist?: string;
18
- album?: string;
19
- duration?: number;
20
- description?: string;
21
- state?: MediaState;
22
- speed?: number;
23
- elapsedTime?: number;
24
- }
25
10
  export type PermissionStatus = 'Undetermined' | 'Denied' | 'Granted';
26
11
  export interface AudioDeviceInfo {
27
12
  name: string;
@@ -34,5 +19,4 @@ export interface AudioDevicesInfo {
34
19
  currentInputs: AudioDeviceList;
35
20
  currentOutputs: AudioDeviceList;
36
21
  }
37
- export {};
38
22
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/system/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GACnB,QAAQ,GACR,SAAS,GACT,UAAU,GACV,YAAY,GACZ,aAAa,GACb,eAAe,CAAC;AAEpB,MAAM,MAAM,OAAO,GACf,SAAS,GACT,UAAU,GACV,WAAW,GACX,WAAW,GACX,aAAa,GACb,aAAa,GACb,aAAa,GACb,eAAe,GACf,gBAAgB,CAAC;AAErB,MAAM,MAAM,SAAS,GACjB,YAAY,GACZ,cAAc,GACd,eAAe,GACf,gBAAgB,GAChB,kBAAkB,GAClB,oBAAoB,GACpB,qCAAqC,GACrC,sCAAsC,CAAC;AAE3C,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;IACzB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,MAAM,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GACd,eAAe,GACf,gBAAgB,GAChB,kBAAkB,GAClB,oBAAoB,GACpB,qCAAqC,GACrC,sCAAsC,CAAC;AAE3C,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;IACzB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,MAAM,gBAAgB,GAAG,cAAc,GAAG,QAAQ,GAAG,SAAS,CAAC;AAErE,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,eAAe,GAAG,eAAe,EAAE,CAAC;AAEhD,MAAM,WAAW,gBAAgB;IAC/B,eAAe,EAAE,eAAe,CAAC;IACjC,gBAAgB,EAAE,eAAe,CAAC;IAClC,aAAa,EAAE,eAAe,CAAC;IAC/B,cAAc,EAAE,eAAe,CAAC;CACjC"}
@@ -0,0 +1,2 @@
1
+ export * from './notification';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/web-system/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { AudioEventSubscription } from '../../events';
2
+ import type { NotificationManager, PlaybackNotificationInfo, PlaybackControlName, PlaybackNotificationEventName, NotificationEvents } from '../../system';
3
+ declare class PlaybackNotificationManager implements NotificationManager<PlaybackNotificationInfo, PlaybackNotificationInfo, PlaybackNotificationEventName> {
4
+ private isRegistered;
5
+ private isShown;
6
+ constructor();
7
+ register(): Promise<void>;
8
+ show(info: PlaybackNotificationInfo): Promise<void>;
9
+ update(info: PlaybackNotificationInfo): Promise<void>;
10
+ hide(): Promise<void>;
11
+ unregister(): Promise<void>;
12
+ enableControl(control: PlaybackControlName, enabled: boolean): Promise<void>;
13
+ isActive(): Promise<boolean>;
14
+ addEventListener<T extends PlaybackNotificationEventName>(eventName: T, callback: (event: NotificationEvents[T]) => void): AudioEventSubscription;
15
+ removeEventListener(subscription: AudioEventSubscription): void;
16
+ }
17
+ declare const _default: PlaybackNotificationManager;
18
+ export default _default;
19
+ //# sourceMappingURL=PlaybackNotificationManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PlaybackNotificationManager.d.ts","sourceRoot":"","sources":["../../../../src/web-system/notification/PlaybackNotificationManager.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,KAAK,EACV,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,6BAA6B,EAC7B,kBAAkB,EACnB,MAAM,cAAc,CAAC;AAGtB,cAAM,2BACJ,YACE,mBAAmB,CACjB,wBAAwB,EACxB,wBAAwB,EACxB,6BAA6B,CAC9B;IAEH,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,OAAO,CAAS;;IAIlB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAEzB,IAAI,CAAC,IAAI,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC;IAEnD,MAAM,CAAC,IAAI,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC;IAErD,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAErB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAE3B,aAAa,CACjB,OAAO,EAAE,mBAAmB,EAC5B,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,IAAI,CAAC;IAEV,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC;IAIlC,gBAAgB,CAAC,CAAC,SAAS,6BAA6B,EACtD,SAAS,EAAE,CAAC,EACZ,QAAQ,EAAE,CAAC,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC,KAAK,IAAI,GAC/C,sBAAsB;IAOzB,mBAAmB,CAAC,YAAY,EAAE,sBAAsB,GAAG,IAAI;CAChE;;AAED,wBAAiD"}
@@ -0,0 +1,19 @@
1
+ import type { AudioEventSubscription } from '../../events';
2
+ import type { NotificationManager, RecordingNotificationInfo, RecordingControlName, RecordingNotificationEventName, NotificationEvents } from '../../system';
3
+ declare class RecordingNotificationManager implements NotificationManager<RecordingNotificationInfo, RecordingNotificationInfo, RecordingNotificationEventName> {
4
+ private isRegistered;
5
+ private isShown;
6
+ constructor();
7
+ register(): Promise<void>;
8
+ show(info: RecordingNotificationInfo): Promise<void>;
9
+ update(info: RecordingNotificationInfo): Promise<void>;
10
+ hide(): Promise<void>;
11
+ unregister(): Promise<void>;
12
+ enableControl(control: RecordingControlName, enabled: boolean): Promise<void>;
13
+ isActive(): Promise<boolean>;
14
+ addEventListener<T extends RecordingNotificationEventName>(eventName: T, callback: (event: NotificationEvents[T]) => void): AudioEventSubscription;
15
+ removeEventListener(subscription: AudioEventSubscription): void;
16
+ }
17
+ declare const _default: RecordingNotificationManager;
18
+ export default _default;
19
+ //# sourceMappingURL=RecordingNotificationManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RecordingNotificationManager.d.ts","sourceRoot":"","sources":["../../../../src/web-system/notification/RecordingNotificationManager.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,KAAK,EACV,mBAAmB,EACnB,yBAAyB,EACzB,oBAAoB,EACpB,8BAA8B,EAC9B,kBAAkB,EACnB,MAAM,cAAc,CAAC;AAGtB,cAAM,4BACJ,YACE,mBAAmB,CACjB,yBAAyB,EACzB,yBAAyB,EACzB,8BAA8B,CAC/B;IAEH,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,OAAO,CAAS;;IAIlB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAEzB,IAAI,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC;IAEpD,MAAM,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC;IAEtD,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAErB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAE3B,aAAa,CACjB,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,IAAI,CAAC;IAEV,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC;IAIlC,gBAAgB,CAAC,CAAC,SAAS,8BAA8B,EACvD,SAAS,EAAE,CAAC,EACZ,QAAQ,EAAE,CAAC,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC,KAAK,IAAI,GAC/C,sBAAsB;IAOzB,mBAAmB,CAAC,YAAY,EAAE,sBAAsB,GAAG,IAAI;CAChE;;AAED,wBAAkD"}
@@ -0,0 +1,3 @@
1
+ export { default as PlaybackNotificationManager } from './PlaybackNotificationManager';
2
+ export { default as RecordingNotificationManager } from './RecordingNotificationManager';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/web-system/notification/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,4BAA4B,EAAE,MAAM,gCAAgC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-audio-api",
3
- "version": "0.11.0-nightly-db51488-20251207",
3
+ "version": "0.11.0-nightly-6ba0571-20251209",
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"