BlueCam Javascript Library | BlueCam.js

JoinRoom

Javascript
JoinRoom({
	localVideo:'localVideo',
	remoteVideo:'remoteVideo',
	roomName:'roomId',
	userId:userId,
	muteAudioBtn:$('#muteAudioBtn'),
	muteVideoBtn:$('#muteVideoBtn'),
	callBtn:$(".callPeerBtn"),
	onMessage: function(type, data) {
		if(type == "sharedLink") {
			//Custom message handlers for peer-to-peer communication
			alert("A link was shared with you to: " + data);
		}
	},
	signalMethod:signalingType,
	pubnubSubscribeKey:pubnubSubscribeKey,
	pubnubPublishKey:pubnubPublishKey,
	roomNotFoundCallback: function() {
		
	}
});

JoinRoom Options

localVideo Video id or HTML Element from getElementById
remoteVideo Video id or HTML Element from getElementById
userId string: The system specific userID
roomName The BlueCam room id from CreateRoom
muteAudioBtn jQuery Element(s)
muteVideoBtn jQuery Element(s)
onMessage() function(type, msg) { … }
roomNotFound() function() { … }

Methods:

sendMessage() Sends text or JSON data to the other peer
muteMyVideo() Ensures all video tracks are disabled, “Muted” (to both parties)
unmuteMyVideo() Ensures all video tracks are enabled, “UnMuted” (to both parties)
muteMyAudio() Ensures all audio tracks are disabled “Muted” (to both parties)
unmuteMyAudio() Ensures all audio tracks are enabled “UnMuted” (to both parties)
offScreen(el) is el off screen? If yes, which side(s) is it off
detectWebRTCSupport() Which WebRTC features does this browser support
detectBrowser() What browser is being used to access the page
BlueCam