UNPKG

wavesurfer.js

Version:

Interactive navigable audio visualization using Web Audio and Canvas

247 lines (199 loc) 10.8 kB
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>wavesurfer.js</title> <link href="data:image/gif;" rel="icon" type="image/x-icon" /> <!-- Bootstrap --> <link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet"> <link rel="stylesheet" href="example/css/style.css" /> <link rel="stylesheet" href="example/css/ribbon.css" /> <link rel="screenshot" itemprop="screenshot" href="http://katspaugh.github.io/wavesurfer.js/example/screenshot.png" /> <!-- wavesurfer.js --> <script src="src/wavesurfer.js"></script> <script src="src/util.js"></script> <script src="src/webaudio.js"></script> <script src="src/mediaelement.js"></script> <script src="src/drawer.js"></script> <script src="src/drawer.canvas.js"></script> <!-- regions plugin --> <script src="plugin/wavesurfer.regions.js"></script> <!-- Demo --> <script src="example/main.js"></script> <script src="example/trivia.js"></script> </head> <body itemscope itemtype="http://schema.org/WebApplication"> <div class="container"> <div class="header"> <noindex> <ul class="nav nav-pills pull-right"> <li><a href="?fill">Fill</a></li> <li><a href="?scroll">Scroll</a></li> </ul> </noindex> <h1 itemprop="name">wavesurfer.js</h1> </div> <div id="demo"> <div id="waveform"> <div class="progress progress-striped active" id="progress-bar"> <div class="progress-bar progress-bar-info"></div> </div> <!-- Here be the waveform --> </div> <div class="controls"> <button class="btn btn-primary" data-action="back"> <i class="glyphicon glyphicon-step-backward"></i> Backward </button> <button class="btn btn-primary" data-action="play"> <i class="glyphicon glyphicon-play"></i> Play / <i class="glyphicon glyphicon-pause"></i> Pause </button> <button class="btn btn-primary" data-action="forth"> <i class="glyphicon glyphicon-step-forward"></i> Forward </button> <button class="btn btn-primary" data-action="toggle-mute"> <i class="glyphicon glyphicon-volume-off"></i> Toggle Mute </button> </div> </div> <p class="lead pull-center" id="drop"> Drag'n'drop your favorite <i class="glyphicon glyphicon-music"></i>-file here! </p> <div class="row marketing"> <div class="col-lg-6"> <h4>Web Audio Waveform Visualizer</h4> <p itemprop="about">Customizable waveform audio visualization built on top of Web Audio API and HTML5 Canvas. With <strong>wavesurfer.js</strong> you can create anything from an HTML5 audio player to a sophisticated DJ application. For a list of other projects using wavesurfer.js, check out <a href="https://github.com/katspaugh/wavesurfer.js/wiki/Projects">the wiki</a> where you can also add your own project.</p> <h4>Compatibility</h4> <p itemprop="browserRequirements"><strong>wavesurfer.js</strong> runs on modern browsers <a href="http://caniuse.com/audio-api" rel="nofollow">supporting Web Audio</a>. Including Firefox, Chrome, Safari, Mobile&nbsp;Safari and Opera.</p> <h4>Download</h4> <p> <a class="btn btn-large btn-success" href="dist/wavesurfer.min.js" itemprop="downloadUrl">Download <strong>wavesurfer.min.js</strong> (20 KB)</a> </p> </div> <div class="col-lg-6"> <h4>Quick Start</h4> <noindex><p> <pre><code>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');</code></pre> </p></noindex> <h4>Documentation</h4> <p>The full list of options and methods can be found in the <a href="https://github.com/katspaugh/wavesurfer.js/blob/master/README.md">README</a> file.</p> </div> </div> <div class="row marketing"> <div class="col-lg-8"> <h4>Plugins & Examples</h4> <p>Thanks to the everyting-is-public API, it's easy to write <strong>wavesurfer.js</strong> plugins.</p> <ul> <li> <h4><a href="example/annotation">Regions plugin</a></h4> <p> Adds ability to display and interact with audio regions. Regions are visual overlays that can be resized and dragged around the waveform. You can play back and loop a region. </p> </li> <li> <h4><a href="example/elan/?scroll">ELAN plugin</a></h4> <p> Reads ELAN files and displays audio annotations as an interactive widget. ELAN is parsed into a JavaScript object with some denormalization. </p> </li> <li> <h4><a href="example/timeline">Timeline plugin</a></h4> <p> Adds a nice simple timeline to your waveform. By <a href="https://github.com/instajams">Instajams</a>. </p> </li> <li> <h4><a href="example/microphone">Microphone plugin</a></h4> <p> Visualizes audio input from a microphone. By <a href="https://github.com/thijstriemstra">Thijs Triemstra</a>. </p> </li> <li> <h4><a href="example/zoom">Zoom</a></h4> <p> Zooming feature can be used with an HTML5 slider. </p> </li> <li> <h4><a href="example/panner">Panner</a></h4> <p> Creating a panner with wavesurfer.js is easy-peasy. Follow the 4 steps. </p> </li> <li> <h4><a href="example/equalizer">Equalizer</a></h4> <p> Simple equalizer to demonstrate how to connect multiple filters in chain. </p> </li> <li> <h4><a href="example/audio-element">Media element</a></h4> <p> HTML5 media element fallback for browsers without Web Audio. </p> </li> <li> <h4><a href="example/split-channels">Split channel waveforms</a></h4> <p> Display multiple waveforms, one for each channel, in a single player. </p> </li> <li> <h4><a href="example/angular">AngularJS directive</a></h4> <p> Embed wavesurfer.js in an Angular directive. </p> </li> </ul> </div> </div> <div class="footer row"> <div class="col-sm-12"> <a rel="license" href="http://creativecommons.org/licenses/by/3.0/deed.en_US"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by/3.0/80x15.png" /></a> </div> <div class="col-sm-7"> <span xmlns:dct="http://purl.org/dc/terms/" href="http://purl.org/dc/dcmitype/Text" property="dct:title" rel="dct:type">wavesurfer.js</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="https://github.com/katspaugh/wavesurfer.js" property="cc:attributionName" rel="cc:attributionURL">katspaugh</a> is licensed under a&nbsp;<a style="white-space: nowrap" rel="license" href="http://creativecommons.org/licenses/by/3.0/deed.en_US">Creative Commons Attribution 3.0 Unported License</a>. </div> <div class="col-sm-5"> <noindex> Demo music track is <a href="http://www.jamendo.com/en/track/661578/trou" rel="nofollow"><b>Trou</b> <span class="muted">by</span>&nbsp;<b>czskamaarù</b></a>. Thanks! </noindex> </div> </div> </div> <div class="github-fork-ribbon-wrapper right"> <div class="github-fork-ribbon"> <a itemprop="isBasedOnUrl" href="https://github.com/katspaugh/wavesurfer.js">Fork me on GitHub</a> </div> </div> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-50026819-1', 'wavesurfer.fm'); ga('send', 'pageview'); </script> </body> </html>