npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

wspt

v1.0.18

Published

#### 1. 找到node_modules目录中wspt文件夹,将static文件夹、jquery.min.js、palyer.css、PlayerControl.js、WSPlayer.js文件复制到项目public目录下。 ``` public |-- jquery.min.js |-- player.css |-- PlayerControl.js |-- WSPlayer.js |-- static |-- utils.js |-- svg

Downloads

966

Readme

wspt使用说明

1. 找到node_modules目录中wspt文件夹,将static文件夹、jquery.min.js、palyer.css、PlayerControl.js、WSPlayer.js文件复制到项目public目录下。

public
  |-- jquery.min.js
  |-- player.css
  |-- PlayerControl.js
  |-- WSPlayer.js
  |-- static
      |-- utils.js
      |-- svg
      |-- WSPlayer
          |-- icon
          |-- multiThread
              |-- libdhplay.js
              |-- libdhplay.wasm
              |-- libdhplay.worker.js
          |-- singleThread
              |-- libdhplay.js
              |-- libdhplay.wasm
          |-- audioTalkWorker.js
          |-- PlayerControl.js
          |-- WSPlayer.js
      

2. 在index.html中引入js文件

 <link href="/player.css" rel="stylesheet">
 <script src="/PlayerControl.js"></script>
 <script src="/WSPlayer.js"></script>
 <script src="/jquery.min.js"></script>

3. 如在node_modules中未找到以上文件,请到其他项目中或ICC开放平台-资源下载-开发demo-wsplayer无插件开发包V1.2.9源码中获取

4. 在main.js中引入wspt模块

import wspt from 'wspt/wspt.umd'
app.use(wspt)

属性方法配置项

loginData: 登录参数

loginData:{
  username:"",//用户名
  password:"",//密码
  isEncryption:true,//密码是否已经加密
  proxyIp:""
}

<wspt ref="wsptRef" :loginData="loginData" ></wspt>

loginData 中 如果isEncryption为true,则password为加密后的密码,调用wspt.encryptData方法加密

wsptRef.value.encryptData("xxxxx")

播放视频监控:在登录后调用wsptPlay方法传入监控信息进行播放

const params={
    "method": "setTreeNodeList",//固定
    "data": [
      {
        "channelCode": "1000155$1$0$0",//监控通道号
        "id": "1000155$1$0$0",//监控通道号
        "isOnline": 1,//是否在线
        "cameraType": "2"//监控类型 1为枪机 2为球机 有云台
      }
}
wsptRef.value.wsptPlay(params)

hasPan:是否显示云台控制 默认true

<wspt ref="wsptRef" :hasPan="true"></wspt>

如果想更自由调整云台样式,可使hasPan为false,在代码中添加以下代码自定义调整

<div class="right-video-wrapper">
      <div class="operation-content-left">
        <div id="ws-pan-tilt"></div>
      </div>
</div>

logins:登录

loginData:{
  username:"",//用户名
  password:"",//密码
  isEncryption:true,//密码是否已经加密
  proxyIp:""
}
 wsptRef.value.logins(loginData)

initPlayer:初始化视频播放器

  wsptRef.value.initPlayer()

initPlayer:初始化视频播放器

  wsptRef.value.initPlayer()

setPlayerNum:设置显示的路数

    wsptRef.value.setPlayerNum(number)

close:关闭所有视频

    wsptRef.value.close()