audioq 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +486 -0
- package/dist/core.d.ts +129 -0
- package/dist/core.js +591 -0
- package/dist/errors.d.ts +138 -0
- package/dist/errors.js +441 -0
- package/dist/events.d.ts +81 -0
- package/dist/events.js +217 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +119 -0
- package/dist/info.d.ts +224 -0
- package/dist/info.js +529 -0
- package/dist/pause.d.ts +170 -0
- package/dist/pause.js +467 -0
- package/dist/queue-manipulation.d.ts +104 -0
- package/dist/queue-manipulation.js +319 -0
- package/dist/types.d.ts +382 -0
- package/dist/types.js +55 -0
- package/dist/utils.d.ts +83 -0
- package/dist/utils.js +215 -0
- package/dist/volume.d.ts +162 -0
- package/dist/volume.js +644 -0
- package/dist/web-audio.d.ts +156 -0
- package/dist/web-audio.js +327 -0
- package/package.json +63 -0
- package/src/core.ts +698 -0
- package/src/errors.ts +467 -0
- package/src/events.ts +252 -0
- package/src/index.ts +162 -0
- package/src/info.ts +590 -0
- package/src/pause.ts +523 -0
- package/src/queue-manipulation.ts +378 -0
- package/src/types.ts +415 -0
- package/src/utils.ts +235 -0
- package/src/volume.ts +735 -0
- package/src/web-audio.ts +331 -0
package/src/index.ts
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Main entry point for the audioq package
|
|
3
|
+
* Exports all public functions and types for audio queue management, pause/resume controls,
|
|
4
|
+
* volume management with ducking, progress tracking, and comprehensive event system
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
// Core queue management functions
|
|
8
|
+
export {
|
|
9
|
+
queueAudio,
|
|
10
|
+
queueAudioPriority,
|
|
11
|
+
stopCurrentAudioInChannel,
|
|
12
|
+
stopAllAudioInChannel,
|
|
13
|
+
stopAllAudio,
|
|
14
|
+
playAudioQueue,
|
|
15
|
+
destroyChannel,
|
|
16
|
+
destroyAllChannels,
|
|
17
|
+
setQueueConfig,
|
|
18
|
+
getQueueConfig,
|
|
19
|
+
setChannelQueueLimit
|
|
20
|
+
} from './core';
|
|
21
|
+
|
|
22
|
+
// Queue manipulation functions
|
|
23
|
+
export {
|
|
24
|
+
clearQueueAfterCurrent,
|
|
25
|
+
getQueueItemInfo,
|
|
26
|
+
getQueueLength,
|
|
27
|
+
removeQueuedItem,
|
|
28
|
+
reorderQueue,
|
|
29
|
+
swapQueueItems
|
|
30
|
+
} from './queue-manipulation';
|
|
31
|
+
|
|
32
|
+
// Error handling and recovery functions
|
|
33
|
+
export {
|
|
34
|
+
getErrorRecovery,
|
|
35
|
+
getRetryConfig,
|
|
36
|
+
offAudioError,
|
|
37
|
+
onAudioError,
|
|
38
|
+
retryFailedAudio,
|
|
39
|
+
setErrorRecovery,
|
|
40
|
+
setRetryConfig
|
|
41
|
+
} from './errors';
|
|
42
|
+
|
|
43
|
+
// Pause and resume management functions
|
|
44
|
+
export {
|
|
45
|
+
getAllChannelsPauseState,
|
|
46
|
+
isChannelPaused,
|
|
47
|
+
pauseAllChannels,
|
|
48
|
+
pauseAllWithFade,
|
|
49
|
+
pauseChannel,
|
|
50
|
+
pauseWithFade,
|
|
51
|
+
resumeAllChannels,
|
|
52
|
+
resumeAllWithFade,
|
|
53
|
+
resumeChannel,
|
|
54
|
+
resumeWithFade,
|
|
55
|
+
togglePauseAllChannels,
|
|
56
|
+
togglePauseAllWithFade,
|
|
57
|
+
togglePauseChannel,
|
|
58
|
+
togglePauseWithFade
|
|
59
|
+
} from './pause';
|
|
60
|
+
|
|
61
|
+
// Volume control and ducking functions
|
|
62
|
+
export {
|
|
63
|
+
cancelAllVolumeTransitions,
|
|
64
|
+
cancelVolumeTransition,
|
|
65
|
+
clearVolumeDucking,
|
|
66
|
+
getAllChannelsVolume,
|
|
67
|
+
getChannelVolume,
|
|
68
|
+
getFadeConfig,
|
|
69
|
+
getGlobalVolume,
|
|
70
|
+
setAllChannelsVolume,
|
|
71
|
+
setChannelVolume,
|
|
72
|
+
setGlobalVolume,
|
|
73
|
+
setVolumeDucking,
|
|
74
|
+
transitionVolume
|
|
75
|
+
} from './volume';
|
|
76
|
+
|
|
77
|
+
// Web Audio API support functions
|
|
78
|
+
export {
|
|
79
|
+
cleanupWebAudioNodes,
|
|
80
|
+
createWebAudioNodes,
|
|
81
|
+
getAudioContext,
|
|
82
|
+
getWebAudioConfig,
|
|
83
|
+
getWebAudioSupport,
|
|
84
|
+
getWebAudioVolume,
|
|
85
|
+
isIOSDevice,
|
|
86
|
+
isWebAudioSupported,
|
|
87
|
+
resumeAudioContext,
|
|
88
|
+
setWebAudioConfig,
|
|
89
|
+
setWebAudioVolume,
|
|
90
|
+
shouldUseWebAudio
|
|
91
|
+
} from './web-audio';
|
|
92
|
+
|
|
93
|
+
// Audio information and progress tracking functions
|
|
94
|
+
export {
|
|
95
|
+
getAllChannelsInfo,
|
|
96
|
+
getCurrentAudioInfo,
|
|
97
|
+
getQueueSnapshot,
|
|
98
|
+
offAudioComplete,
|
|
99
|
+
offAudioPause,
|
|
100
|
+
offAudioProgress,
|
|
101
|
+
offAudioResume,
|
|
102
|
+
offAudioStart,
|
|
103
|
+
offQueueChange,
|
|
104
|
+
onAudioComplete,
|
|
105
|
+
onAudioPause,
|
|
106
|
+
onAudioProgress,
|
|
107
|
+
onAudioResume,
|
|
108
|
+
onAudioStart,
|
|
109
|
+
onQueueChange
|
|
110
|
+
} from './info';
|
|
111
|
+
|
|
112
|
+
// Core data access for legacy compatibility
|
|
113
|
+
export { audioChannels } from './info';
|
|
114
|
+
|
|
115
|
+
// Utility helper functions
|
|
116
|
+
export {
|
|
117
|
+
cleanWebpackFilename,
|
|
118
|
+
createQueueSnapshot,
|
|
119
|
+
extractFileName,
|
|
120
|
+
getAudioInfoFromElement,
|
|
121
|
+
sanitizeForDisplay,
|
|
122
|
+
validateAudioUrl
|
|
123
|
+
} from './utils';
|
|
124
|
+
|
|
125
|
+
// TypeScript type definitions and interfaces
|
|
126
|
+
export type {
|
|
127
|
+
AudioCompleteCallback,
|
|
128
|
+
AudioCompleteInfo,
|
|
129
|
+
AudioErrorCallback,
|
|
130
|
+
AudioErrorInfo,
|
|
131
|
+
AudioInfo,
|
|
132
|
+
AudioPauseCallback,
|
|
133
|
+
AudioQueueOptions,
|
|
134
|
+
AudioResumeCallback,
|
|
135
|
+
AudioStartCallback,
|
|
136
|
+
AudioStartInfo,
|
|
137
|
+
ChannelFadeState,
|
|
138
|
+
ErrorRecoveryOptions,
|
|
139
|
+
ExtendedAudioQueueChannel,
|
|
140
|
+
FadeConfig,
|
|
141
|
+
ProgressCallback,
|
|
142
|
+
QueueChangeCallback,
|
|
143
|
+
QueueConfig,
|
|
144
|
+
QueueItem,
|
|
145
|
+
QueueManipulationResult,
|
|
146
|
+
QueueSnapshot,
|
|
147
|
+
RetryConfig,
|
|
148
|
+
VolumeConfig,
|
|
149
|
+
WebAudioConfig,
|
|
150
|
+
WebAudioNodeSet,
|
|
151
|
+
WebAudioSupport
|
|
152
|
+
} from './types';
|
|
153
|
+
|
|
154
|
+
// Enums and constants
|
|
155
|
+
export {
|
|
156
|
+
AudioErrorType,
|
|
157
|
+
EasingType,
|
|
158
|
+
FadeType,
|
|
159
|
+
MAX_CHANNELS,
|
|
160
|
+
TimerType,
|
|
161
|
+
GLOBAL_PROGRESS_KEY
|
|
162
|
+
} from './types';
|