Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

webrtc-player

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webrtc-player

webrtc-player 对 webrtc 进行了简单封装,支持 srs 的 rtc 流的播放。

  • 0.1.0
  • unpublished
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source
说明

webrtc-player 对 webrtc 进行了简单封装,支持 srs 的 rtc 流的播放。

集成了云台控制按钮,并通过事件回调传递。

安装
npm intall webrtc-player
属性
  • visible,显示控制
  • webrtcURL,webrtc 播放地址
事件
  • close,窗口关闭事件
  • control,控制事件。参数为(up,down,left,right,zoomin,zoomout)
示例
<template>
	<Player
		:webrtcURL="webrtcURL"
		style="height: 600px; width: 800px"
		:visible="visible"
		@close="close"
		@control="control"
	></Player>
</template>
<script>
import "element-ui/lib/theme-chalk/index.css";
import Player from "webrtc-player";

export default {
	data() {
		return {
			visible: true,
			// webrtc播放地址
			webrtcURL: "",
		};
	},
	components: {
		Player,
	},
	methods: {
		// 控制事件,根据dir做接口请求控制
		control(dir) {
			console.log(dir);
		},
		// 关闭事件
		close() {
			this.visible = false;
		},
	},
};
</script>

FAQs

Package last updated on 01 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc