npm install itako-audio-reader-audio-element --save
specify instance as first argument of the Itako constructor as the value of the array.
<script src="https://npmcdn.com/itako"></script>
<script src="https://npmcdn.com/itako-audio-reader-audio-element"></script>
<script>
var reader = new ItakoAudioReaderAudioElement('audio', {
// default gain volume (1~0)
volume: 1,
// default audio playbackRate (~0)
pitch: 1,
});
var itako = new Itako([reader], [{
transform: function(tokens){
return tokens.map(function(token){
return token.setType('audio');
})
},
}]);
// read the first argument as audio(via transform)
itako.read('http://static.edgy.black/fixture.wav');
</script>
Requirement global
- NodeJS v5.10.0
- Npm v3.7.1
- Chrome Launcher 49.0.2623 (Mac OS X 10.11.4)
git clone https://github.com/itakojs/itako-audio-reader-audio-element
cd itako-audio-reader-audio-element
npm install
npm test