How to connect to Jitsi Videobridge using Javascript

Viewed 165

Suppose I am able to run Jitsi Videobridge in a Linux server as described here:

https://github.com/jitsi/jitsi-videobridge

And I have a client application (HTML5 and Javascript based), that is, using HTML5 Player that captures and plays web camera video and audio:

$(function () {
    var handleSuccess = function(stream) {

    };
    navigator.mediaDevices.getUserMedia({ audio: true, video: true })
        .then(handleSuccess)
})

How can I send the stream to the Jitsi video bridge and also how other clients can view the stream to their web browsers?

1 Answers

It cannot be directly access via JavaScript. JVB has REST API and it only gives ports for audio/video. We should have signaling server that creates offer with given port in it. Then that offer has to be passed to client via websocket and creates RTCPeerConnection.

Related