3.4.1 • Published 27 days ago

vue-waveform v3.4.1

Weekly downloads
272
License
-
Repository
-
Last release
27 days ago

Usage

install

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

Instructions

scene

websocket arraybuffer file mp3 aac blob arraybuffer

Components

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
attrtypedefaultdescription
WIDTHNumber500The canvas WIDTH
HEIGHTNumber300The canvas HEIGHT
openAudioContextbooleantrueuse audiocontext player flase: use audio player
websocketURLString''websocket url example 'ws://192.168.1.1:8082'
idString''device id
typeString'bar''bar' : bar graph , 'line' : line graph
rangeNumber1axisY Ratio of Canvas height
arraybufferArrayBuffernullwebsocket Receive Byte array
bgColorstring'rgb(0, 0, 0)'canvas background color , rgb or Hex color code
method:
namereturn typeparameterdescription
openWSvoidopen websocket
playvoidplay audio
pausevoidpause audio
stopvoidclose websocket and pause audio

example:

this.$refs.mycom.openWS()

Components audioPlayer

audioUI:

效果3

timelineUI:

效果3

USAGE

import {waveform} from 'vue-waveform'
import 'vue-waveform/dist/static/css/app.css'

<vue-waveplayer @ready=ready :range="0.3" ref="mycom" :WIDTH="800" :HEIGHT="100" bgColor="#fff" :URL="URL"></vue-waveplayer>
props
attrtypedefaultdescription
WIDTHNumber500The canvas WIDTH
HEIGHTNumber300The canvas HEIGHT
playTypeNumber21: audio html , 2 : timeline
typeString'line2'only choose line2
rangeNumber1axisY Ratio of Canvas height
bgColorstring'rgb(0, 0, 0)'canvas background color , rgb or Hex color code
URLstring''file audio URL
Methods:
namereturn typeparameterdescription
stopvoidnonedestroy
pausevoidnonepause
Events:
namereturn typeparameterdescription
updateTimeEndedvoidcurrenttimetime change dispatch currenttime

Example

mounted() {
  this.URL = './static/3.aac'
},
  methods: {
    click() {
      this.$refs.mycom.seekTo(this.timeline)
    },
    ready() {
      this.$refs.mycom.seekTo(this.timeline)
    }
  }
3.3.9

28 days ago

3.4.1

27 days ago

3.3.8

29 days ago

3.3.7

1 month ago

3.3.5

1 month ago

3.3.4

1 month ago

3.3.3

2 months ago

3.3.2

2 months ago

3.2.17

8 months ago

3.2.13

3 years ago

3.2.14

3 years ago

3.2.12

3 years ago

3.2.11

4 years ago

3.2.10

4 years ago

3.2.9

4 years ago

3.2.8

4 years ago

3.2.7

4 years ago

3.2.6

4 years ago

3.2.5

4 years ago

3.2.4

4 years ago

3.2.2

4 years ago

3.2.1

4 years ago

3.1.9

4 years ago

3.1.8

4 years ago

3.1.7

4 years ago

3.1.6

4 years ago

3.1.5

4 years ago

3.1.4

4 years ago

3.1.3

4 years ago

3.1.2

4 years ago

3.1.1

4 years ago

3.1.0

4 years ago

2.2.20

4 years ago

2.2.19

4 years ago

2.2.18

4 years ago

2.2.17

4 years ago

2.2.16

4 years ago

2.2.15

4 years ago

2.2.14

4 years ago

2.2.13

5 years ago

2.2.12

5 years ago

2.2.11

5 years ago

2.2.10

5 years ago

2.2.9

5 years ago

2.2.8

5 years ago

2.2.7

5 years ago

2.2.6

5 years ago

2.2.5

5 years ago

2.2.4

5 years ago

2.2.3

5 years ago

2.2.2

5 years ago

2.2.1

5 years ago

2.1.6

5 years ago

2.1.5

5 years ago

2.1.4

5 years ago

2.1.3

5 years ago

2.1.2

5 years ago

2.1.1

5 years ago

2.0.1

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago