Mediasoup文档

toc and abstract.

https://mediasoup.org/documentation/

2018.1.19 星期五 18:32

一 General

1.1 Overview

An SFU (Selective Forwarding Unit)

1 mediasoup goals

2 Server side

….

Features

3 Client side

….

Features

1.2 Glossay

Both mediasoup and mediasoup-client refer to the same common entities that are represented in both client and server sides

1 Room

2 Peer

3 Transport

4 Producer

5 Consumer

6 Profile

1.3 mediasoup protocol

Although mediasoup does not implement a signaling protocol, both the client (mediasoup-client) and the server (mediasoup) must exchange messages. Those messages can be request/response pairs or notifications, and can be sent in both directions.
….

1 Request/response pairs and notifications

2 Message target

3 Message examples

It’s up to the application how to correlate those requests and their associated responses, for example by enveloping the request and its response into a signaling transaction that uses a id field to match them.

1.4 RTC stats

Similar to WebRTC and ORTC, mediasoup provides stats in server side. If enabled, they are also delivered to mediasoup-client.
Currently stats are generated for the following entities:

  1. WebRtcTransport
  2. Producer
  3. Consumer
    Stats are an Array of Objects.

$_EXCULDE: 好像和自己没多大关系

=====================================================

二 mediasoup

2.1 Installation

2.2 API

1 mediasoup

2 Server

3 Room

4 Peer

5 Transport

6 WebRtcTransport

7 PlainRtpTransport

8 Producer

9 Consumer

0 ActiveSpeakerDetector

1 RtpStreamer

2 errors

2.3 Debugging

1 Log levels

  1. “mediasoup:mediasoup-worker”
  2. “mediasoup:WARN:mediasoup-worker”
  3. “mediasoup:ERROR:mediasoup-worker”

2 Enable logging

$ export DEBUG="mediasoup*"
$ node myapp.js
# or:
$ DEBUG="mediasoup*" node myapp.js

process.env.DEBUG = "mediasoup*"
const mediasoup = require("mediasoup");

$ export DEBUG="mediasoup:WARN:* mediasoup:ERROR:*"

3 Log tags

info,ice,dtls,rtp,srtp,rtcp,rtx,rbe

$ export DEBUG="mediasoup:mediasoup-worker:* *ERROR*"
$ node myapp.js

const mediasoup = require("mediasoup");
const server = mediasoup.Server({
    logLevel : "debug",
    logTags  : [ "ice" ]
});

2.4 Building

三 mediasoup-client

3.1 Installation

3.2 API

1 mediasoupClient

2 Room

3 Transport

4 Producer

5 Peer

6 Consumer

3.3 Debugging

1 Log levels

2 Enable logging

<script>
    window.localStorage.setItem('debug', 'mediasoup-client:WARN* mediasoup-client:ERROR*');
</script>
<script src='/js/your-bundled-app.js'></script>

19:22

knowledge is no pay,reward is kindness
0%