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在这里插入图片描述
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章