Skip to content

Commit 303d126

Browse files
committed
Merge branch 'master' of github.com:chrisweb/web-audio-api-player
2 parents ae58030 + f9c8c24 commit 303d126

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,17 +162,20 @@ publish a new version on npmjs
162162

163163
### web audio api typings notes
164164

165-
As of now (25.05.2019) the web audio api typings seems to be included in lib.d.ts, so removing them from package.json:
165+
As of the 25.05.2019 the web audio api typings seem to be included in lib.d.ts, so removing them from package.json:
166166

167167
```json
168168
"dependencies": {
169169
"@types/webaudioapi": "0.0.27"
170170
},
171171
```
172172

173-
Unfortunately the defined window does not have AudioContext:
174-
check out [[open] github ticket (as of 06/2019)](https://github.com/microsoft/TypeScript/issues/31686)
175-
the current [dom.d.ts on github](https://github.com/microsoft/TypeScript/blob/master/src/lib/dom.generated.d.ts)
173+
Unfortunately (as of 06/2019) the defined window does not have AudioContext:
174+
175+
* check out [github ticket](https://github.com/microsoft/TypeScript/issues/31686)
176+
* the current [dom.d.ts on github](https://github.com/microsoft/TypeScript/blob/master/src/lib/dom.generated.d.ts)
177+
178+
This is fixed, as of now (20.02.2023) the AudioContext is now defined properly
176179

177180
## Changelog
178181

src/library/audio.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class PlayerAudio {
132132
return new Promise((resolve, reject) => {
133133

134134
// eslint-disable-next-line @typescript-eslint/no-explicit-any
135-
const MyAudioContext: typeof AudioContext = (window as any).AudioContext || (window as any).webkitAudioContext;
135+
const MyAudioContext: typeof AudioContext = window.AudioContext || (window as any).webkitAudioContext;
136136

137137
// initialize the audio context
138138
try {

0 commit comments

Comments
 (0)