Skip to content

Instantly share code, notes, and snippets.

@digitallysavvy
Last active 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/91492d8a22c2ebe405b8bc4a998555a3 to your computer and use it in GitHub Desktop.
Save digitallysavvy/91492d8a22c2ebe405b8bc4a998555a3 to your computer and use it in GitHub Desktop.
Example snippets for setting the broadcast client role in a Agora broadcast scenario
// create broadcaster client and set the client role
var broadcastClient = AgoraRTC.createClient({mode: 'live', codec: 'vp8'});
broadcastClient.setClientRole('host', function() {
console.log('Client role set as host.');
}, 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