Skip to content

mvcuccaro/vueamp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Single file vue component media player.
Essentially just a front end to HTMLMediaElement. You can bind an array of media files (name/src pair objects) and they will be listed as available files to play when rendered. Demo at https://www.michaelcuccaro.com/

alt text

Import the vueamp component into your vue app component and provide some audio source objects

import AudioPlayer from './vueamp.vue';

export default {
  components: {
    'audio-player': AudioPlayer  
  }
},

data () {
    	return {
    	  audio_sources: [{
    			src:'http://thirdpartyinterface.com/mp3/3pi.call_of_shinebox.2014-4-25.mp3',
    			name:'Call of Shinebox'
    		},{
    			src:'http://thirdpartyinterface.com/mp3/3pi.the_periss_correlation.2014-4-25.2.mp3',
    			name: 'The Periss Correlation'
    		}]
    	}
}

put the audio-player element in your html and bind the array of audio sources

<audio-player :audio-sources="audio_sources"></audio-player>

About

Audio media interface vue.js component

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages