react-native-audio-api 0.11.0-alpha.4 → 0.11.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) 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 +3 -4
  5. package/android/src/main/java/com/swmansion/audioapi/system/CentralizedForegroundService.kt +128 -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 +669 -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 +45 -0
  15. package/android/src/main/java/com/swmansion/audioapi/system/notification/SimpleNotification.kt +119 -0
  16. package/common/cpp/audioapi/utils/AudioFileProperties.h +17 -17
  17. package/ios/audioapi/ios/AudioAPIModule.h +2 -2
  18. package/ios/audioapi/ios/AudioAPIModule.mm +108 -18
  19. package/ios/audioapi/ios/core/NativeAudioRecorder.m +8 -1
  20. package/ios/audioapi/ios/system/AudioEngine.mm +2 -2
  21. package/ios/audioapi/ios/system/AudioSessionManager.mm +12 -9
  22. package/ios/audioapi/ios/system/NotificationManager.mm +1 -1
  23. package/ios/audioapi/ios/system/notification/BaseNotification.h +58 -0
  24. package/ios/audioapi/ios/system/notification/NotificationRegistry.h +70 -0
  25. package/ios/audioapi/ios/system/notification/NotificationRegistry.mm +172 -0
  26. package/ios/audioapi/ios/system/notification/PlaybackNotification.h +27 -0
  27. package/ios/audioapi/ios/system/notification/PlaybackNotification.mm +427 -0
  28. package/lib/commonjs/api.js +72 -1
  29. package/lib/commonjs/api.js.map +1 -1
  30. package/lib/commonjs/api.web.js +27 -14
  31. package/lib/commonjs/api.web.js.map +1 -1
  32. package/lib/commonjs/specs/NativeAudioAPIModule.js.map +1 -1
  33. package/lib/commonjs/system/AudioManager.js +6 -9
  34. package/lib/commonjs/system/AudioManager.js.map +1 -1
  35. package/lib/commonjs/system/index.js +13 -0
  36. package/lib/commonjs/system/index.js.map +1 -1
  37. package/lib/commonjs/system/notification/PlaybackNotificationManager.js +135 -0
  38. package/lib/commonjs/system/notification/PlaybackNotificationManager.js.map +1 -0
  39. package/lib/commonjs/system/notification/RecordingNotificationManager.js +182 -0
  40. package/lib/commonjs/system/notification/RecordingNotificationManager.js.map +1 -0
  41. package/lib/commonjs/system/notification/SimpleNotificationManager.js +122 -0
  42. package/lib/commonjs/system/notification/SimpleNotificationManager.js.map +1 -0
  43. package/lib/commonjs/system/notification/index.js +45 -0
  44. package/lib/commonjs/system/notification/index.js.map +1 -0
  45. package/lib/commonjs/system/notification/types.js +6 -0
  46. package/lib/commonjs/system/notification/types.js.map +1 -0
  47. package/lib/commonjs/types.js +17 -17
  48. package/lib/commonjs/types.js.map +1 -1
  49. package/lib/commonjs/web-system/index.js +17 -0
  50. package/lib/commonjs/web-system/index.js.map +1 -0
  51. package/lib/commonjs/web-system/notification/PlaybackNotificationManager.js +34 -0
  52. package/lib/commonjs/web-system/notification/PlaybackNotificationManager.js.map +1 -0
  53. package/lib/commonjs/web-system/notification/RecordingNotificationManager.js +34 -0
  54. package/lib/commonjs/web-system/notification/RecordingNotificationManager.js.map +1 -0
  55. package/lib/commonjs/web-system/notification/index.js +21 -0
  56. package/lib/commonjs/web-system/notification/index.js.map +1 -0
  57. package/lib/module/api.js +4 -0
  58. package/lib/module/api.js.map +1 -1
  59. package/lib/module/api.web.js +3 -1
  60. package/lib/module/api.web.js.map +1 -1
  61. package/lib/module/specs/NativeAudioAPIModule.js.map +1 -1
  62. package/lib/module/system/AudioManager.js +6 -9
  63. package/lib/module/system/AudioManager.js.map +1 -1
  64. package/lib/module/system/index.js +1 -0
  65. package/lib/module/system/index.js.map +1 -1
  66. package/lib/module/system/notification/PlaybackNotificationManager.js +131 -0
  67. package/lib/module/system/notification/PlaybackNotificationManager.js.map +1 -0
  68. package/lib/module/system/notification/RecordingNotificationManager.js +178 -0
  69. package/lib/module/system/notification/RecordingNotificationManager.js.map +1 -0
  70. package/lib/module/system/notification/SimpleNotificationManager.js +118 -0
  71. package/lib/module/system/notification/SimpleNotificationManager.js.map +1 -0
  72. package/lib/module/system/notification/index.js +7 -0
  73. package/lib/module/system/notification/index.js.map +1 -0
  74. package/lib/module/system/notification/types.js +4 -0
  75. package/lib/module/system/notification/types.js.map +1 -0
  76. package/lib/module/types.js +17 -17
  77. package/lib/module/types.js.map +1 -1
  78. package/lib/module/web-system/index.js +4 -0
  79. package/lib/module/web-system/index.js.map +1 -0
  80. package/lib/module/web-system/notification/PlaybackNotificationManager.js +30 -0
  81. package/lib/module/web-system/notification/PlaybackNotificationManager.js.map +1 -0
  82. package/lib/module/web-system/notification/RecordingNotificationManager.js +30 -0
  83. package/lib/module/web-system/notification/RecordingNotificationManager.js.map +1 -0
  84. package/lib/module/web-system/notification/index.js +5 -0
  85. package/lib/module/web-system/notification/index.js.map +1 -0
  86. package/lib/typescript/api.d.ts +2 -0
  87. package/lib/typescript/api.d.ts.map +1 -1
  88. package/lib/typescript/api.web.d.ts +3 -1
  89. package/lib/typescript/api.web.d.ts.map +1 -1
  90. package/lib/typescript/events/types.d.ts +3 -3
  91. package/lib/typescript/events/types.d.ts.map +1 -1
  92. package/lib/typescript/specs/NativeAudioAPIModule.d.ts +16 -5
  93. package/lib/typescript/specs/NativeAudioAPIModule.d.ts.map +1 -1
  94. package/lib/typescript/system/AudioManager.d.ts +4 -5
  95. package/lib/typescript/system/AudioManager.d.ts.map +1 -1
  96. package/lib/typescript/system/index.d.ts +1 -0
  97. package/lib/typescript/system/index.d.ts.map +1 -1
  98. package/lib/typescript/system/notification/PlaybackNotificationManager.d.ts +22 -0
  99. package/lib/typescript/system/notification/PlaybackNotificationManager.d.ts.map +1 -0
  100. package/lib/typescript/system/notification/RecordingNotificationManager.d.ts +23 -0
  101. package/lib/typescript/system/notification/RecordingNotificationManager.d.ts.map +1 -0
  102. package/lib/typescript/system/notification/SimpleNotificationManager.d.ts +20 -0
  103. package/lib/typescript/system/notification/SimpleNotificationManager.d.ts.map +1 -0
  104. package/lib/typescript/system/notification/index.d.ts +5 -0
  105. package/lib/typescript/system/notification/index.d.ts.map +1 -0
  106. package/lib/typescript/system/notification/types.d.ts +65 -0
  107. package/lib/typescript/system/notification/types.d.ts.map +1 -0
  108. package/lib/typescript/system/types.d.ts +0 -16
  109. package/lib/typescript/system/types.d.ts.map +1 -1
  110. package/lib/typescript/types.d.ts +16 -16
  111. package/lib/typescript/types.d.ts.map +1 -1
  112. package/lib/typescript/web-system/index.d.ts +2 -0
  113. package/lib/typescript/web-system/index.d.ts.map +1 -0
  114. package/lib/typescript/web-system/notification/PlaybackNotificationManager.d.ts +19 -0
  115. package/lib/typescript/web-system/notification/PlaybackNotificationManager.d.ts.map +1 -0
  116. package/lib/typescript/web-system/notification/RecordingNotificationManager.d.ts +19 -0
  117. package/lib/typescript/web-system/notification/RecordingNotificationManager.d.ts.map +1 -0
  118. package/lib/typescript/web-system/notification/index.d.ts +3 -0
  119. package/lib/typescript/web-system/notification/index.d.ts.map +1 -0
  120. package/package.json +1 -1
  121. package/src/api.ts +17 -0
  122. package/src/api.web.ts +7 -2
  123. package/src/events/types.ts +3 -4
  124. package/src/specs/NativeAudioAPIModule.ts +23 -7
  125. package/src/system/AudioManager.ts +10 -23
  126. package/src/system/index.ts +1 -0
  127. package/src/system/notification/PlaybackNotificationManager.ts +193 -0
  128. package/src/system/notification/RecordingNotificationManager.ts +242 -0
  129. package/src/system/notification/SimpleNotificationManager.ts +170 -0
  130. package/src/system/notification/index.ts +4 -0
  131. package/src/system/notification/types.ts +111 -0
  132. package/src/system/types.ts +0 -18
  133. package/src/types.ts +17 -17
  134. package/src/web-system/index.ts +1 -0
  135. package/src/web-system/notification/PlaybackNotificationManager.ts +60 -0
  136. package/src/web-system/notification/RecordingNotificationManager.ts +60 -0
  137. package/src/web-system/notification/index.ts +2 -0
  138. package/android/src/main/java/com/swmansion/audioapi/system/LockScreenManager.kt +0 -347
  139. package/android/src/main/java/com/swmansion/audioapi/system/MediaNotificationManager.kt +0 -273
  140. package/android/src/main/java/com/swmansion/audioapi/system/MediaReceiver.kt +0 -57
  141. package/android/src/main/java/com/swmansion/audioapi/system/MediaSessionCallback.kt +0 -61
@@ -0,0 +1,118 @@
1
+ "use strict";
2
+
3
+ import { NativeAudioAPIModule } from "../../specs/index.js";
4
+ import { AudioEventEmitter } from "../../events/index.js";
5
+ /// Simple notification manager for basic notifications with title and text.
6
+ /// Implements the generic NotificationManager interface.
7
+ // It is only a showcase
8
+ class SimpleNotificationManager {
9
+ notificationKey = 'simple';
10
+ isRegistered = false;
11
+ isShown = false;
12
+ constructor() {
13
+ this.audioEventEmitter = new AudioEventEmitter(global.AudioEventEmitter);
14
+ }
15
+
16
+ /// Register the simple notification (must be called before showing).
17
+ async register() {
18
+ if (this.isRegistered) {
19
+ console.warn('SimpleNotification is already registered');
20
+ return;
21
+ }
22
+ if (!NativeAudioAPIModule) {
23
+ throw new Error('NativeAudioAPIModule is not available');
24
+ }
25
+ const result = await NativeAudioAPIModule.registerNotification('simple', this.notificationKey);
26
+ if (result.error) {
27
+ throw new Error(result.error);
28
+ }
29
+ this.isRegistered = true;
30
+ }
31
+
32
+ /// Show the notification with initial options.
33
+ async show(options) {
34
+ if (!this.isRegistered) {
35
+ throw new Error('SimpleNotification must be registered before showing. Call register() first.');
36
+ }
37
+ if (!NativeAudioAPIModule) {
38
+ throw new Error('NativeAudioAPIModule is not available');
39
+ }
40
+ const result = await NativeAudioAPIModule.showNotification(this.notificationKey, options);
41
+ if (result.error) {
42
+ throw new Error(result.error);
43
+ }
44
+ this.isShown = true;
45
+ }
46
+
47
+ /// Update the notification with new options.
48
+ async update(options) {
49
+ if (!this.isShown) {
50
+ console.warn('SimpleNotification is not shown. Call show() first.');
51
+ return;
52
+ }
53
+ if (!NativeAudioAPIModule) {
54
+ throw new Error('NativeAudioAPIModule is not available');
55
+ }
56
+ const result = await NativeAudioAPIModule.updateNotification(this.notificationKey, options);
57
+ if (result.error) {
58
+ throw new Error(result.error);
59
+ }
60
+ }
61
+
62
+ /// Hide the notification (can be shown again later).
63
+ async hide() {
64
+ if (!this.isShown) {
65
+ return;
66
+ }
67
+ if (!NativeAudioAPIModule) {
68
+ throw new Error('NativeAudioAPIModule is not available');
69
+ }
70
+ const result = await NativeAudioAPIModule.hideNotification(this.notificationKey);
71
+ if (result.error) {
72
+ throw new Error(result.error);
73
+ }
74
+ this.isShown = false;
75
+ }
76
+
77
+ /// Unregister the notification (must register again to use).
78
+ async unregister() {
79
+ if (!this.isRegistered) {
80
+ return;
81
+ }
82
+ if (this.isShown) {
83
+ await this.hide();
84
+ }
85
+ if (!NativeAudioAPIModule) {
86
+ throw new Error('NativeAudioAPIModule is not available');
87
+ }
88
+ const result = await NativeAudioAPIModule.unregisterNotification(this.notificationKey);
89
+ if (result.error) {
90
+ throw new Error(result.error);
91
+ }
92
+ this.isRegistered = false;
93
+ }
94
+
95
+ /// Check if the notification is currently active.
96
+ async isActive() {
97
+ if (!NativeAudioAPIModule) {
98
+ return false;
99
+ }
100
+ return await NativeAudioAPIModule.isNotificationActive(this.notificationKey);
101
+ }
102
+
103
+ /// Add an event listener (SimpleNotification doesn't emit events).
104
+ addEventListener(_eventName, _callback) {
105
+ // SimpleNotification doesn't emit events, return a no-op subscription
106
+ console.warn('SimpleNotification does not support event listeners');
107
+ return this.audioEventEmitter.addAudioEventListener(
108
+ // Using a valid event name for the no-op subscription
109
+ 'playbackNotificationPlay', () => {});
110
+ }
111
+
112
+ /// Remove an event listener.
113
+ removeEventListener(subscription) {
114
+ subscription.remove();
115
+ }
116
+ }
117
+ export default new SimpleNotificationManager();
118
+ //# sourceMappingURL=SimpleNotificationManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["NativeAudioAPIModule","AudioEventEmitter","SimpleNotificationManager","notificationKey","isRegistered","isShown","constructor","audioEventEmitter","global","register","console","warn","Error","result","registerNotification","error","show","options","showNotification","update","updateNotification","hide","hideNotification","unregister","unregisterNotification","isActive","isNotificationActive","addEventListener","_eventName","_callback","addAudioEventListener","removeEventListener","subscription","remove"],"sourceRoot":"../../../../src","sources":["system/notification/SimpleNotificationManager.ts"],"mappings":";;AAAA,SAASA,oBAAoB,QAAQ,sBAAa;AAClD,SAASC,iBAAiB,QAAgC,uBAAc;AAGxE;AACA;AACA;AACA,MAAMC,yBAAyB,CAO/B;EACUC,eAAe,GAAG,QAAQ;EAC1BC,YAAY,GAAG,KAAK;EACpBC,OAAO,GAAG,KAAK;EAGvBC,WAAWA,CAAA,EAAG;IACZ,IAAI,CAACC,iBAAiB,GAAG,IAAIN,iBAAiB,CAACO,MAAM,CAACP,iBAAiB,CAAC;EAC1E;;EAEA;EACA,MAAMQ,QAAQA,CAAA,EAAkB;IAC9B,IAAI,IAAI,CAACL,YAAY,EAAE;MACrBM,OAAO,CAACC,IAAI,CAAC,0CAA0C,CAAC;MACxD;IACF;IAEA,IAAI,CAACX,oBAAoB,EAAE;MACzB,MAAM,IAAIY,KAAK,CAAC,uCAAuC,CAAC;IAC1D;IAEA,MAAMC,MAAM,GAAG,MAAMb,oBAAoB,CAACc,oBAAoB,CAC5D,QAAQ,EACR,IAAI,C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B,yBAAyB,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+
3
+ export { default as PlaybackNotificationManager } from "./PlaybackNotificationManager.js";
4
+ export { default as RecordingNotificationManager } from "./RecordingNotificationManager.js";
5
+ export { default as SimpleNotificationManager } from "./SimpleNotificationManager.js";
6
+ export * from "./types.js";
7
+ //# sourceMappingURL=index.js.map
@@ -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":[]}
@@ -1,25 +1,31 @@
1
1
  "use strict";
