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.
ht-h5player
Advanced tools
基于 Vue.js 的 H5 视频播放器组件,支持实时预览、录像回放、语音对讲等功能。
bash npm install ht-h5player --save 或 yarn add ht-h5player
mport Vue from 'vue' import H5Player from 'ht-h5player' import 'ant-design-vue/dist/antd.css' Vue.use(H5Player)
import { H5Player } from 'ht-h5player' export default { components: { H5Player } }
<template>
<h5-player
:base-path="basePath"
:max-split="4"
:default-urls="urls"
@on-play="handlePlay"
@on-error="handleError"
/>
</template>
<script>
export default {
data() {
return {
basePath: '/static/',
urls: {
realplay: 'ws://your-realplay-url',
talk: 'ws://your-talk-url',
playback: 'ws://your-playback-url'
}
}
},
methods: {
handlePlay(info) {
console.log('播放信息:', info)
},
handleError(err) {
console.error('播放错误:', err)
}
}
}
</script>
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
basePath | 播放器资源基础路径 | String | './' |
maxSplit | 最大分屏数 | Number | 4 |
defaultUrls | 默认播放地址配置 | Object | {} |
showControls | 是否显示控制栏 | Boolean | true |
autoplay | 是否自动播放 | Boolean | false |
muted | 是否静音 | Boolean | false |
事件名称 | 说明 | 回调参数 |
---|---|---|
on-play | 开始播放时触发 | info: { windowIndex, url, type } |
on-error | 播放错误时触发 | error: Error |
on-stop | 停止播放时触发 | windowIndex: Number |
on-talk-start | 开始对讲时触发 | - |
on-talk-end | 结束对讲时触发 | - |
on-fullscreen | 全屏状态改变时触发 | isFullscreen: Boolean |
方法名 | 说明 | 参数 |
---|---|---|
play | 开始播放 | (url: String, windowIndex: Number) |
stop | 停止播放 | (windowIndex: Number) |
startTalk | 开始对讲 | - |
stopTalk | 停止对讲 | - |
setSplit | 设置分屏数 | (num: Number) |
A: 请检查:
A: 请确保:
FAQs
H5 video player component for Vue.js
The npm package ht-h5player receives a total of 182 weekly downloads. As such, ht-h5player popularity was classified as not popular.
We found that ht-h5player demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
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.