RTCMultiConnection not working as expected, Help


#1

Hi everyone,

I am using RTC multiiconnection library for video chat integration in my chatting app. I added the package and start using as per the guidelines and finally, I came out with a solution like this


<template name="test">
<script src="./node_modules/rtcmulticonnection/RTCMultiConnection.js"></script>
<button id="btn-open-room">Open Room</button>
<button id="btn-join-room">Join Room</button><hr>
<script type="text/javascript">
	var connection = new RTCMultiConnection();
connection.socketURL = 'https://rtcmulticonnection.herokuapp.com:443/';

connection.session = {
    audio: true,
    video: true
};

connection.sdpConstraints.mandatory = {
    OfferToReceiveAudio: true,
    OfferToReceiveVideo: true
};

connection.onstream = function(event) {
    document.body.appendChild( event.mediaElement );

};
document.getElementById('btn-open-room').onclick = function() {
connection.open("predefinedRoomId");
    this.disabled = true;
};

document.getElementById('btn-join-room').onclick = function() {
    this.disabled = true;
    connection.join("predefinedRoomId");
};
</script>
</template>

I upload this script on live server and it runs, great. But the problem occurs when chatrooms are generated and the same id passed from the DB and after that when joining the chatroom created by other person over the chat I got message
Session-Descriptions not found. Rechecking..
and its in a never ending loop. The video does not ends when accepting request from other person. Please help anyhelp would be greatly appreciated