
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
@ark-org/simple-peer-connector
Advanced tools
iceServers
turn或stun服务器配置项
server
websocket服务器地址
onConnected: (remoteStream, localStream) : void => {}
连接成功后的回调函数
onHangup: () : void => {}
产生挂机行为后的回调函数
发起连接行为
发起挂机行为,并断开连接
iceServers
turn或stun服务器配置项
server
websocket服务器地址
onConnected: (remoteStream, localStream) : void => {}
连接成功后的回调函数
onHangup: () : void => {}
产生挂机行为后的回调函数
发起连接行为
发起挂机行为,并断开连接
iceServers
turn或stun服务器配置项
server
websocket服务器地址
onStream: (member: Member, remoteStream: MediaStream), localStream: MediaStream), allMembers: Member[]) : void => {}
当有视频流、音频流加入/变化时的回调函数,参数分别为:本地用户对象、远程流媒体对象
onRemove: (member: Member, allMembers: Member[]) : void => {}
有其他用户离开房间时的回调函数,参数分别为:断开的用户对象,当前房间的所有用户对象
onDisconnected: (allMembers: Member[]) : void => {}
当前房间有用户断开后的回调函数,参数分别为:当前房间的所有用户对象
发起连接行为,参数分别为:房间Id、是否开启摄像头流、是否开启麦克风流、本地流媒体对象
发起挂机行为,并断开连接
切换视频流行为,参数分别为:是否开启摄像头流、是否开启麦克风流,发起该行为后,该房间内的所有用户都会收到onStream
事件
发起挂断行为,发起该行为后,该房间内的所有用户都会收到onRemove
事件
FAQs
# API
The npm package @ark-org/simple-peer-connector receives a total of 0 weekly downloads. As such, @ark-org/simple-peer-connector popularity was classified as not popular.
We found that @ark-org/simple-peer-connector demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.