mirror of
https://github.com/Alvin-Zilverstand/Twitter-X-Media-Batch-Downloader.git
synced 2026-12-01 18:41:24 +01:00
v4.5
This commit is contained in:
1 parent
84b067ebd4
commit
e67d09a248
47 files changed
+3688
-958
No files matched your search
@@ -2,7 +2,15 @@ class AudioManager {
|
||||
private audioContext: AudioContext | null = null;
|
||||
private getAudioContext(): AudioContext {
|
||||
if (!this.audioContext) {
|
||||
this.audioContext = new (window.AudioContext || (window as any).webkitAudioContext)();
|
||||
const AudioContextConstructor = window.AudioContext || (window as Window & {
|
||||
webkitAudioContext?: typeof AudioContext;
|
||||
}).webkitAudioContext;
|
||||
if (!AudioContextConstructor) {
|
||||
throw new Error("Web Audio API is not supported in this browser");
|
||||
}
|
||||
const context = new AudioContextConstructor();
|
||||
this.audioContext = context;
|
||||
return context;
|
||||
}
|
||||
return this.audioContext;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user