🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

hikvision-plugin-player

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hikvision-plugin-player

Hikvision Player By WebControl Plugin

latest
Source
npmnpm
Version
1.0.4
Version published
Weekly downloads
51
96.15%
Maintainers
1
Weekly downloads
 
Created
Source

hikvision-plugin-player

Hikvision Player By WebControl Plugin

Install

  npm i hikvision-plugin-player -S

CDN

  <script src="https://unpkg.com/hikvision-plugin-player/dist/index.min.js"></script>
  <script src="https://unpkg.com/hikvision-plugin-player/dist/jsencrypt.min.js"></script>
  <script src="https://unpkg.com/hikvision-plugin-player/dist/jsWebControl-1.0.0.min.js"></script>

Usage

  // 必须引用基础库
  // <script src="https://unpkg.com/hikvision-plugin-player/dist/jsencrypt.min.js"></script>
  // <script src="https://unpkg.com/hikvision-plugin-player/dist/jsWebControl-1.0.0.min.js"></script>
  <template>
    <div id="player"></div>
  </template>
  <script>
  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: {
    },
  }
  </script>
  <style lang="less" scoped>
  #player {
    width: 800px;
    height: 600px;
  }
  </style>
  

Function

  • 初始化

      this.player.init()
    
  • 根据sn播放

      this.player.play(sn, winId = -1)
    
  • 调整窗口大小

      this.player.resize()
    
  • 销毁

      this.player.destroy()
    

海康Web插件开发指南

  • 海康Web插件开发指南

Keywords

Hikvision

FAQs

Package last updated on 01 Nov 2022

Did you know?

Socket

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.

Install

Related posts