webrtc

package module
v3.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2022 License: MIT Imports: 18 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

webrtc 插件

提供通过网页发布视频到monibuca,以及从monibuca拉流通过webrtc进行播放的功能

基本原理

通过浏览器和monibuca交换sdp信息,然后读取rtp包或者发送rtp的方式进行

API

  • /api/webrtc/play?streamPath=live/rtc 用于播放live/rtc的流,需要在请求的body中放入sdp的json数据,这个接口会返回服务端的sdp数据
  • /api/webrtc/publish?streamPath=live/rtc 同上

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WaitList

type WaitList struct {
	// contains filtered or unexported fields
}

func (*WaitList) Get

func (wl *WaitList) Get(k string) *WebRTC

func (*WaitList) Set

func (wl *WaitList) Set(k string, v *WebRTC)

type WebRTC

type WebRTC struct {
	*PeerConnection
}

func (*WebRTC) GetAnswer

func (rtc *WebRTC) GetAnswer() ([]byte, error)

func (*WebRTC) Publish

func (rtc *WebRTC) Publish(streamPath string) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL