API-Examples-Web
API-Examples-Web copied to clipboard
setClientRole not working after joining a channel
Hello all,
if I use client.setClientRole after joining a channel and then use client.publish() it says "AgoraRTCError INVALID_OPERATION: audience can not publish stream";
I think we can use setClientRole after joining as an audience. I am using "agora-rtc-sdk-ng" version "^4.7.0" for Agora SDK. Please help if it is bug or I am doing something wrong.
Thank you in advance
i believe setClientRole is an async function. have you waited till it finished before calling publish?