Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
webrtc-player
Advanced tools
webrtcPlayer.js是基于webrtc协议的播放器 兼容各主流流媒体webrtc协议 SRS、ZLM、M7s等
webrtcPlayer.js 基于 JSWebrtc.js 改造而来。
1.安装
npm i webrtc-player
2.创建video标签
<video id="media" src="" muted controls></video>
3.在js中引入 创建实例:
import webrtcPlayer from 'webrtc-player'
let play;
play = new webrtcPlayer({
url: 'webrtc://',
video: "media",
// streamingMediaType: 'srs', //如果是srs需要加上这个参数
autoplay: true,
onPlay: (e) => {
console.log('开始播放', e);
},
onPause: (e) => {
console.log('暂停', e);
}
})
webrtcPlayer(optinos
)
参数 | 说明 | 类型 | 可选值 | 默认值 |
---|---|---|---|---|
url | 视频地址 | string | - | - |
autoplay | 是否自动播放 | boolean | - | - |
streamingMediaType | 流媒体类型(srs必传,其他流媒体可不传) | string | 'srs'|'m7s'... | - |
onPlay | 视频开始播放回调 | Function | - | - |
onPause | 视频暂停播放回调 | Function | - | - |
事件名称 | 说明 | 回调参数 |
---|---|---|
play | 播放 | - |
stop | 暂停 | - |
destroy | 销毁(在外部定义变量赋值时 let play = new webrtcPlayer(options) 在调用destroy后 将play也置为null play=null) | - |
FAQs
webrtcPlayer.js是基于webrtc协议的播放器 兼容各主流流媒体webrtc协议 SRS、ZLM、M7s等
The npm package webrtc-player receives a total of 0 weekly downloads. As such, webrtc-player popularity was classified as not popular.
We found that webrtc-player demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.