Socket
Book a DemoInstallSign in
Socket

@ark-org/simple-peer-connector

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ark-org/simple-peer-connector

# API

npmnpm
Version
0.0.1
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

@ark-org/simple-peer-connector

API

SendPeer

构造参数 config

iceServers

turn或stun服务器配置项

server

websocket服务器地址

onConnected: (remoteStream, localStream) : void => {}

连接成功后的回调函数

onHangup: () : void => {}

产生挂机行为后的回调函数

.connect(stream): void

发起连接行为,参数stream是本地视频流

.hangup(): void

发起挂机行为,并断开连接

ReceivePeer

构造参数 config

iceServers

turn或stun服务器配置项

server

websocket服务器地址

onConnected: (remoteStream, localStream) : void => {}

连接成功后的回调函数

onHangup: () : void => {}

产生挂机行为后的回调函数

.connect(stream): void

发起连接行为,参数stream是本地视频流

.hangup(): void

发起挂机行为,并断开连接

FAQs

Package last updated on 08 Feb 2023

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