0.0.2 • Published 6 months ago

@tanzerfe/player v0.0.2

Weekly downloads
-
License
-
Repository
-
Last release
6 months ago

播放器组件接入文档


参数

参数类型必传默认值备注
urlstring视频(流)播放地址(需通过encodeURIComponent(url)编码)
urlTypestringart指定播放地址厂商类型(hik,jes,html,art-默认)
protocolstring视频流协议(flv,hls,m3u8)
optionsstring{}播放器额外配置(需通过encodeURIComponent(JSON.stringify(options))编码)

传参示例

  • 注意:url需编码

海康ws流:http://localhost:5173?url=ws%3A%2F%2F0.0.0.0%3A8000%2FopenUrl%2FHXxvN16&urlType=hik

hls流:http://localhost:5173?url=http%3A%2F%2F0.0.0.0%3A8000%2Fget%2Fflv%2Fhls%2Fstream%3Furl%3Dtest&urlType=art

flv流:http://localhost:5173?url=ws%3A%2F%2F0.0.0.0%3A80%2Frtp%2F34010000042000000001_34010000042000000001.live.flv&urlType=jes&protocol=flv

html页面:http://localhost:5173?url=http%3A%2F%2F0.0.0.0%3A8000%2Fshare.html%2F%23%2F%3Fdevid%3D1%26audio%3Dfalse%26ptz%3Dtrue&urlType=html

视频:http://localhost:5173?url=https%3A%2F%2Fartplayer.org%2Fassets%2Fsample%2Fvideo.mp4&urlType=art&options=%7B%22debug%22%3A+true%7D

播放器调试