mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-01 15:50:13 +00:00
types/soundmanager2 - added audioFormats SoundManager Top-Level property (#39048)
* types/soundmanager2 - added audioFormats SoundManager Top-Level property * Update types/soundmanager2/index.d.ts - added related to SoundManagerAudioFormat Co-Authored-By: Andrew Branch <andrewbranch@users.noreply.github.com>
This commit is contained in:
committed by
Andrew Branch
parent
ff69d22d5d
commit
7134cfbbb4
7
types/soundmanager2/index.d.ts
vendored
7
types/soundmanager2/index.d.ts
vendored
@@ -54,6 +54,12 @@ declare namespace soundmanager {
|
||||
duration?: number | null;
|
||||
}
|
||||
|
||||
interface SoundManagerAudioFormat {
|
||||
type: string[];
|
||||
required: boolean;
|
||||
related?: string[];
|
||||
}
|
||||
|
||||
interface SoundManagerProps {
|
||||
/**
|
||||
* The directory where SM2 can find the flash movies (soundmanager2.swf,
|
||||
@@ -141,6 +147,7 @@ declare namespace soundmanager {
|
||||
togglePause(id: string): SMSound;
|
||||
unload(id: string): SMSound;
|
||||
unmute(id?: string): SMSound;
|
||||
audioFormats?: { [audioFormat: string]: SoundManagerAudioFormat };
|
||||
}
|
||||
|
||||
class SMSound {
|
||||
|
||||
@@ -24,3 +24,8 @@ soundManager.setup({
|
||||
volume: 33
|
||||
}
|
||||
});
|
||||
|
||||
// set mp3 format not required
|
||||
if (soundManager.audioFormats) {
|
||||
soundManager.audioFormats.mp3.required = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user