Skip to content

Commit 0d0840a

Browse files
README.md: add brief intro
1 parent e5cf19f commit 0d0840a

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# iOS Silent Hack
2+
3+
iOS Silent Hack is a library that allows you to play audio context even if the user has the Silent switch on.
4+
You'll need to wait for an user interaction to check if the audio context is allowed.
5+
6+
## Usage
7+
8+
```js
9+
import SilentHack from '@activetheory/ios-silent-hack';
10+
11+
const silentHack = new SilentHack();
12+
13+
// after the library is initialized, you can check if the audio context is allowed
14+
console.log(silentHack.allowed);
15+
16+
// if you want to remove the event listeners after the audio context is allowed, you can call the destroy method
17+
silentHack.destroy();
18+
```

0 commit comments

Comments
 (0)