2
2
 
3
3
  export let FileDirectory = /*#__PURE__*/function (FileDirectory) {
4
- FileDirectory[FileDirectory["Document"] = 1] = "Document";
5
- FileDirectory[FileDirectory["Cache"] = 2] = "Cache";
4
+ FileDirectory[FileDirectory["Document"] = 0] = "Document";
5
+ FileDirectory[FileDirectory["Cache"] = 1] = "Cache";
6
6
  return FileDirectory;
7
7
  }({});
8
8
  export let FileFormat = /*#__PURE__*/function (FileFormat) {
9
- FileFormat[FileFormat["Wav"] = 1] = "Wav";
10
- FileFormat[FileFormat["Caf"] = 2] = "Caf";
11
- FileFormat[FileFormat["M4A"] = 3] = "M4A";
12
- FileFormat[FileFormat["Flac"] = 4] = "Flac";
9
+ FileFormat[FileFormat["Wav"] = 0] = "Wav";
10
+ FileFormat[FileFormat["Caf"] = 1] = "Caf";
11
+ FileFormat[FileFormat["M4A"] = 2] = "M4A";
12
+ FileFormat[FileFormat["Flac"] = 3] = "Flac";
13
13
  return FileFormat;
14
14
  }({});
15
15
  export let IOSAudioQuality = /*#__PURE__*/function (IOSAudioQuality) {
16
- IOSAudioQuality[IOSAudioQuality["Min"] = 1] = "Min";
17
- IOSAudioQuality[IOSAudioQuality["Low"] = 2] = "Low";
18
- IOSAudioQuality[IOSAudioQuality["Medium"] = 3] = "Medium";
19
- IOSAudioQuality[IOSAudioQuality["High"] = 4] = "High";
20
- IOSAudioQuality[IOSAudioQuality["Max"] = 5] = "Max";
16
+ IOSAudioQuality[IOSAudioQuality["Min"] = 0] = "Min";
17
+ IOSAudioQuality[IOSAudioQuality["Low"] = 1] = "Low";
18
+ IOSAudioQuality[IOSAudioQuality["Medium"] = 2] = "Medium";
19
+ IOSAudioQuality[IOSAudioQuality["High"] = 3] = "High";
20
+ IOSAudioQuality[IOSAudioQuality["Max"] = 4] = "Max";
21
21
  return IOSAudioQuality;
22
22
  }({});
23
+ export let BitDepth = /*#__PURE__*/function (BitDepth) {
24
+ BitDepth[BitDepth["Bit16"] = 0] = "Bit16";
25
+ BitDepth[BitDepth["Bit24"] = 1] = "Bit24";
26
+ BitDepth[BitDepth["Bit32"] = 2] = "Bit32";
27
+ return BitDepth;
28
+ }({});
23
29
  export let FlacCompressionLevel = /*#__PURE__*/function (FlacCompressionLevel) {
24
30
  FlacCompressionLevel[FlacCompressionLevel["L0"] = 0] = "L0";
25
31
  FlacCompressionLevel[FlacCompressionLevel["L1"] = 1] = "L1";
@@ -32,10 +38,4 @@ export let FlacCompressionLevel = /*#__PURE__*/function (FlacCompressionLevel) {
32
38
  FlacCompressionLevel[FlacCompressionLevel["L8"] = 8] = "L8";
33
39
  return FlacCompressionLevel;
34
40
  }({});
35
- export let BitDepth = /*#__PURE__*/function (BitDepth) {
36
- BitDepth[BitDepth["Bit16"] = 1] = "Bit16";
37
- BitDepth[BitDepth["Bit24"] = 2] = "Bit24";
38
- BitDepth[BitDepth["Bit32"] = 3] = "Bit32";
39
- return BitDepth;
40
- }({});
41
41
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["FileDirectory","FileFormat","IOSAudioQuality","FlacCompressionLevel","BitDepth"],"sourceRoot":"../../src","sources":["types.ts"],"mappings":";;AA6CA,WAAYA,aAAa,0BAAbA,aAAa;EAAbA,aAAa,CAAbA,aAAa;EAAbA,aAAa,CAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA;AAKzB,WAAYC,UAAU,0BAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA;AAOtB,WAAYC,eAAe,0BAAfA,eAAe;EAAfA,eAAe,CAAfA,eAAe;EAAfA,eAAe,CAAfA,eAAe;EAAfA,eAAe,CAAfA,eAAe;EAAfA,eAAe,CAAfA,eAAe;EAAfA,eAAe,CAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA;AAQ3B,WAAYC,oBAAoB,0BAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAAA,OAApBA,oBAAoB;AAAA;AAYhC,WAAYC,QAAQ,0BAARA,QAAQ;EAARA,QAAQ,CAARA,QAAQ;EAARA,QAAQ,CAARA,QAAQ;EAARA,QAAQ,CAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA","ignoreList":[]}
1
+ {"version":3,"names":["FileDirectory","FileFormat","IOSAudioQuality","BitDepth","FlacCompressionLevel"],"sourceRoot":"../../src","sources":["types.ts"],"mappings":";;AA6CA,WAAYA,aAAa,0BAAbA,aAAa;EAAbA,aAAa,CAAbA,aAAa;EAAbA,aAAa,CAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA;AAKzB,WAAYC,UAAU,0BAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA;AAOtB,WAAYC,eAAe,0BAAfA,eAAe;EAAfA,eAAe,CAAfA,eAAe;EAAfA,eAAe,CAAfA,eAAe;EAAfA,eAAe,CAAfA,eAAe;EAAfA,eAAe,CAAfA,eAAe;EAAfA,eAAe,CAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA;AAQ3B,WAAYC,QAAQ,0BAARA,QAAQ;EAARA,QAAQ,CAARA,QAAQ;EAARA,QAAQ,CAARA,QAAQ;EAARA,QAAQ,CAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA;AAMpB,WAAYC,oBAAoB,0BAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAAA,OAApBA,oBAAoB;AAAA","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":[]}
@@ -30,4 +30,6 @@ export * from './errors';
30
30
  export * from './system/types';
31
31
  export * from './types';
32
32
  export { default as FilePreset } from './utils/filePresets';
33
+ export { PlaybackNotificationManager, RecordingNotificationManager, } from './system/notification';
34
+ export { NotificationManager, PlaybackControlName, PlaybackNotificationEventName, PlaybackNotificationInfo, RecordingControlName, RecordingNotificationEventName, RecordingNotificationInfo, SimpleNotificationOptions, } from './system/notification';
33
35
  //# 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,OA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C;AACxB,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAG5D,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,GAC7B,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,6BAA6B,EAC7B,wBAAwB,EACxB,oBAAoB,EACpB,8BAA8B,EAC9B,yBAAyB,EACzB,yBAAyB,GAC1B,MAAM,uBAAuB,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,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EtB,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,7 +7,7 @@ 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';
@@ -67,8 +68,7 @@ interface AudioAPIEvents {
67
68
  systemStateChanged: EventEmptyType;
68
69
  recorderError: OnRecorderErrorEventType;
69
70
  }
70
- type AudioEvents = SystemEvents & AudioAPIEvents;
71
- export type RemoteCommandEventName = keyof RemoteCommandEvents;
71
+ type AudioEvents = SystemEvents & AudioAPIEvents & NotificationEvents;
72
72
  export type SystemEventName = keyof SystemEvents;
73
73
  export type SystemEventCallback<Name extends SystemEventName> = (event: SystemEvents[Name]) => void;
74
74
  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,GAC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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 { AudioDevicesInfo, PermissionStatus } 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":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,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,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,EACtB,YAAY,EAAE,OAAO,GACpB,IAAI,CAAC;IACR,wBAAwB,IAAI,IAAI,CAAC;IAGjC,iBAAiB,CAAC,IAAI,EAAE;QACtB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;KACtD,GAAG,IAAI,CAAC;IACT,mBAAmB,IAAI,IAAI,CAAC;IAG5B,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAC1D,yBAAyB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAClD,s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,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAClD,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAC/C,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAG7C,2BAA2B,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACzD,yBAAyB,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACvD,8BAA8B,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC5D,4BAA4B,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAG1D,cAAc,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAG5C,oBAAoB,CAClB,IAAI,EAAE,gBAAgB,EACtB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,sBAAsB,CAAC,CAAC;IACnC,gBAAgB,CACd,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,UAAU,GAClB,OAAO,CAAC,sBAAsB,CAAC,CAAC;IACnC,kBAAkB,CAChB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,UAAU,GAClB,OAAO,CAAC,sBAAsB,CAAC,CAAC;IACnC,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAC/D,sBAAsB,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,CA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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"}