wavesurfer.js
Version:
Interactive navigable audio visualization using Web Audio and Canvas
130 lines (103 loc) • 5.18 kB
HTML
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>wavesurfer.js | Microphone plugin</title>
<link href="data:image/gif;" rel="icon" type="image/x-icon" />
<!-- Bootstrap -->
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet">
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css" rel="stylesheet">
<link rel="stylesheet" href="../css/style.css" />
<link rel="stylesheet" href="../css/ribbon.css" />
<!-- wavesurfer.js -->
<script src="../../src/wavesurfer.js"></script>
<script src="../../src/webaudio.js"></script>
<script src="../../src/drawer.js"></script>
<script src="../../src/drawer.canvas.js"></script>
<!-- microphone renderer -->
<script src="../../plugin/wavesurfer.microphone.js"></script>
<!-- App -->
<script src="app.js"></script>
</head>
<body itemscope itemtype="http://schema.org/WebApplication">
<div class="container">
<div class="header">
<h1 itemprop="name"><a href="http://wavesurfer.fm">wavesurfer.js</a><noindex> + Microphone</noindex></h1>
</div>
<div id="demo">
<div id="waveform"></div>
<div class="controls">
<button id="micBtn" class="btn btn-primary" data-action="start">
Microphone:
<i class="glyphicon glyphicon-play"></i>
Start
/
<i class="glyphicon glyphicon-stop"></i>
Stop
</button>
</div>
</div>
<div class="row marketing">
<div class="col-lg-4">
<h4>wavesurfer.js Microphone Plugin</h4>
<p itemprop="about">Visualizes audio input from a microphone in <strong>wavesurfer.js</strong> instances.</p>
<h4>Installation</h4>
<p>
<ol>
<li>add the Microphone plugin script tag</li>
<li>create a <code>WaveSurfer</code> instance</li>
<li>add a container HTML element for the timeline</li>
<li>create a Microphone instance</li>
</ol>
</p>
<p>
<a class="btn btn-large btn-success" href="/plugin/wavesurfer.microphone.js" itemprop="downloadUrl">Download <strong>the plugin</strong> (2.4 KB)</a>
</p>
</div>
<div class="col-lg-8">
<h4>Quick Start</h4>
<noindex><p>
<pre><code>var wavesurfer = Object.create(WaveSurfer);
wavesurfer.init({
container : '#waveform',
waveColor : 'black',
loopSelection : false,
cursorWidth : 0
});
var microphone = Object.create(WaveSurfer.Microphone);
microphone.init({
wavesurfer: wavesurfer
});
</code></pre>
</p></noindex>
<br />
<h4>Options</h4>
<ul class="markdown-body">
<li><code>wavesurfer</code> - <em>required</em> - a WaveSurfer instance</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-12">
<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 <a rel="license" href="http://creativecommons.org/licenses/by/3.0/deed.en_US">Creative Commons Attribution 3.0 Unported License</a>.
</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>