i have an project in agora with the app certificate enabled.
the problem is , if i set the role in the RtcTokenBuilder to RtcRole.SUBSCRIBER and then set it to "host" in AgoraRTC.createClient on the client , then the client we be able to publish video and audio like i host .
and vice versa if the token has the role of PUBLISHER, and the client has the role of "audience" it will throw an error when i try to publish video or audio.
Uncaught (in promise) i {name: "AgoraRTCException", code: "INVALID_OPERATION", message: "AgoraRTCError INVALID_OPERATION: audience can not publish stream", data: undefined
it should be there other way around.
token server : "agora-access-token": "^2.0.4"
client : "agora-rtc-sdk-ng": "^0.1.9"
i have an project in agora with the app certificate enabled.
the problem is , if i set the
rolein theRtcTokenBuildertoRtcRole.SUBSCRIBERand then set it to"host"inAgoraRTC.createClienton the client , then the client we be able to publish video and audio like ihost.and vice versa if the token has the role of
PUBLISHER, and the client has the role of"audience"it will throw an error when i try to publish video or audio.it should be there other way around.
token server :
"agora-access-token": "^2.0.4"client :
"agora-rtc-sdk-ng": "^0.1.9"