0.0.2 • Published 6 months ago
@tanzerfe/player v0.0.2
播放器组件接入文档
参数
参数 | 类型 | 必传 | 默认值 | 备注 |
---|---|---|---|---|
url | string | 是 | 空 | 视频(流)播放地址(需通过encodeURIComponent(url)编码) |
urlType | string | 否 | art | 指定播放地址厂商类型(hik,jes,html,art-默认) |
protocol | string | 否 | 空 | 视频流协议(flv,hls,m3u8) |
options | string | 否 | {} | 播放器额外配置(需通过encodeURIComponent(JSON.stringify(options))编码) |
传参示例
- 注意:url需编码
海康ws流:http://localhost:5173?url=ws%3A%2F%2F0.0.0.0%3A8000%2FopenUrl%2FHXxvN16&urlType=hik
播放器调试
- 启动项目 pnpm dev
- 访问:http://localhost:5173/demo/
0.0.2
6 months ago