Janus源碼分析(7)——videoroom分析

1. 運行效果

https://janus.conf.meetecho.com/videoroomtest.html?simulcast=true

包含:Simulcast功能

  • 視頻高等質量(分辨率:1280*720,帶寬1.5M+)
    在這裏插入圖片描述

  • 視頻中等質量(分辨率:640*360,帶寬500K左右)
    在這裏插入圖片描述

  • 視頻低等質量(分辨率:320*180,帶寬150K左右)
    在這裏插入圖片描述

2. VideoRoom插件API分析

2.1 會議配置信息及API分類

1、插件配置文件位置 conf/janus.plugin.videoroom.jcfg,會議配置格式如下:

room-<unique room ID>: {
    description = This is my awesome room
    is_private = true|false (private rooms don't appear when you do a 'list' request)
    secret = <optional password needed for manipulating (e.g. destroying) the room>
    pin = <optional password needed for joining the room>
    require_pvtid = true|false (whether subscriptions are required to provide a valid
                 a valid private_id to associate with a publisher, default=false)
    publishers = <max number of concurrent senders> (e.g., 6 for a video
                 conference or 1 for a webinar, default=3)
    bitrate = <max video bitrate for senders> (e.g., 128000)
    fir_freq = <send a FIR to publishers every fir_freq seconds> (0=disable)
    audiocodec = opus|g722|pcmu|pcma|isac32|isac16 (audio codec to force on publishers, default=opus
                can be a comma separated list in order of preference, e.g., opus,pcmu)
    videocodec = vp8|vp9|h264 (video codec to force on publishers, default=vp8
                can be a comma separated list in order of preference, e.g., vp9,vp8,h264)
    opus_fec = true|false (whether inband FEC must be negotiated; only works for Opus, default=false)
    video_svc = true|false (whether SVC support must be enabled; only works for VP9, default=false)
    audiolevel_ext = true|false (whether the ssrc-audio-level RTP extension must be
        negotiated/used or not for new publishers, default=true)
    audiolevel_event = true|false (whether to emit event to other users or not)
    audio_active_packets = 100 (number of packets with audio level, default=100, 2 seconds)
    audio_level_average = 25 (average value of audio level, 127=muted, 0='too loud', default=25)
    videoorient_ext = true|false (whether the video-orientation RTP extension must be
        negotiated/used or not for new publishers, default=true)
    playoutdelay_ext = true|false (whether the playout-delay RTP extension must be
        negotiated/used or not for new publishers, default=true)
    transport_wide_cc_ext = true|false (whether the transport wide CC RTP extension must be
        negotiated/used or not for new publishers, default=true)
    record = true|false (whether this room should be recorded, default=false)
    rec_dir = <folder where recordings should be stored, when enabled>
    notify_joining = true|false (optional, whether to notify all participants when a new
                participant joins the room. The Videoroom plugin by design only notifies
                new feeds (publishers), and enabling this may result extra notification
                traffic. This flag is particularly useful when enabled with \c require_pvtid
                for admin to manage listening only participants. default=false)
}

2、VideoRoom插件分3種類型API:會議、發佈者、訂閱者

2.2 會議API

在這裏插入圖片描述

2.3 會議發佈者API

在這裏插入圖片描述

2.4 會議訂閱者API

在這裏插入圖片描述

3. 主要API處理分析(待完善)

3.1 發佈者join

3.2 發佈者configure

3.3 發佈者publish

3.4 發佈者unpublish

3.5 訂閱者join

3.6 訂閱者start

3.7 訂閱者configure

3.8 訂閱者switch

4. 參考資料

  • 官網VideoRoom插件API文檔
    https://janus.conf.meetecho.com/docs/videoroom.html在這裏插入圖片描述
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章