Giter Site home page Giter Site logo

xijin / vue-audio Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ginmu/vue-audio

0.0 1.0 0.0 629 KB

A simple audio player based on Vue 2.x which supports single, loop, order, circulation, and random mode

JavaScript 71.42% HTML 1.02% Vue 25.50% CSS 2.06%

vue-audio's Introduction

vue-audio

A simple audio player based on Vue 2.x which supports single, loop, order, circulation, and random mode

audio component props

props description type default required values
source src of audio string "" true
index the current audio index in the playlist number 0 true
mode player mode number 0 false 0:single、1:order、2:loop、3:circulation、4:random
preload string 'none' false "none"、 "auto"、 "metadata"
autoplay boolean false false
muted boolean false false

example code

<vue-audio v-for="(list, index) of lists"
                  :source="list.source"
                  :index="index"
                  :mode="mode"
                  @timeupdate="timeupdate"
                  @playing="playing"
                  @pause="pause"
                  @ended="ended"
                  @waiting="waiting"
                  @error="error">
        <div class="player"></div>
</vue-audio>

timeupdate (e) {

},
playing (e) {

},
pause (e) {

},
ended (e) {

},
waiting (e) {

},
error (e) {

}

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

vue-audio's People

Contributors

ginmu avatar wangshayne avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.