Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sadad

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sadad

waveform audio player wavesurfer -waveform js html 音频audio波形图

  • 2.0.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

vue-waveform 如何使用

安装

  • npm -i vue-waveform

-全局引入安装-

  • import {waveform} from 'vue-waveform'
  • Vue.use(waveform)

使用说明

使用场景

文件类型mp3 aac 等blob 转arraybuffer

组件的使用 全局引入的组件
vue-waveform
<vue-waveform ref="mycom" :range="0.6" :WIDTH="800" :HEIGHT="100" websocketURL="ws://192.168.6.48:8082/ws/websocket/socketServer.do" :id="selectid" :arraybuffer="arraybuffer"></vue-waveform> 

效果

效果2

props 属性:
  • WIDTH 宽度
  • HEIGHT 高度
  • websocketURL websock连接
  • id 设备id
  • type 类型 'line' 曲线图 'bar' 柱状图
  • range 柱状图高度显示的比率
  • arraybuffer 字节数组
method:
  • openWS() // 无参数 创建连接初始化对象 支持promise接口调用
  • play() // 无参数 播放
  • pause() // 无参数 暂停
  • stop() // 无参数 停止 并销毁对象

调用方式 例如:

this.$refs.mycom.openWS()

Keywords

FAQs

Package last updated on 16 Aug 2019

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc