Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Supported platforms and browsers


Chrome

Firefox

Safari 11

Chromium Edge

Windows

+

-


+

Mac OS

+

-

+


Android

+

-


+

iOS

+ (iOS 14.4)

-

+


Supported codecs

WebRTC video:

...

Code Block
themeRDark
codecs_exclude_sfu=alaw,ulaw,g729,speex16,g722,mpeg4-generic,telephone-event,flv,mpv
webrtc_cc_min_bitrate=5000001000000
profiles=42e01f,640028

Note that publishing and playing a number of VP8 streams with a number of encodings requires a client desktop resources. If resources are not enough, H264 should be preferred because a most of browsers support hardware acceleration for H264 encoding/decoding.

Quick testing guide

1. Download latest SFU SDK build, for example 1.0.1.25

Code Block
languagebash
themeRDark
wget https://flashphoner.com/downloads/builds/flashphoner_client/sfu-sdk/flashphoner-sfu-sdk-1.0.1.25-f8ea43bab4924798db5fa63b7b609995360e135b.tar.gz

2. Unpack build archoive on your server

Code Block
languagebash
themeRDark
cd /usr/local/FlashphonerWebCallServer/client2
mkdir sfu
cd sfu
tar -xzf ~/flashphoner-sfu-sdk-1.0.1.25-f8ea43bab4924798db5fa63b7b609995360e135b.tar.gz

3. Open SFU client example in browser, for example https://test1.flashphoner.com:8444/client2/sfu/examples/client/main.html, enter server URL, room name, pin code and user name, then click Enter

42. User1 stream is publishing in ROOM1 room

...

360p encoding publishing stats

53. Open example page in other browser or in another browser window, enter server URL and room parameters as on step 3, but change user name to User2

64. User2 stream is playing in User1 window

...

REST queries and responses

REST query

Body example

Response example

Response statuses

Description

/sfu/stats

Code Block
languagejs
themeRDark
{
 "roomName":"ROOM1"
}
Code Block
languagejs
themeRDark
{
  "participants": [
    {
      "nickName": "User1",
      "outgoingTracks": [
        {
          "id": "9de9107c-ce5f-4d6b-b7d6-ea233d691d09",
          "codec": "opus",
          "bitrate": 0,
          "sampleRate": 48000,
          "channels": 2,
          "alive": true,
          "type": "AUDIO"
        },
        {
          "id": "237dcef9-c66d-4c72-bd43-0c91aaea3b7e",
          "composite": true,
          "tracks": {
            "h send": {
              "id": "237dcef9-c66d-4c72-bd43-0c91aaea3b7e",
              "codec": "H264",
              "width": 1280,
              "height": 720,
              "fps": 30,
              "bitrate": 157976,
              "alive": true,
              "type": "VIDEO"
            },
            "m send": {
              "id": "237dcef9-c66d-4c72-bd43-0c91aaea3b7e",
              "codec": "H264",
              "width": 640,
              "height": 360,
              "fps": 30,
              "bitrate": 263952,
              "alive": true,
              "type": "VIDEO"
            }
          }
        }
      ],
      "incomingTracks": {
        "3c2dcd1c-7acd-4b90-8871-331be80cade0": "h send"
      }
    },
    {
      "nickName": "User2",
      "outgoingTracks": [
        {
          "id": "3c2dcd1c-7acd-4b90-8871-331be80cade0",
          "composite": true,
          "tracks": {
            "h send": {
              "id": "3c2dcd1c-7acd-4b90-8871-331be80cade0",
              "codec": "H264",
              "width": 1280,
              "height": 720,
              "fps": 30,
              "bitrate": 238688,
              "alive": true,
              "type": "VIDEO"
            },
            "m send": {
              "id": "3c2dcd1c-7acd-4b90-8871-331be80cade0",
              "codec": "H264",
              "width": 640,
              "height": 360,
              "fps": 30,
              "bitrate": 265368,
              "alive": true,
              "type": "VIDEO"
            }
          }
        }
      ],
      "incomingTracks": {
        "9de9107c-ce5f-4d6b-b7d6-ea233d691d09": null,
        "237dcef9-c66d-4c72-bd43-0c91aaea3b7e": "h send"
      }
    }
  ]
}

200 - OK

404 - Not found

500 - Internal error


Show current room stats


Parameters

Name


Description

Example

roomName

Room name

ROOM1

participantsParticipants list[]

nickName

User name

User1

outgoingTracksStreams publishing list[]
incomingTracksStreams playing list{}
idMediasession id9de9107c-ce5f-4d6b-b7d6-ea233d691d09
codecVideo or audio codecH264
widthVideo width1280
heigthVideo height720
fpsVideo FPS30
bitrateVideo or audio bitrate, bps265368
sampleRateAudio sample rate, Hz48000
channelsAudio channels count2
aliveIs stream activetrue
typeStream typeVIDEO
compositeStream includes a set of trackstrue
tracksTracks list in composite stream{}