[jitsi-users] Web RTC app + videobridge


#1

Hi guys,

i want to use jitsi videobridge over rest api for my application.
Web application (will use Web RTC here) needs to perform 1 (+1 optional)
to many (up to max 50 participants) video calls so this every client will
at tops receive 2 video and 2 audio streams.
Participants will only receive video and audio steam, but also can join in
video call. At given time one person will always transmit 1 audio and 1
video stream.
One of 50 participants can join video call. At given time max 2 persons can
broadcast their video and auto to rest of participants.
I have in place my custom signaling (JSON + websocket).

I have installed jitsi videobridge as external component on openfire and
confirmed that it works.
My question is how to connect to jitsi videobridge using rest api and
control such video call using it?

P.S: I'm pretty new to Web RTC and don't know what to do with videobridge
response in this form:

{
  "contents": [
    {
      "channels": [
        {
          "sources": [
            2185021238
          ],
          "rtp-level-relay-type": "translator",
          "expire": 600,
          "initiator": true,
          "id": "74ce663868ae42e5",
          "transport": {
            "candidates": [
              {
                "generation": 0,
                "component": 1,
                "protocol": "udp",
                "port": 10000,
                "ip": "2001:0:9d38:90d7:2c01:34c4:7277:4d3e",
                "foundation": "1",
                "id": "5085832065d42ab71111f6e4e139ed50737515d1",
                "priority": 2130706431,
                "type": "host",
                "network": 0
              },
              {
                "generation": 0,
                "component": 1,
                "protocol": "udp",
                "port": 10000,
                "ip": "192.168.5.199",
                "foundation": "2",
                "id": "5085832065d42ab71111f6e4e139ed506f8cd8f6",
                "priority": 2130706431,
                "type": "host",
                "network": 0
              },
              {
                "generation": 0,
                "component": 2,
                "protocol": "udp",
                "port": 10001,
                "ip": "2001:0:9d38:90d7:2c01:34c4:7277:4d3e",
                "foundation": "1",
                "id": "5085832065d42ab71111f6e4e139ed5091617c1",
                "priority": 2130706430,
                "type": "host",
                "network": 0
              },
              {
                "generation": 0,
                "component": 2,
                "protocol": "udp",
                "port": 10001,
                "ip": "192.168.5.199",
                "foundation": "2",
                "id": "5085832065d42ab71111f6e4e139ed50365af271",
                "priority": 2130706430,
                "type": "host",
                "network": 0
              }
            ],
            "xmlns": "urn:xmpp:jingle:transports:ice-udp:1",
            "ufrag": "9hgr01a4aqidge",
            "pwd": "71e1mp0e1duuo4oeqr176kgq2u",
            "fingerprints": [
              {
                "fingerprint":
"11:C6:B3:F0:79:72:79:FF:08:E6:62:A4:44:C8:61:1E:EB:3D:8C:2B",
                "hash": "sha-1"
              }
            ]
          },
          "direction": "sendrecv"
        }
      ],
      "name": "audio"
    },
    {
      "channels": [
        {
          "sources": [
            1489688912
          ],
          "rtp-level-relay-type": "translator",
          "expire": 600,
          "initiator": true,
          "id": "2b81c76ee22bb40a",
          "transport": {
            "candidates": [
              {
                "generation": 0,
                "component": 1,
                "protocol": "udp",
                "port": 10002,
                "ip": "2001:0:9d38:90d7:2c01:34c4:7277:4d3e",
                "foundation": "1",
                "id": "5085832065d42ab7c8c9e4d3cb1b62d01a43c4e3",
                "priority": 2130706431,
                "type": "host",
                "network": 0
              },
              {
                "generation": 0,
                "component": 1,
                "protocol": "udp",
                "port": 10002,
                "ip": "192.168.5.199",
                "foundation": "2",
                "id": "5085832065d42ab7c8c9e4d3cb1b62d024754d88",
                "priority": 2130706431,
                "type": "host",
                "network": 0
              },
              {
                "generation": 0,
                "component": 2,
                "protocol": "udp",
                "port": 10003,
                "ip": "2001:0:9d38:90d7:2c01:34c4:7277:4d3e",
                "foundation": "1",
                "id": "5085832065d42ab7c8c9e4d3cb1b62d0449961c7",
                "priority": 2130706430,
                "type": "host",
                "network": 0
              },
              {
                "generation": 0,
                "component": 2,
                "protocol": "udp",
                "port": 10003,
                "ip": "192.168.5.199",
                "foundation": "2",
                "id": "5085832065d42ab7c8c9e4d3cb1b62d075a8a7a7",
                "priority": 2130706430,
                "type": "host",
                "network": 0
              }
            ],
            "xmlns": "urn:xmpp:jingle:transports:ice-udp:1",
            "ufrag": "ahskd1a4aqijn9",
            "pwd": "559fsjtgs1l9tkc2q6muefbavr",
            "fingerprints": [
              {
                "fingerprint":
"DD:65:5B:86:85:A8:15:E6:1D:EA:34:40:30:76:ED:25:1F:7C:9F:55",
                "hash": "sha-1"
              }
            ]
          },
          "direction": "sendrecv"
        }
      ],
      "name": "video"
    }
  ],
  "id": "5085832065d42ab7"
}

Also how to do offer/answer negotiation with videobridge??


#2

Hi,

Have you seen XEP-0340[0]? The REST API uses this protocol, translated to JSON (see [1]).

Regards,
Boris

[0] http://xmpp.org/extensions/xep-0340.html
[1] https://github.com/jitsi/jitsi-videobridge/blob/master/doc/rest-videobridge.md

···

On 17/11/15 07:40, David Juran wrote:

Hi guys,

i want to use jitsi videobridge over rest api for my application.
Web application (will use Web RTC here) needs to perform 1 (+1
optional) to many (up to max 50 participants) video calls so this every
client will at tops receive 2 video and 2 audio streams.
Participants will only receive video and audio steam, but also can join
in video call. At given time one person will always transmit 1 audio and
1 video stream.
One of 50 participants can join video call. At given time max 2 persons
can broadcast their video and auto to rest of participants.
I have in place my custom signaling (JSON + websocket).

I have installed jitsi videobridge as external component on openfire and
confirmed that it works.
My question is how to connect to jitsi videobridge using rest api and
control such video call using it?

P.S: I'm pretty new to Web RTC and don't know what to do with
videobridge response in this form:

{
   "contents": [
     {
       "channels": [
         {
           "sources": [
             2185021238
           ],
           "rtp-level-relay-type": "translator",
           "expire": 600,
           "initiator": true,
           "id": "74ce663868ae42e5",
           "transport": {
             "candidates": [
               {
                 "generation": 0,
                 "component": 1,
                 "protocol": "udp",
                 "port": 10000,
                 "ip": "2001:0:9d38:90d7:2c01:34c4:7277:4d3e",
                 "foundation": "1",
                 "id": "5085832065d42ab71111f6e4e139ed50737515d1",
                 "priority": 2130706431,
                 "type": "host",
                 "network": 0
               },
               {
                 "generation": 0,
                 "component": 1,
                 "protocol": "udp",
                 "port": 10000,
                 "ip": "192.168.5.199",
                 "foundation": "2",
                 "id": "5085832065d42ab71111f6e4e139ed506f8cd8f6",
                 "priority": 2130706431,
                 "type": "host",
                 "network": 0
               },
               {
                 "generation": 0,
                 "component": 2,
                 "protocol": "udp",
                 "port": 10001,
                 "ip": "2001:0:9d38:90d7:2c01:34c4:7277:4d3e",
                 "foundation": "1",
                 "id": "5085832065d42ab71111f6e4e139ed5091617c1",
                 "priority": 2130706430,
                 "type": "host",
                 "network": 0
               },
               {
                 "generation": 0,
                 "component": 2,
                 "protocol": "udp",
                 "port": 10001,
                 "ip": "192.168.5.199",
                 "foundation": "2",
                 "id": "5085832065d42ab71111f6e4e139ed50365af271",
                 "priority": 2130706430,
                 "type": "host",
                 "network": 0
               }
             ],
             "xmlns": "urn:xmpp:jingle:transports:ice-udp:1",
             "ufrag": "9hgr01a4aqidge",
             "pwd": "71e1mp0e1duuo4oeqr176kgq2u",
             "fingerprints": [
               {
                 "fingerprint":
"11:C6:B3:F0:79:72:79:FF:08:E6:62:A4:44:C8:61:1E:EB:3D:8C:2B",
                 "hash": "sha-1"
               }
             ]
           },
           "direction": "sendrecv"
         }
       ],
       "name": "audio"
     },
     {
       "channels": [
         {
           "sources": [
             1489688912
           ],
           "rtp-level-relay-type": "translator",
           "expire": 600,
           "initiator": true,
           "id": "2b81c76ee22bb40a",
           "transport": {
             "candidates": [
               {
                 "generation": 0,
                 "component": 1,
                 "protocol": "udp",
                 "port": 10002,
                 "ip": "2001:0:9d38:90d7:2c01:34c4:7277:4d3e",
                 "foundation": "1",
                 "id": "5085832065d42ab7c8c9e4d3cb1b62d01a43c4e3",
                 "priority": 2130706431,
                 "type": "host",
                 "network": 0
               },
               {
                 "generation": 0,
                 "component": 1,
                 "protocol": "udp",
                 "port": 10002,
                 "ip": "192.168.5.199",
                 "foundation": "2",
                 "id": "5085832065d42ab7c8c9e4d3cb1b62d024754d88",
                 "priority": 2130706431,
                 "type": "host",
                 "network": 0
               },
               {
                 "generation": 0,
                 "component": 2,
                 "protocol": "udp",
                 "port": 10003,
                 "ip": "2001:0:9d38:90d7:2c01:34c4:7277:4d3e",
                 "foundation": "1",
                 "id": "5085832065d42ab7c8c9e4d3cb1b62d0449961c7",
                 "priority": 2130706430,
                 "type": "host",
                 "network": 0
               },
               {
                 "generation": 0,
                 "component": 2,
                 "protocol": "udp",
                 "port": 10003,
                 "ip": "192.168.5.199",
                 "foundation": "2",
                 "id": "5085832065d42ab7c8c9e4d3cb1b62d075a8a7a7",
                 "priority": 2130706430,
                 "type": "host",
                 "network": 0
               }
             ],
             "xmlns": "urn:xmpp:jingle:transports:ice-udp:1",
             "ufrag": "ahskd1a4aqijn9",
             "pwd": "559fsjtgs1l9tkc2q6muefbavr",
             "fingerprints": [
               {
                 "fingerprint":
"DD:65:5B:86:85:A8:15:E6:1D:EA:34:40:30:76:ED:25:1F:7C:9F:55",
                 "hash": "sha-1"
               }
             ]
           },
           "direction": "sendrecv"
         }
       ],
       "name": "video"
     }
   ],
   "id": "5085832065d42ab7"
}

Also how to do offer/answer negotiation with videobridge??

_______________________________________________
users mailing list
users@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/users


#3

Hi Boris,

thanks for links. When i try to update channel with SDP data for example
this:
POST /colibiri/conferences/cae2c4e108e1e29a with following data
http://pastebin.com/TSA9Myeu server error is thrown (500)
also when creating channels using same JSON above without ids
http://pastebin.com/N54vPQHB it completely ignores payload-types and
direction
I might be doing something wrong so can you provide full JSON format in
case i'm translating xep-0340 to JSON in wrong way

Can you confirm this is also good order of actions (for rest api) when new
participant wants to join conference:
1. Allocate new channel for that participant with PATCH
/colibri/conferences/{id} providing audio and video channels without id
2. Update newly created channels with SDP data from participant (payload
types + DTLS/SRTP fingerprints)

Regards,
David

···

On Tue, Nov 17, 2015 at 6:22 PM, Boris Grozev <boris@jitsi.org> wrote:

Hi,

Have you seen XEP-0340[0]? The REST API uses this protocol, translated to
JSON (see [1]).

Regards,
Boris

[0] http://xmpp.org/extensions/xep-0340.html
[1]
https://github.com/jitsi/jitsi-videobridge/blob/master/doc/rest-videobridge.md

On 17/11/15 07:40, David Juran wrote:

Hi guys,

i want to use jitsi videobridge over rest api for my application.
Web application (will use Web RTC here) needs to perform 1 (+1
optional) to many (up to max 50 participants) video calls so this every
client will at tops receive 2 video and 2 audio streams.
Participants will only receive video and audio steam, but also can join
in video call. At given time one person will always transmit 1 audio and
1 video stream.
One of 50 participants can join video call. At given time max 2 persons
can broadcast their video and auto to rest of participants.
I have in place my custom signaling (JSON + websocket).

I have installed jitsi videobridge as external component on openfire and
confirmed that it works.
My question is how to connect to jitsi videobridge using rest api and
control such video call using it?

P.S: I'm pretty new to Web RTC and don't know what to do with
videobridge response in this form:

{
   "contents": [
     {
       "channels": [
         {
           "sources": [
             2185021238
           ],
           "rtp-level-relay-type": "translator",
           "expire": 600,
           "initiator": true,
           "id": "74ce663868ae42e5",
           "transport": {
             "candidates": [
               {
                 "generation": 0,
                 "component": 1,
                 "protocol": "udp",
                 "port": 10000,
                 "ip": "2001:0:9d38:90d7:2c01:34c4:7277:4d3e",
                 "foundation": "1",
                 "id": "5085832065d42ab71111f6e4e139ed50737515d1",
                 "priority": 2130706431,
                 "type": "host",
                 "network": 0
               },
               {
                 "generation": 0,
                 "component": 1,
                 "protocol": "udp",
                 "port": 10000,
                 "ip": "192.168.5.199",
                 "foundation": "2",
                 "id": "5085832065d42ab71111f6e4e139ed506f8cd8f6",
                 "priority": 2130706431,
                 "type": "host",
                 "network": 0
               },
               {
                 "generation": 0,
                 "component": 2,
                 "protocol": "udp",
                 "port": 10001,
                 "ip": "2001:0:9d38:90d7:2c01:34c4:7277:4d3e",
                 "foundation": "1",
                 "id": "5085832065d42ab71111f6e4e139ed5091617c1",
                 "priority": 2130706430,
                 "type": "host",
                 "network": 0
               },
               {
                 "generation": 0,
                 "component": 2,
                 "protocol": "udp",
                 "port": 10001,
                 "ip": "192.168.5.199",
                 "foundation": "2",
                 "id": "5085832065d42ab71111f6e4e139ed50365af271",
                 "priority": 2130706430,
                 "type": "host",
                 "network": 0
               }
             ],
             "xmlns": "urn:xmpp:jingle:transports:ice-udp:1",
             "ufrag": "9hgr01a4aqidge",
             "pwd": "71e1mp0e1duuo4oeqr176kgq2u",
             "fingerprints": [
               {
                 "fingerprint":
"11:C6:B3:F0:79:72:79:FF:08:E6:62:A4:44:C8:61:1E:EB:3D:8C:2B",
                 "hash": "sha-1"
               }
             ]
           },
           "direction": "sendrecv"
         }
       ],
       "name": "audio"
     },
     {
       "channels": [
         {
           "sources": [
             1489688912
           ],
           "rtp-level-relay-type": "translator",
           "expire": 600,
           "initiator": true,
           "id": "2b81c76ee22bb40a",
           "transport": {
             "candidates": [
               {
                 "generation": 0,
                 "component": 1,
                 "protocol": "udp",
                 "port": 10002,
                 "ip": "2001:0:9d38:90d7:2c01:34c4:7277:4d3e",
                 "foundation": "1",
                 "id": "5085832065d42ab7c8c9e4d3cb1b62d01a43c4e3",
                 "priority": 2130706431,
                 "type": "host",
                 "network": 0
               },
               {
                 "generation": 0,
                 "component": 1,
                 "protocol": "udp",
                 "port": 10002,
                 "ip": "192.168.5.199",
                 "foundation": "2",
                 "id": "5085832065d42ab7c8c9e4d3cb1b62d024754d88",
                 "priority": 2130706431,
                 "type": "host",
                 "network": 0
               },
               {
                 "generation": 0,
                 "component": 2,
                 "protocol": "udp",
                 "port": 10003,
                 "ip": "2001:0:9d38:90d7:2c01:34c4:7277:4d3e",
                 "foundation": "1",
                 "id": "5085832065d42ab7c8c9e4d3cb1b62d0449961c7",
                 "priority": 2130706430,
                 "type": "host",
                 "network": 0
               },
               {
                 "generation": 0,
                 "component": 2,
                 "protocol": "udp",
                 "port": 10003,
                 "ip": "192.168.5.199",
                 "foundation": "2",
                 "id": "5085832065d42ab7c8c9e4d3cb1b62d075a8a7a7",
                 "priority": 2130706430,
                 "type": "host",
                 "network": 0
               }
             ],
             "xmlns": "urn:xmpp:jingle:transports:ice-udp:1",
             "ufrag": "ahskd1a4aqijn9",
             "pwd": "559fsjtgs1l9tkc2q6muefbavr",
             "fingerprints": [
               {
                 "fingerprint":
"DD:65:5B:86:85:A8:15:E6:1D:EA:34:40:30:76:ED:25:1F:7C:9F:55",
                 "hash": "sha-1"
               }
             ]
           },
           "direction": "sendrecv"
         }
       ],
       "name": "video"
     }
   ],
   "id": "5085832065d42ab7"
}

Also how to do offer/answer negotiation with videobridge??

_______________________________________________
users mailing list
users@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/users

_______________________________________________
users mailing list
users@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/users