Skip to content

StimulatingSolutions/simple-audio

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple-audio

Small Module to pre-load and play audio using HTML audio tag, forked from https://github.com/MauriceButler/simple-audio

Addresses the Chrome for Andriod issue 178297

Usage

HTML

<audio id="foo">
    <source src="foo.mp3"></source>
    <source src="foo.wav"></source>
    <source src="foo.ogg"></source>
</audio>

JavaScript

var audio = require('simple-audio');
audio.setVolume('foo', 0.5);
audio.playSound('foo');
// ... if additional audio elements are added later...
audio.captureAudioElements();

About

Small Module to play audio using HTML <audio> tag

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%