/ fm / liveswitch / WssWorkletAudioPlayer
Class: WssWorkletAudioPlayer
fm.liveswitch.WssWorkletAudioPlayer
Table of contents
Constructors
Methods
- addModule
- appendToJitterBuffer
- awaitAudioWorklet
- clearBuffer
- connectAudioNodes
- disconnectAudioNodes
- doPause
- doPlay
- initializeAudioNodes
- initializeAudioPlayer
- setVolume
- stop
- createAudioContextIfNeeded
- destroyAudioContextIfNotNeeded
- getAudioContext
Constructors
constructor
+ new WssWorkletAudioPlayer(): WssWorkletAudioPlayer
Returns: WssWorkletAudioPlayer
Defined in: Generated/TypeScript/fm.liveswitch/WssWorkletAudioPlayer.ts:41
Methods
addModule
▸ Private
addModule(messagePort
: MessagePort, jitterBufferSize
: number): void
Parameters:
Name | Type |
---|---|
messagePort |
MessagePort |
jitterBufferSize |
number |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WssWorkletAudioPlayer.ts:93
appendToJitterBuffer
▸ appendToJitterBuffer(audioBuffer
: Float32Array): void
Parameters:
Name | Type |
---|---|
audioBuffer |
Float32Array |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WssWorkletAudioPlayer.ts:202
awaitAudioWorklet
▸ Private
awaitAudioWorklet(): Promise<Object>
Returns: Promise<Object>
Defined in: Generated/TypeScript/fm.liveswitch/WssWorkletAudioPlayer.ts:72
clearBuffer
▸ clearBuffer(): void
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WssWorkletAudioPlayer.ts:216
connectAudioNodes
▸ Private
connectAudioNodes(): void
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WssWorkletAudioPlayer.ts:149
disconnectAudioNodes
▸ Private
disconnectAudioNodes(): void
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WssWorkletAudioPlayer.ts:162
doPause
▸ doPause(pClearBufferedAudioFlag?
: boolean): void
Parameters:
Name | Type | Default value |
---|---|---|
pClearBufferedAudioFlag |
boolean | true |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WssWorkletAudioPlayer.ts:186
doPlay
▸ doPlay(): void
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WssWorkletAudioPlayer.ts:174
initializeAudioNodes
▸ Private
initializeAudioNodes(messagePort
: MessagePort, jitterBufferSize
: number): void
Parameters:
Name | Type |
---|---|
messagePort |
MessagePort |
jitterBufferSize |
number |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WssWorkletAudioPlayer.ts:61
initializeAudioPlayer
▸ initializeAudioPlayer(messagePort
: MessagePort, jitterBufferSize
: number): MediaStream
Parameters:
Name | Type |
---|---|
messagePort |
MessagePort |
jitterBufferSize |
number |
Returns: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/WssWorkletAudioPlayer.ts:48
setVolume
▸ setVolume(pInputVolume
: number): void
Parameters:
Name | Type |
---|---|
pInputVolume |
number |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WssWorkletAudioPlayer.ts:195
stop
▸ stop(): void
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WssWorkletAudioPlayer.ts:226
createAudioContextIfNeeded
▸ Static
createAudioContextIfNeeded(): void
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WssWorkletAudioPlayer.ts:21
destroyAudioContextIfNotNeeded
▸ Static
destroyAudioContextIfNotNeeded(): void
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WssWorkletAudioPlayer.ts:28
getAudioContext
▸ Static
getAudioContext(): AudioContext
Returns: AudioContext
Defined in: Generated/TypeScript/fm.liveswitch/WssWorkletAudioPlayer.ts:36