Skip to content

Instantly share code, notes, and snippets.

@digitallysavvy
Created July 23, 2019 21:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save digitallysavvy/fd1c3eaae7bae81758a16b6de5a864ba to your computer and use it in GitHub Desktop.
Save digitallysavvy/fd1c3eaae7bae81758a16b6de5a864ba to your computer and use it in GitHub Desktop.
Example snippets for setting the audience client role in a Agora broadcast scenario
// create audience client and set the client role
var audienceClient = AgoraRTC.createClient({mode: 'live', codec: 'vp8'});
audienceClient.setClientRole('audience', function() {
console.log('Client role set to audience');
}, function(e) {
console.log('setClientRole failed', e);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment