Skip to content

Instantly share code, notes, and snippets.

@digitallysavvy
Last active July 19, 2019 21:47
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/d72c96c478c5720c0b5b368ac4af4432 to your computer and use it in GitHub Desktop.
Save digitallysavvy/d72c96c478c5720c0b5b368ac4af4432 to your computer and use it in GitHub Desktop.
function to add remote stream div
// REMOTE STREAMS UI
function addRemoteStreamMiniView(remoteStream){
var streamId = remoteStream.getId();
// append the remote stream template to #remote-streams
$('#remote-streams').append(
$('<div/>', {'id': streamId + '_container', 'class': 'remote-stream-container col'}).append(
$('<div/>', {'id': streamId + '_mute', 'class': 'mute-overlay'}).append(
$('<i/>', {'class': 'fas fa-microphone-slash'})
),
$('<div/>', {'id': streamId + '_no-video', 'class': 'no-video-overlay text-center'}).append(
$('<i/>', {'class': 'fas fa-user'})
),
$('<div/>', {'id': 'agora_remote_' + streamId, 'class': 'remote-video'})
)
);
remoteStream.play('agora_remote_' + streamId);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment