0.1.0 • Published 6 years ago

vue-cplayer v0.1.0

Weekly downloads
9
License
-
Repository
-
Last release
6 years ago

vue-cplayer

A simple vue wrapper for cPlayer.

Installation

# via npm
npm i vue-cplayer --save-dev
# or yarn
yarn add vue-cplayer --dev

Usage

template

<c-player :playlist="playlist" />

script

import CPlayer from 'vue-cplayer';
import playlist from './playlist';

export default {
  name: 'MyComponent',
  data() {
    return {
      playlist,
    },
  },
  components: {
    CPlayer,
  },
};

Options

keytyperequireddefaultdescription
autoplayBoolean
dropDownMenuModeStringbottomAdd a mode for the dropdown. Supported mode are bottom, top, and none.
playlistArray<Track>:white_check_mark:
playModeStringlistloopApply a mode on the play cycle. Options: listloop, 'listrandom', and singlecycle
showPlaylistBoolean
showPlaylistButtonBooleantrue
sizeStringApply a size on the player
volumeNumber1
widthStringApply a width on the player
zoomOutKanaBooleanApply optimization of Japanese kana characters
The Track model
keydescription
srcURL to your music source
posterURL to your image source
namename of track
artistname of artist

Inspired by vue-aplayer