0.2.2 • Published 8 months ago

rtc-streamer v0.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago
  • 支持 TypeScript
  • SRS 服务结合使用

开始

安装

npm i rtc-streamer --save

使用

拉流

import { SrsRtcPlayerAsync } from "rtc-streamer";
const srs = new SrsRtcPlayerAsync();
const video = document.getElementsByTagName("video");
video.srcObject = srs.stream;
srs.play(`webrtc://192.168.18.140/test/test`).catch((error) => {
  console.log(error);
});

推流

import { SrsRtcPublisherAsync } from 'rtc-streamer'
const srs = new SrsRtcPublisherAsync()
srs.publish(`webrtc://192.168.18.140/test/test`).catch((error: any) => {
  console.log(error)
})
0.2.2

8 months ago

0.2.1

9 months ago

0.2.0

9 months ago

0.1.0

9 months ago