Socket
Socket
Sign inDemoInstall

vue-audio-index

Package Overview
Dependencies
185
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vue-audio-index

first vue npm


Version published
Maintainers
1
Created

Readme

Source

A simple music player component base on Vuejs(capy vue-simple-audio, from http://lavyun.github.io/vue-simple-audio/)

Effect:

demo

How to use

  • install with npm
npm install --save vue-audio-index
  • use it in your component
<template>
  <div id="app">
    <img src="./assets/logo.png">
    <hello></hello>
    <vue-simple-audio 
        :songs="songs" 
        width="500" 
        initial-volume="40" 
        loop auto-play
        repeat
        bg-color="#345345">
    </vue-simple-audio>
  </div>
  </div>
</template>

<script>
import VueAudioIndex from 'vue-audio-index'

export default {
  name: 'app',
  components: {
    'vue-audio-index':VueAudioIndex
  },
  data(){
    return {
      songs: [{
        "url": "http://fs.open.kugou.com/7840167216f9b80284d2bb2a9bd9554b/58ac0322/G076/M0A/0C/1D/7IYBAFgu5wmAOS2gAEuViOk9tuk748.mp3",
        "songname": "林俊杰-你的唯一"
      }, {
        "url": "http://fs.open.kugou.com/aecae9884f5c9ca2063864958ddb799e/58ac03ae/G008/M07/06/09/qIYBAFUK1BuAB-aSADmE5bqELvQ099.mp3",
        "songname": "Maroon-sugar"
      }]
    }
  }
}
</script>

props

paramsdescriptiondefault
songsA array of objects,it contains song's infomation,it has two property,the song's url and name--
auto-playauto play?true
repeatrepeat the list?true
looprepeat one?false
widththe player's width300
initial-volumevolume60
bg-colorthe player's colorrgb(0,0,0)

Keywords

FAQs

Last updated on 27 Apr 2018

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc