jitsi / lib-jitsi-meet

A low-level JS video API that allows adding a completely custom video experience to web apps.
Apache License 2.0
1.34k stars 1.11k forks source link

Can not Join Conference #1115

Closed Pinank closed 4 years ago

Pinank commented 4 years ago

I'm trying to join a conference using following block, but it didn't worked.

Js file

/* global $, JitsiMeetJS */

let connection;

const options = {
    hosts: {
        domain: 'meet.jit.si',
    },
};
const confOptions = {
    openBridgeChannel: true
};

JitsiMeetJS.init();
connection = new JitsiMeetJS.JitsiConnection(null, null, options);

function onConnectionSuccess() {
    console.log("onConnectionSuccess")
    const room = connection.initJitsiConference("TestDemo1234567890", confOptions);
    room.on(JitsiMeetJS.events.conference.TRACK_ADDED, onRemoteTrack);
    room.on(JitsiMeetJS.events.conference.CONFERENCE_JOINED, onConferenceJoined);
    room.join();
}

function onConnectionFailed() {
    console.log("onConnectionFailed")
}

function disconnect() {
    console.log("disconnect")
}

function onRemoteTrack() {
    console.log("onRemoteTrack")
}

function onConferenceJoined() {
    console.log("onConferenceJoined")
}

connection.addEventListener(
    JitsiMeetJS.events.connection.CONNECTION_ESTABLISHED,
    onConnectionSuccess);
connection.addEventListener(
    JitsiMeetJS.events.connection.CONNECTION_FAILED,
    onConnectionFailed);
connection.addEventListener(
    JitsiMeetJS.events.connection.CONNECTION_DISCONNECTED,
    disconnect);
connection.connect();

JitsiMeetJS.createLocalTracks().then(onLocalTracks);

HTML File


<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <script src="../libs/jquery-2.1.1.min.js"></script>
    <script src="../libs/strophe/strophe.js"></script>
    <script src="../libs/strophe/strophe.disco.min.js?v=1"></script>
    <script src="../libs/lib-jitsi-meet.min.js"></script>
    <script src="example1.js"></script>
</head>
</html>

It shows camera has turn on but nothing views on window. Also i checked on https://meet.jit.si/TestDemo1234567890 but it's not showing any used joined.

I am getting no ref doc. Also there are no reference for how its getting attached in html. I have to use this in angular9 If anybody knows how to resolve it, than please help me out.

ozaretskii commented 3 years ago

hi, did you find solution?