0.1.3 • Published 6 years ago

audio-context-unblocker v0.1.3

Weekly downloads
13
License
SEE LICENSE IN LI...
Repository
-
Last release
6 years ago

Audio Context Unblocker

A utility class which detects if the AudioContext has been automatically suspended (Thanks, Google!), and displays a Google Chrome style User Interface to alert the user and allow them to easily unblock the audio.

Installation

npm install audio-context-unblocker

Usage

import { AudioContextUnblocker } from 'audio-context-unblocker'

const myAudioContext = new AudioContext() // your existing audio context.
const audioContextUnblocker = new AudioContextUnblocker(myAudioContext);

If the AudioContextUnblocker detects that the passed context has been automatically blocked, a UI will be shown to unblock.

Audio Context Unblocker

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago