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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/android/src/main/java/com/swmansion/audioapi/AudioAPIModule.kt +164 -16
  2. package/android/src/main/java/com/swmansion/audioapi/core/NativeAudioPlayer.kt +10 -8
  3. package/android/src/main/java/com/swmansion/audioapi/core/NativeAudioRecorder.kt +10 -8
  4. package/android/src/main/java/com/swmansion/audioapi/system/AudioFocusListener.kt +8 -23
  5. package/android/src/main/java/com/swmansion/audioapi/system/CentralizedForegroundService.kt +127 -0
  6. package/android/src/main/java/com/swmansion/audioapi/system/ForegroundServiceManager.kt +116 -0
  7. package/android/src/main/java/com/swmansion/audioapi/system/MediaSessionManager.kt +115 -107
  8. package/android/src/main/java/com/swmansion/audioapi/system/PermissionRequestListener.kt +2 -1
  9. package/android/src/main/java/com/swmansion/audioapi/system/notification/BaseNotification.kt +47 -0
  10. package/android/src/main/java/com/swmansion/audioapi/system/notification/NotificationRegistry.kt +191 -0
  11. package/android/src/main/java/com/swmansion/audioapi/system/notification/PlaybackNotification.kt +668 -0
  12. package/android/src/main/java/com/swmansion/audioapi/system/notification/PlaybackNotificationReceiver.kt +33 -0
  13. package/android/src/main/java/com/swmansion/audioapi/system/notification/RecordingNotification.kt +303 -0
  14. package/android/src/main/java/com/swmansion/audioapi/system/notification/RecordingNotificationReceiver.kt +43 -0
  15. package/android/src/main/java/com/swmansion/audioapi/system/notification/SimpleNotification.kt +119 -0
  16. package/ios/audioapi/ios/AudioAPIModule.h +2 -2
  17. package/ios/audioapi/ios/AudioAPIModule.mm +108 -18
  18. package/ios/audioapi/ios/system/AudioEngine.mm +2 -2
  19. package/ios/audioapi/ios/system/AudioSessionManager.mm +1 -1
  20. package/ios/audioapi/ios/system/NotificationManager.mm +1 -1
  21. package/ios/audioapi/ios/system/notification/BaseNotification.h +58 -0
  22. package/ios/audioapi/ios/system/notification/NotificationRegistry.h +70 -0
  23. package/ios/audioapi/ios/system/notification/NotificationRegistry.mm +172 -0
  24. package/ios/audioapi/ios/system/notification/PlaybackNotification.h +27 -0
  25. package/ios/audioapi/ios/system/notification/PlaybackNotification.mm +427 -0
  26. package/lib/commonjs/api.js +59 -10
  27. package/lib/commonjs/api.js.map +1 -1
  28. package/lib/commonjs/api.web.js +27 -14
  29. package/lib/commonjs/api.web.js.map +1 -1
  30. package/lib/commonjs/specs/NativeAudioAPIModule.js.map +1 -1
  31. package/lib/commonjs/system/AudioManager.js +6 -9
  32. package/lib/commonjs/system/AudioManager.js.map +1 -1
  33. package/lib/commonjs/system/index.js +13 -0
  34. package/lib/commonjs/system/index.js.map +1 -1
  35. package/lib/commonjs/system/notification/PlaybackNotificationManager.js +135 -0
  36. package/lib/commonjs/system/notification/PlaybackNotificationManager.js.map +1 -0
  37. package/lib/commonjs/system/notification/RecordingNotificationManager.js +182 -0
  38. package/lib/commonjs/system/notification/RecordingNotificationManager.js.map +1 -0
  39. package/lib/commonjs/system/notification/SimpleNotificationManager.js +122 -0
  40. package/lib/commonjs/system/notification/SimpleNotificationManager.js.map +1 -0
  41. package/lib/commonjs/system/notification/index.js +45 -0
  42. package/lib/commonjs/system/notification/index.js.map +1 -0
  43. package/lib/commonjs/system/notification/types.js +6 -0
  44. package/lib/commonjs/system/notification/types.js.map +1 -0
  45. package/lib/commonjs/web-system/index.js +17 -0
  46. package/lib/commonjs/web-system/index.js.map +1 -0
  47. package/lib/commonjs/web-system/notification/PlaybackNotificationManager.js +34 -0
  48. package/lib/commonjs/web-system/notification/PlaybackNotificationManager.js.map +1 -0
  49. package/lib/commonjs/web-system/notification/RecordingNotificationManager.js +34 -0
  50. package/lib/commonjs/web-system/notification/RecordingNotificationManager.js.map +1 -0
  51. package/lib/commonjs/web-system/notification/index.js +21 -0
  52. package/lib/commonjs/web-system/notification/index.js.map +1 -0
  53. package/lib/module/api.js +5 -1
  54. package/lib/module/api.js.map +1 -1
  55. package/lib/module/api.web.js +3 -1
  56. package/lib/module/api.web.js.map +1 -1
  57. package/lib/module/specs/NativeAudioAPIModule.js.map +1 -1
  58. package/lib/module/system/AudioManager.js +6 -9
  59. package/lib/module/system/AudioManager.js.map +1 -1
  60. package/lib/module/system/index.js +1 -0
  61. package/lib/module/system/index.js.map +1 -1
  62. package/lib/module/system/notification/PlaybackNotificationManager.js +131 -0
  63. package/lib/module/system/notification/PlaybackNotificationManager.js.map +1 -0
  64. package/lib/module/system/notification/RecordingNotificationManager.js +178 -0
  65. package/lib/module/system/notification/RecordingNotificationManager.js.map +1 -0
  66. package/lib/module/system/notification/SimpleNotificationManager.js +118 -0
  67. package/lib/module/system/notification/SimpleNotificationManager.js.map +1 -0
  68. package/lib/module/system/notification/index.js +7 -0
  69. package/lib/module/system/notification/index.js.map +1 -0
  70. package/lib/module/system/notification/types.js +4 -0
  71. package/lib/module/system/notification/types.js.map +1 -0
  72. package/lib/module/web-system/index.js +4 -0
  73. package/lib/module/web-system/index.js.map +1 -0
  74. package/lib/module/web-system/notification/PlaybackNotificationManager.js +30 -0
  75. package/lib/module/web-system/notification/PlaybackNotificationManager.js.map +1 -0
  76. package/lib/module/web-system/notification/RecordingNotificationManager.js +30 -0
  77. package/lib/module/web-system/notification/RecordingNotificationManager.js.map +1 -0
  78. package/lib/module/web-system/notification/index.js +5 -0
  79. package/lib/module/web-system/notification/index.js.map +1 -0
  80. package/lib/typescript/api.d.ts +3 -1
  81. package/lib/typescript/api.d.ts.map +1 -1
  82. package/lib/typescript/api.web.d.ts +3 -1
  83. package/lib/typescript/api.web.d.ts.map +1 -1
  84. package/lib/typescript/events/types.d.ts +4 -18
  85. package/lib/typescript/events/types.d.ts.map +1 -1
  86. package/lib/typescript/specs/NativeAudioAPIModule.d.ts +16 -5
  87. package/lib/typescript/specs/NativeAudioAPIModule.d.ts.map +1 -1
  88. package/lib/typescript/system/AudioManager.d.ts +4 -5
  89. package/lib/typescript/system/AudioManager.d.ts.map +1 -1
  90. package/lib/typescript/system/index.d.ts +1 -0
  91. package/lib/typescript/system/index.d.ts.map +1 -1
  92. package/lib/typescript/system/notification/PlaybackNotificationManager.d.ts +22 -0
  93. package/lib/typescript/system/notification/PlaybackNotificationManager.d.ts.map +1 -0
  94. package/lib/typescript/system/notification/RecordingNotificationManager.d.ts +23 -0
  95. package/lib/typescript/system/notification/RecordingNotificationManager.d.ts.map +1 -0
  96. package/lib/typescript/system/notification/SimpleNotificationManager.d.ts +20 -0
  97. package/lib/typescript/system/notification/SimpleNotificationManager.d.ts.map +1 -0
  98. package/lib/typescript/system/notification/index.d.ts +5 -0
  99. package/lib/typescript/system/notification/index.d.ts.map +1 -0
  100. package/lib/typescript/system/notification/types.d.ts +65 -0
  101. package/lib/typescript/system/notification/types.d.ts.map +1 -0
  102. package/lib/typescript/system/types.d.ts +0 -16
  103. package/lib/typescript/system/types.d.ts.map +1 -1
  104. package/lib/typescript/web-system/index.d.ts +2 -0
  105. package/lib/typescript/web-system/index.d.ts.map +1 -0
  106. package/lib/typescript/web-system/notification/PlaybackNotificationManager.d.ts +19 -0
  107. package/lib/typescript/web-system/notification/PlaybackNotificationManager.d.ts.map +1 -0
  108. package/lib/typescript/web-system/notification/RecordingNotificationManager.d.ts +19 -0
  109. package/lib/typescript/web-system/notification/RecordingNotificationManager.d.ts.map +1 -0
  110. package/lib/typescript/web-system/notification/index.d.ts +3 -0
  111. package/lib/typescript/web-system/notification/index.d.ts.map +1 -0
  112. package/package.json +1 -1
  113. package/src/api.ts +17 -2
  114. package/src/api.web.ts +7 -2
  115. package/src/events/types.ts +4 -20
  116. package/src/specs/NativeAudioAPIModule.ts +23 -7
  117. package/src/system/AudioManager.ts +10 -23
  118. package/src/system/index.ts +1 -0
  119. package/src/system/notification/PlaybackNotificationManager.ts +193 -0
  120. package/src/system/notification/RecordingNotificationManager.ts +242 -0
  121. package/src/system/notification/SimpleNotificationManager.ts +170 -0
  122. package/src/system/notification/index.ts +4 -0
  123. package/src/system/notification/types.ts +110 -0
  124. package/src/system/types.ts +0 -18
  125. package/src/web-system/index.ts +1 -0
  126. package/src/web-system/notification/PlaybackNotificationManager.ts +60 -0
  127. package/src/web-system/notification/RecordingNotificationManager.ts +60 -0
  128. package/src/web-system/notification/index.ts +2 -0
  129. package/android/src/main/java/com/swmansion/audioapi/system/LockScreenManager.kt +0 -347
  130. package/android/src/main/java/com/swmansion/audioapi/system/MediaNotificationManager.kt +0 -273
  131. package/android/src/main/java/com/swmansion/audioapi/system/MediaReceiver.kt +0 -57
  132. package/android/src/main/java/com/swmansion/audioapi/system/MediaSessionCallback.kt +0 -61
  133. package/ios/audioapi/ios/system/LockScreenManager.h +0 -23
  134. package/ios/audioapi/ios/system/LockScreenManager.mm +0 -314
