Open vikasvyas946 opened 7 years ago
after this code run
// listen custom messages from server
socket.on(connection.socketCustomEvent, function(message)
{
if(message.remoteUserId == connection.userid)
{
if(confirm("You want to join conference ?"))
{
connection.join(message.roomid)
}
else
{
alert("No");
}
}
});
do you receive event connection.onNewParticipant ?
Hello
i added this event and i get undefined participantId here is following code
connection.connectSocket(function(socket)
{
document.getElementById('request').onclick = function()
{
connection.open(roomid);
targetUserId = document.getElementById('sender').value;
var str = targetUserId;
var res = str.split(",");
for(i=0;i<res.length;i++)
{
if(res[i] != "" || typeof res[i] != "undefined")
{
myval = res[i];
var customMessage = 'Join Conference.';
socket.emit(connection.socketCustomEvent,
{
sender: connection.userid,
customMessage: customMessage,
remoteUserId:myval,
roomids: roomid
});
}
}
};
// listen custom messages from server
socket.on(connection.socketCustomEvent, function(message)
{
if(message.remoteUserId == connection.userid)
{
if(confirm("You want to join conference ?"))
{
connection.join(message.roomid)
}
else
{
alert("No");
}
}
});
});
var alreadyAllowed = {};
connection.onNewParticipant = function(participantId, userPreferences) { alert(participantId);
if(alreadyAllowed[participantId]) {
connection.addParticipationRequest(participantId, userPreferences);
return;
}
var message = participantId + ' is trying to join your room. Confirm to accept his request.';
if( window.confirm(messsage ) ) {
connection.addParticipationRequest(participantId, userPreferences);
}
};
hi @vikasvyas946 it's really hard to detect your issue without seeing total your connection configuration.
can you try to put this line of code into the end of your custom onNewParticipant
connection.acceptParticipationRequest(participantId, userPreferences);
idealy, can you checkout newest source code and debug at that line https://github.com/muaz-khan/RTCMultiConnection/blob/master/dist/RTCMultiConnection.js#L224 then console.log the message and post here
Hello
The above link which you given is not working.
Hello
Basically i want to create a skype like web app in this i want to request selected users if they are online then they can get request and if they accept then multiple users can conference each other.
Thanks
sorry, I just update link above, do you have alook at that demo, https://github.com/muaz-khan/RTCMultiConnection/tree/master/demos/MultiRTC/
or you can modify base on that source code to implement your story.
i am following same steps but they cant connect each other can you please help me ?
I still try to investigate what problems firstly I recommend you need to try to run https://rtcmulticonnection.herokuapp.com/demos/MultiRTC/ if it's not run well, prolemns may be your browser
webRTC can not run on ios, safari, please notice that, I never have try run webRTC on linux but may be some distro can not run. I also try run webRTC on chromium on Raspberry but it's not working also.
Hello
Thanks for your reply my question is that why connection.join not working when i am using this on custom socket event if you say then i can create fiddle so you can check what i mistaken
Thanks
Hello
i am working on video conferencing in this i want to send request users to join conference for this i have user V3 version of rtc multiconnection in this i am sending request user by their name here is sample code
After accepting request not connect to each other.
Thanks in advance