(tl;dr: i need a bot to join a videosdk web session and play an audio file)
I am building an interview client where I want the interviewer to be a bot that joins independently when a session is started by a user. I do not mind whether the bot joins from server side or client side logic. I want the bot to play audio programmatically that the user can listen to + appears in cloud recording. I have tried to do this from the frontend by ZoomVideo.createClient() separately for the bot, joining the session, and then playing audio/video through getVideoMediaPlaybackController() and getAudioMediaPlaybackController(). However when the audio/video playback from the bot starts, it disconnects video and audio from the real user.
Will I be able to broadcast audio from the server with the Linux SDK to the same frontend session (with the real users) that uses VideoSDK web?
Also, is there any alternate approach without explicitly creating a bot from the server? Any way to programmatically play audio in a session without joining it as a different user?
This isn’t possible without creating another user at the moment. You can however create a “bot” user that join and plays the audio and hide that “bot” user in the UI by not rendering their video tile/placeholder.
The other consideration is using startAudio function with AudioOption property mediaFile set as an audio output. This should be captured as part of cloud recordings as well.
Hi Jenzus. Thanks for the suggestion, but I’ve found it doesn’t work for my use case - when I run startAudio with mediaFile, it disconnects the user’s microphone audio, which I do not want.
Hi Omar - It sounds like you’re working on a really exciting use case! The issue you’re experiencing might be due to how Zoom handles media streams and playback controllers in the client SDK, which can cause conflicts when attempting simultaneous playback and recording from multiple instances.
One potential solution is to have the bot join the session server-side. By handling the bot’s media streams programmatically on the server, you can avoid the limitations of client-side playback. This way, the bot can play audio, participate in the session, and be included in the cloud recording without disrupting the real user’s connection.
We built ChatterBox [dot]io which is a Zoom Bot API service specifically designed to handle scenarios like this. It allows bots to join meetings independently to send and receive data in real-time. It might save you some time and effort.