I have a problem when i use plugnMeet. When i try to enter a video call after clicking the microphone it gives me this error:
could not establish pc connection.
I have tried the find from internet or plugnMeet forum if the problem is solved but there is not a concrete solution. In documentation it suggest me as
--config "/app/livekit.yaml" --dev --node-ip YOUR_IP_HERE -- https://www.plugnmeet.org/docs/developer-guide/setup-development/
However, even though i do as it is indicated in documentation the problem persist. Does anyone has a idea what can i do to resolve the problem?
I use ubuntu version 22.04.
I tried to enter the main page of the ideo call. In my code when i comment the part await this._room.connect(this.url, this.token); and try to enter it makes me enter to the main page but as soon as i enter i have to uncomment this part. In this way it works and after entering first time i can enter always without problem. However, it is not a correct way. First time without commenting this part how it is possible to manage this problem.
constructor(
livekitInfo: LivekitInfo,
errorState: Dispatch<IErrorPageProps>,
roomConnectionStatusState: Dispatch<ConnectionStatus>,
) {
super();
this.token = livekitInfo.token;
this.url = livekitInfo.livekit_host;
this.enabledE2EE = livekitInfo.enabledE2EE;
this.errorState = errorState;
this.roomConnectionStatusState = roomConnectionStatusState;
this._e2eeKeyProvider = new ExternalE2EEKeyProvider();
this.handleParticipant = new HandleParticipants(this);
this.handleMediaTracks = new HandleMediaTracks(this);
this.handleDataMessages = new HandleDataMessages(this);
this.handleRoomMetadata = new HandleRoomMetadata(this);
this.handleActiveSpeakers = new HandleActiveSpeakers(this);
this.roomConnectionStatusState('connecting');
// clean session data
sessionStorage.clear();
// configure room
this._room = this.configureRoom();
// finally connect
this.connect();
}
private connect = async () => {
try {
console.log('try to connect')
await this._room.connect(this.url, this.token);
// we'll prepare our information
console.log('try to update session')
await this.updateSession();
console.log('try to initiateParticipants')
await this.initiateParticipants();
// open websocket
openWebsocketConnection();
// finally
this.roomConnectionStatusState('connected');
// start token renew interval
this.startTokenRenewInterval();
} catch (error) {
console.error(error);
this.roomConnectionStatusState('error');
this.errorState({
title: 'Error',
text: String(error),
});
}
};