Hello Sendbird Team,
We are doing trial to make a group call for only voice, followed tutorial on Docs page, but I couldn’t get nice result. There is no output sound at all.
Please comment about code.
Thank you
const TestApp = () => {
SendBirdCall.init('APP ID')
let roomInstance = null
const audioRef = React.useRef()
// SendBirdCall.useMedia()
const authOption = { userINFO }
const enterRoom = async () => {
try {
if (roomInstance) {
await roomInstance.enter({ videoEnabled: false, audioEnabled: true })
await roomInstance.setAudioForLargeRoom(audioRef.current)
}
} catch (err) {
console.log(err)
}
}
const createRoom = async () => {
try {
const roomParams = {
roomType: SendBirdCall.RoomType.LARGE_ROOM_FOR_AUDIO_ONLY
}
const room = await SendBirdCall.createRoom(roomParams)
roomInstance = room
enterRoom()
} catch (err) {
console.log(err)
}
}
SendBirdCall.authenticate(authOption, (result, error) => {
if (error) {
console.log(error)
} else {
createRoom()
}
})
return (
<>
<div>HI</div>
<audio ref={audioRef} playsInline autoPlay controls/>
</>
)
}