Giter Site home page Giter Site logo

plugin-webrtc's Introduction

Introduction

Monibuca is a highly scalable high-performance streaming server development framework developed purely for Go

Usage

package main

import (
	"context"

	"m7s.live/m7s/v5"
	_ "m7s.live/m7s/v5/plugin/debug"
	_ "m7s.live/m7s/v5/plugin/hdl"
	_ "m7s.live/m7s/v5/plugin/rtmp"
)

func main() {
	m7s.Run(context.Background(), "config.yaml")
}

More Example

see example directory

Create Plugin

import (
	"m7s.live/m7s/v5"
)

type MyPlugin struct {
	m7s.Plugin
}

var _ = m7s.InstallPlugin[MyPlugin]()

plugin-webrtc's People

Contributors

bigbeer1 avatar dependabot[bot] avatar jianglieshan avatar langhuihui avatar zykilled avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

plugin-webrtc's Issues

obs使用whip协议推流无声

使用自带预览功能,只有画面没有声音
config.yaml

llhls:
  enable: false
hls:
  enable: false
monitor:
  enable: false
webrtc:
  iceservers: []
  publicip: [] # 可以是数组也可以是字符串(内部自动转成数组)
  port: udp:9000 # 可以是udp:8000-9000 范围端口,也可以udp:9000 单个端口
  pli: 2s # 2s

obs 配置
1689519861147
1689519886272

屏幕分享非常卡顿

image
推流
webrtc/test/screenshare?streamPath=live/webrtc4
测试播放
webrtc/test/subscribe?streamPath=live/webrtc4

WebRtc 播放失败!

M7S放在内网,coturn ICE服务器部署在外网。
摄像头同M7S媒体流在公司内网。
在家里(另外一个局域网)使用subscribe.html播放不了视频。
如果在公司是可以使用subscribe.html 可以播放的。
请问可以从那些方面排查问题呢?
企业微信截图_16975314256760

建议

文档太粗泛了,新人完全没办法搭一个DEMO出来学习。

无法获取sdp answer

发送给接口:
/webrtc/play/[streamPath],发送offer,收到服务器返回的还是offer,无法建立peer连接。在V3版本上测试是可以的。
请问v4版本还不支持吗,还是我的接口调用有问题呢?

使用WebRTC无法正常推流

    const mediaStream = await navigator.mediaDevices.getUserMedia({
      video: true,
      audio: true,
    });
    refVideo.current!.srcObject = mediaStream;
    setMediaStream(mediaStream);
    const pc = new RTCPeerConnection();
    pc.addTransceiver('video', { direction: 'sendonly' });
    pc.addTransceiver('audio', { direction: 'sendonly' });
    pc.oniceconnectionstatechange = () => {
      console.log('oniceconnectionstatechange', pc.iceConnectionState);
    };
    pc.onicecandidate = (e) => {
      console.log('onicecandidate', e.candidate);
    };
    mediaStream.getTracks().forEach((t) => {
      pc.addTrack(t, mediaStream);
    });
    const offer = await pc.createOffer();
    await pc.setLocalDescription(offer);
    const result = await fetch(
      `http://127.0.0.1:8080/webrtc/push/live/webrtc11`,
      {
        method: 'POST',
        mode: 'cors',
        cache: 'no-cache',
        credentials: 'include',
        redirect: 'follow',
        referrerPolicy: 'no-referrer',
        headers: { 'Content-Type': 'application/sdp' },
        body: offer.sdp,
      },
    );
    const remoteSdp = await result.text();
    await pc.setRemoteDescription(
      new RTCSessionDescription({ type: 'answer', sdp: remoteSdp }),
    );
    setPc(pc);

使用如上代码,无法进行webrtc推流

微信截图_20230220213823

请问,用webrtc 连接,no-referrer-when-downgrade

请问,用webrtc 连接,OPTIONS code:200 , 正连接的时候 no-referrer-when-downgrade,和m7s 上反复对比接口数据都一样,总是不行。请问是要用jessibuca 播放吗?可是文档没看到具体使用

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.