Project

wavesurfer

0.0
No commit activity in last 3 years
No release in over 3 years
wavesurfer.js for the Rails asset pipeline
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
~> 0
 Project Readme

Wavesurfer Gem for Rails

wavesurfer.js for the Rails asset pipeline.

Installation

Add this line to your application's Gemfile:

gem 'wavesurfer'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install wavesurfer

Add next lines to your application.js file:

//= require src/wavesurfer
//= require src/util
//= require src/webaudio
//= require src/mediaelement
//= require src/drawer
//= require src/drawer.canvas

or include all files above with single line

//= require wavesurfer

Also can include wavesurfer plugins:

//= require plugin/wavesurfer.elan
//= require plugin/wavesurfer.microphone
//= require plugin/wavesurfer.minimap
//= require plugin/wavesurfer.regions
//= require plugin/wavesurfer.spectrogram
//= require plugin/wavesurfer.timeline

or include all plugins above with single line

//= require wavesurfer-plugins

Usage

var wavesurfer = Object.create(WaveSurfer);

wavesurfer.init({
    container: document.querySelector('#wave'),
    waveColor: 'violet',
    progressColor: 'purple'
});

wavesurfer.on('ready', function () {
    wavesurfer.play();
});

wavesurfer.load('example/media/demo.mp3');

Check out the demo and docs.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Changelog

  • 22.04.15: Released gem v.0.0.1
    • plugin version: 1.0.26
  • 29.04.15: Released gem v.0.0.2
    • plugin version: 1.0.27

Contributors

Viktor Oleksyn

License

Available under the MIT License.