https://github.com/z41z/hikvision-plugin-player
Hikvision Player By WebControl Plugin
https://github.com/z41z/hikvision-plugin-player
hikvision javascript player webcontrol
Last synced: 4 months ago
JSON representation
Hikvision Player By WebControl Plugin
- Host: GitHub
- URL: https://github.com/z41z/hikvision-plugin-player
- Owner: z41z
- License: mit
- Created: 2022-10-21T03:30:34.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-10-21T05:00:13.000Z (over 3 years ago)
- Last Synced: 2025-02-01T23:33:59.989Z (about 1 year ago)
- Topics: hikvision, javascript, player, webcontrol
- Language: JavaScript
- Homepage:
- Size: 1.77 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hikvision-plugin-player
Hikvision Player By WebControl Plugin
## Install
``` node
npm i hikvision-plugin-player -S
```
## CDN
``` js
```
### Usage
``` html
// 必须引用基础库
//
//
import HikvisionPlugin from 'hikvision-plugin-player'
export default {
data() {
return {
}
},
mounted() {
},
methods: {
async init() {
let player = await new HikvisionPlugin.Player({
el: 'player',
width: 800,
height: 600,
layout: '1x1',
host: 'ISC Host',
port: 443,
secret: 'ISC Secret',
appkey: 'ISC Appkey',
isShowToolbar: false
}).init()
// player = {
// isSuccess: Boolean,
// instance: {
// config: Object,
// webControl: WebControl
// },
// msg: String
// }
this.player = player.instance
}
},
components: {
},
}
#player {
width: 800px;
height: 600px;
}
```
### Function
- #### 初始化
``` js
this.player.init()
```
- #### 根据sn播放
``` js
this.player.play(sn, winId = -1)
```
- #### 调整窗口大小
``` js
this.player.resize()
```
- #### 销毁
``` js
this.player.destroy()
```
### 海康Web插件开发指南
- [海康Web插件开发指南](https://unpkg.com/hikvision-plugin-player/dist/视频WEB插件V1.5.2开发指南.pdf)