client-sdk-js
client-sdk-js copied to clipboard
Prewarm an audio element pool when connecting
This PR
- creates an audio element pool
- tries to play silent audio when connecting and triggers
audioPlaybackFailedif that doesn't work - adds playback of silent pool audio nodes to
startAudio
potentially fixes https://github.com/livekit/client-sdk-js/issues/589, but there are some caveats:
- user still needs to click
startAudiowhen first connecting (also this will fire a lot more now) - only works if users do not supply their own HTML element to the
attachfunction, because we can only use prewarmed elements if we can choose which element it can be