A simple and easy to use Audio library that relies on the VUE framework. It supports multiple audio switches on the same page, and only one audio player exists at the same time. It supports dragging, clicking and jumping to play anywhere.
npm/cnpm install vue-audios --save / yarn add vue-audios
key | require | default | type | discribe |
---|---|---|---|---|
url | 是 | string | 音频地址 | |
duration | 否 | 0 | number | 音频时长 |
autoplay | 否 | false | boolean | 是否自动播放 |
// main.js or .ts
import 'vue-audios/dist/vue-audios.css';
import VueAudios from 'vue-audios';
Vue.use(VueAudios);
// main.js or .ts
import 'vue-audios/dist/vue-audios.css';
// 用到之处
import { VueAudios } from 'vue-audios';
修改样式方式:fork自行修改,git复制源码,或者查看dom上的类名,进行覆盖。 新增功能,如:倍速播放等等,欢迎fork,自行修改,或者git提出issues等。
How to change styles: Fork modifies itself, Git copies the source code, or you can override it by looking at the class name on the DOM. New features, such as: double speed playback, etc., welcome fork, self-modification, or Git raised issues, etc.