/ fm / liveswitch / WssWorkletAudioPlayer
Class: WssWorkletAudioPlayer
fm.liveswitch.WssWorkletAudioPlayer
Table of contents
Constructors
Methods
- addModule
- appendToJitterBuffer
- awaitAudioWorklet
- captureAudioBufferDuration
- 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:47
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:101
appendToJitterBuffer
▸ appendToJitterBuffer(audioBuffer
: Float32Array): void
Parameters:
Name | Type |
---|---|
audioBuffer |
Float32Array |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WssWorkletAudioPlayer.ts:226
awaitAudioWorklet
▸ Private
awaitAudioWorklet(): Promise<Object>
Returns: Promise<Object>
Defined in: Generated/TypeScript/fm.liveswitch/WssWorkletAudioPlayer.ts:80
captureAudioBufferDuration
▸ Private
captureAudioBufferDuration(audioBufferDuration
: number): void
Parameters:
Name | Type |
---|---|
audioBufferDuration |
number |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WssWorkletAudioPlayer.ts:161
clearBuffer
▸ clearBuffer(): void
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WssWorkletAudioPlayer.ts:240
connectAudioNodes
▸ Private
connectAudioNodes(): void
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WssWorkletAudioPlayer.ts:173
disconnectAudioNodes
▸ Private
disconnectAudioNodes(): void
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WssWorkletAudioPlayer.ts:186
doPause
▸ doPause(pClearBufferedAudioFlag?
: boolean): void
Parameters:
Name | Type | Default value |
---|---|---|
pClearBufferedAudioFlag |
boolean | true |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WssWorkletAudioPlayer.ts:210
doPlay
▸ doPlay(): void
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WssWorkletAudioPlayer.ts:198
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:69
initializeAudioPlayer
▸ initializeAudioPlayer(messagePort
: MessagePort, jitterBufferSize
: number): MediaStream
Parameters:
Name | Type |
---|---|
messagePort |
MessagePort |
jitterBufferSize |
number |
Returns: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/WssWorkletAudioPlayer.ts:56
setVolume
▸ setVolume(pInputVolume
: number): void
Parameters:
Name | Type |
---|---|
pInputVolume |
number |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WssWorkletAudioPlayer.ts:219
stop
▸ stop(): void
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WssWorkletAudioPlayer.ts:250
createAudioContextIfNeeded
▸ Static
createAudioContextIfNeeded(): void
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WssWorkletAudioPlayer.ts:27
destroyAudioContextIfNotNeeded
▸ Static
destroyAudioContextIfNotNeeded(): void
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/WssWorkletAudioPlayer.ts:34
getAudioContext
▸ Static
getAudioContext(): AudioContext
Returns: AudioContext
Defined in: Generated/TypeScript/fm.liveswitch/WssWorkletAudioPlayer.ts:42