@@ -0,0 +1,170 @@
1
+ import { NativeAudioAPIModule } from '../../specs';
2
+ import { AudioEventEmitter, AudioEventSubscription } from '../../events';
3
+ import type { NotificationManager, SimpleNotificationOptions } from './types';
4
+
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
+ implements
10
+ NotificationManager<
11
+ SimpleNotificationOptions,
12
+ SimpleNotificationOptions,
13
+ never
14
+ >
15
+ {
16
+ private notificationKey = 'simple';
17
+ private isRegistered = false;
18
+ private isShown = false;
19
+ private audioEventEmitter: AudioEventEmitter;
20
+
21
+ constructor() {
22
+ this.audioEventEmitter = new AudioEventEmitter(global.AudioEventEmitter);
23
+ }
24
+
25
+ /// Register the simple notification (must be called before showing).
26
+ async register(): Promise<void> {
27
+ if (this.isRegistered) {
28
+ console.warn('SimpleNotification is already registered');
29
+ return;
30
+ }
31
+
32
+ if (!NativeAudioAPIModule) {
33
+ throw new Error('NativeAudioAPIModule is not available');
34
+ }
35
+
36
+ const result = await NativeAudioAPIModule.registerNotification(
37
+ 'simple',
38
+ this.notificationKey
39
+ );
40
+
41
+ if (result.error) {
42
+ throw new Error(result.error);
43
+ }
44
+
45
+ this.isRegistered = true;
46
+ }
47
+
48
+ /// Show the notification with initial options.
49
+ async show(options: SimpleNotificationOptions): Promise<void> {
50
+ if (!this.isRegistered) {
51
+ throw new Error(
52
+ 'SimpleNotification must be registered before showing. Call register() first.'
53
+ );
54
+ }
55
+
56
+ if (!NativeAudioAPIModule) {
57
+ throw new Error('NativeAudioAPIModule is not available');
58
+ }
59
+
60
+ const result = await NativeAudioAPIModule.showNotification(
61
+ this.notificationKey,
62
+ options as Record<string, string | number | boolean | undefined>
63
+ );
64
+
65
+ if (result.error) {
66
+ throw new Error(result.error);
67
+ }
68
+
69
+ this.isShown = true;
70
+ }
71
+
72
+ /// Update the notification with new options.
73
+ async update(options: SimpleNotificationOptions): Promise<void> {
74
+ if (!this.isShown) {
75
+ console.warn('SimpleNotification is not shown. Call show() first.');
76
+ return;
77
+ }
78
+
79
+ if (!NativeAudioAPIModule) {
80
+ throw new Error('NativeAudioAPIModule is not available');
81
+ }
82
+
83
+ const result = await NativeAudioAPIModule.updateNotification(
84
+ this.notificationKey,
85
+ options as Record<string, string | number | boolean | undefined>
86
+ );
87
+
88
+ if (result.error) {
89
+ throw new Error(result.error);
90
+ }
91
+ }
92
+
93
+ /// Hide the notification (can be shown again later).
94
+ async hide(): Promise<void> {
95
+ if (!this.isShown) {
96
+ return;
97
+ }
98
+
99
+ if (!NativeAudioAPIModule) {
100
+ throw new Error('NativeAudioAPIModule is not available');
101
+ }
102
+
103
+ const result = await NativeAudioAPIModule.hideNotification(
104
+ this.notificationKey
105
+ );
106
+
107
+ if (result.error) {
108
+ throw new Error(result.error);
109
+ }
110
+
111
+ this.isShown = false;
112
+ }
113
+
114
+ /// Unregister the notification (must register again to use).
115
+ async unregister(): Promise<void> {
116
+ if (!this.isRegistered) {
117
+ return;
118
+ }
119
+
120
+ if (this.isShown) {
121
+ await this.hide();
122
+ }
123
+
124
+ if (!NativeAudioAPIModule) {
125
+ throw new Error('NativeAudioAPIModule is not available');
126
+ }
127
+
128
+ const result = await NativeAudioAPIModule.unregisterNotification(
129
+ this.notificationKey
130
+ );
131
+
132
+ if (result.error) {
133
+ throw new Error(result.error);
134
+ }
135
+
136
+ this.isRegistered = false;
137
+ }
138
+
139
+ /// Check if the notification is currently active.
140
+ async isActive(): Promise<boolean> {
141
+ if (!NativeAudioAPIModule) {
142
+ return false;
143
+ }
144
+
145
+ return await NativeAudioAPIModule.isNotificationActive(
146
+ this.notificationKey
147
+ );
148
+ }
149
+
150
+ /// Add an event listener (SimpleNotification doesn't emit events).
151
+ addEventListener<T extends never>(
152
+ _eventName: T,
153
+ _callback: (event: never) => void
154
+ ): AudioEventSubscription {
155
+ // SimpleNotification doesn't emit events, return a no-op subscription
156
+ console.warn('SimpleNotification does not support event listeners');
157
+ return this.audioEventEmitter.addAudioEventListener(
158
+ // Using a valid event name for the no-op subscription
159
+ 'playbackNotificationPlay',
160
+ () => {}
161
+ );
162
+ }
163
+
164
+ /// Remove an event listener.
165
+ removeEventListener(subscription: AudioEventSubscription): void {
166
+ subscription.remove();
167
+ }
168
+ }
169
+
170
+ export default new SimpleNotificationManager();
@@ -0,0 +1,4 @@
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';
@@ -0,0 +1,110 @@
1
+ import type { AudioEventSubscription } from '../../events';
2
+ import { EventEmptyType, EventTypeWithValue } from '../../events/types';
3
+
4
+ /// Generic notification manager interface that all notification managers should implement.
5
+ /// Provides a consistent API for managing notification lifecycle and events.
6
+ export interface NotificationManager<
7
+ TShowOptions,
8
+ TUpdateOptions,
9
+ TEventName extends NotificationEventName,
10
+ > {
11
+ /// Register the notification (must be called before showing).
12
+ register(): Promise<void>;
13
+
14
+ /// Show the notification with initial options.
15
+ show(options: TShowOptions): Promise<void>;
16
+
17
+ /// Update the notification with new options.
18
+ update(options: TUpdateOptions): Promise<void>;
19
+
20
+ /// Hide the notification (can be shown again later).
21
+ hide(): Promise<void>;
22
+
23
+ /// Unregister the notification (must register again to use).
24
+ unregister(): Promise<void>;
25
+
26
+ /// Check if the notification is currently active.
27
+ isActive(): Promise<boolean>;
28
+
29
+ /// Add an event listener for notification events.
30
+ addEventListener<T extends TEventName>(
31
+ eventName: T,
32
+ callback: NotificationCallback<T>
33
+ ): AudioEventSubscription;
34
+
35
+ /// Remove an event listener.
36
+ removeEventListener(subscription: AudioEventSubscription): void;
37
+ }
38
+
39
+ /// Metadata and state information for playback notifications.
40
+ export interface PlaybackNotificationInfo {
41
+ title?: string;
42
+ artist?: string;
43
+ album?: string;
44
+ artwork?: string | { uri: string };
45
+ androidSmallIcon?: string | { uri: string };
46
+ duration?: number;
47
+ elapsedTime?: number;
48
+ speed?: number;
49
+ state?: 'playing' | 'paused';
50
+ }
51
+
52
+ /// Available playback control actions.
53
+ export type PlaybackControlName =
54
+ | 'play'
55
+ | 'pause'
56
+ | 'next'
57
+ | 'previous'
58
+ | 'skipForward'
59
+ | 'skipBackward'
60
+ | 'seekTo';
61
+
62
+ /// Event names for playback notification actions.
63
+ interface PlaybackNotificationEvent {
64
+ playbackNotificationPlay: EventEmptyType;
65
+ playbackNotificationPause: EventEmptyType;
66
+ playbackNotificationNext: EventEmptyType;
67
+ playbackNotificationPrevious: EventEmptyType;
68
+ playbackNotificationSkipForward: EventTypeWithValue;
69
+ playbackNotificationSkipBackward: EventTypeWithValue;
70
+ playbackNotificationSeekTo: EventTypeWithValue;
71
+ playbackNotificationDismissed: EventEmptyType;
72
+ }
73
+
74
+ export type PlaybackNotificationEventName = keyof PlaybackNotificationEvent;
75
+
76
+ /// Metadata and state information for recording notifications.
77
+ export interface RecordingNotificationInfo {
78
+ title?: string;
79
+ description?: string;
80
+ artwork?: string | { uri: string };
81
+ state?: 'recording' | 'stopped';
82
+ control?: RecordingControlName;
83
+ enabled?: boolean;
84
+ }
85
+
86
+ /// Available recording control actions.
87
+ export type RecordingControlName = 'start' | 'stop';
88
+
89
+ /// Event names for recording notification actions.
90
+ interface RecordingNotificationEvent {
91
+ recordingNotificationStart: EventEmptyType;
92
+ recordingNotificationStop: EventEmptyType;
93
+ recordingNotificationDismissed: EventEmptyType;
94
+ }
95
+
96
+ export type RecordingNotificationEventName = keyof RecordingNotificationEvent;
97
+
98
+ export type NotificationEvents = PlaybackNotificationEvent &
99
+ RecordingNotificationEvent;
100
+ export type NotificationEventName = keyof NotificationEvents;
101
+
102
+ export type NotificationCallback<Name extends NotificationEventName> = (
103
+ event: NotificationEvents[Name]
104
+ ) => void;
105
+
106
+ /// Options for a simple notification with title and text.
107
+ export interface SimpleNotificationOptions {
108
+ title?: string;
109
+ text?: string;
110
+ }
@@ -34,24 +34,6 @@ export interface SessionOptions {
34
34
  iosAllowHaptics?: boolean;
35
35
  }
36
36
 
37
- export type MediaState = 'state_playing' | 'state_paused';
38
-
39
- interface BaseLockScreenInfo {
40
- [key: string]: string | boolean | number | undefined;
41
- }
42
-
43
- export interface LockScreenInfo extends BaseLockScreenInfo {
44
- title?: string;
45
- artwork?: string;
46
- artist?: string;
47
- album?: string;
48
- duration?: number;
49
- description?: string; // android only
50
- state?: MediaState;
51
- speed?: number;
52
- elapsedTime?: number;
53
- }
54
-
55
37
  export type PermissionStatus = 'Undetermined' | 'Denied' | 'Granted';
56
38
 
57
39
  export interface AudioDeviceInfo {
@@ -0,0 +1 @@
1
+ export * from './notification';
@@ -0,0 +1,60 @@
1
+ /* eslint-disable @typescript-eslint/no-unused-vars */
2
+ /* eslint-disable no-useless-constructor */
3
+ /* eslint-disable @typescript-eslint/require-await */
4
+
5
+ import type { AudioEventSubscription } from '../../events';
6
+ import type {
7
+ NotificationManager,
8
+ PlaybackNotificationInfo,
9
+ PlaybackControlName,
10
+ PlaybackNotificationEventName,
11
+ NotificationEvents,
12
+ } from '../../system';
13
+
14
+ /// Mock Manager for playback notifications. Does nothing.
15
+ class PlaybackNotificationManager
16
+ implements
17
+ NotificationManager<
18
+ PlaybackNotificationInfo,
19
+ PlaybackNotificationInfo,
20
+ PlaybackNotificationEventName
21
+ >
22
+ {
23
+ private isRegistered = false;
24
+ private isShown = false;
25
+
26
+ constructor() {}
27
+
28
+ async register(): Promise<void> {}
29
+
30
+ async show(info: PlaybackNotificationInfo): Promise<void> {}
31
+
32
+ async update(info: PlaybackNotificationInfo): Promise<void> {}
33
+
34
+ async hide(): Promise<void> {}
35
+
36
+ async unregister(): Promise<void> {}
37
+
38
+ async enableControl(
39
+ control: PlaybackControlName,
40
+ enabled: boolean
41
+ ): Promise<void> {}
42
+
43
+ async isActive(): Promise<boolean> {
44
+ return this.isShown;
45
+ }
46
+
47
+ addEventListener<T extends PlaybackNotificationEventName>(
48
+ eventName: T,
49
+ callback: (event: NotificationEvents[T]) => void
50
+ ): AudioEventSubscription {
51
+ // dummy subscription object with a no-op remove method
52
+ return {
53
+ remove: () => {},
54
+ } as unknown as AudioEventSubscription;
55
+ }
56
+
57
+ removeEventListener(subscription: AudioEventSubscription): void {}
58
+ }
59
+
60
+ export default new PlaybackNotificationManager();
@@ -0,0 +1,60 @@
1
+ /* eslint-disable @typescript-eslint/no-unused-vars */
2
+ /* eslint-disable no-useless-constructor */
3
+ /* eslint-disable @typescript-eslint/require-await */
4
+
5
+ import type { AudioEventSubscription } from '../../events';
6
+ import type {
7
+ NotificationManager,
8
+ RecordingNotificationInfo,
9
+ RecordingControlName,
10
+ RecordingNotificationEventName,
11
+ NotificationEvents,
12
+ } from '../../system';
13
+
14
+ /// Mock Manager for recording notifications. Does nothing.
15
+ class RecordingNotificationManager
16
+ implements
17
+ NotificationManager<
18
+ RecordingNotificationInfo,
19
+ RecordingNotificationInfo,
20
+ RecordingNotificationEventName
21
+ >
22
+ {
23
+ private isRegistered = false;
24
+ private isShown = false;
25
+
26
+ constructor() {}
27
+
28
+ async register(): Promise<void> {}
29
+
30
+ async show(info: RecordingNotificationInfo): Promise<void> {}
31
+
32
+ async update(info: RecordingNotificationInfo): Promise<void> {}
33
+
34
+ async hide(): Promise<void> {}
35
+
36
+ async unregister(): Promise<void> {}
37
+
38
+ async enableControl(
39
+ control: RecordingControlName,
40
+ enabled: boolean
41
+ ): Promise<void> {}
42
+
43
+ async isActive(): Promise<boolean> {
44
+ return this.isShown;
45
+ }
46
+
47
+ addEventListener<T extends RecordingNotificationEventName>(
48
+ eventName: T,
49
+ callback: (event: NotificationEvents[T]) => void
50
+ ): AudioEventSubscription {
51
+ // dummy subscription object with a no-op remove method
52
+ return {
53
+ remove: () => {},
54
+ } as unknown as AudioEventSubscription;
55
+ }
56
+
57
+ removeEventListener(subscription: AudioEventSubscription): void {}
58
+ }
59
+
60
+ export default new RecordingNotificationManager();
@@ -0,0 +1,2 @@
1
+ export { default as PlaybackNotificationManager } from './PlaybackNotificationManager';
2
+ export { default as RecordingNotificationManager } from './RecordingNotificationManager';