itako-audio-reader-audio-context
v0.2.0
Published
itako-v0 AudioContext audio-player plugin
Downloads
10
Maintainers
Readme
Itako Audio Reader Audio Context
Installation
npm install itako-audio-reader-audio-context --save
Usage
ItakoAudioReaderAudioContext(type, options)
-> reader
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-context"></script>
<script>
var reader = new ItakoAudioReaderAudioContext('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>
Recommended file format
ogg
,.mp3
(audioContext is unstable in.wav
,.m4a
)
See also
Development
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-context
cd itako-audio-reader-audio-context
npm install
npm test