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

vue-audiobox

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

vue-audiobox

自定义音乐盒子

unpublished
latest
npmnpm
Version
1.0.14
Version published
Maintainers
1
Created
Source

Vue-Audio-Box

自定义音乐盒子

目前vue2.x测试完成

Install

  • npm npm install vue-audiobox

  • yarn yarn add vue-audiobox

Usage

//main.js
import audiobox from 'vue-audiobox';
Vue.use(audiobox);

// xxx.vue
<audiobox 
    :src="require('@/assets/music.mp3')" 
    musicName="Your Moon My Heart"
    v-model="isPlay"
    @handleEnded="cbFunc">
</audiobox>

Settings

  • Attributes
ParamsDefaultInfo
srcnull传入require后的音乐资源
color#b42b51按钮与进度条的颜色
musicName"Your music name"音乐名
v-modeltrue必填,双向绑定,可控制音乐播放
  • Events
EventInfo
handleEnded音乐播放结束
  • Ref Api

组件中的函数,直接通过this.$refs.audio.FunctionName()调用

FunctionInfo
getAudioCtx获取Audio上下文
getAudioAnalyser获取Audio Api创建的分析器

Reference

Keywords

music

FAQs

Package last updated on 19 Nov 2021

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