MorseAudioContext
Constructor Summary
Public Constructor | ||
public |
|
Member Summary
Public Members | ||
public |
AudioContext: * |
|
public |
audioContext: * |
|
public |
|
|
public |
isIOS: * |
|
public |
sounds: {} |
Private Members | ||
private |
|
Method Summary
Public Methods | ||
public |
|
|
public |
decodeSample(key: *) |
|
public |
getAudioContext(): * Get an AudioContext. |
|
public |
getSounds(): * |
|
public |
init() |
|
public |
isUnlocked(): * |
|
public |
loadSample(url: *, key: *) |
|
public |
|
|
public |
runUnlockedActions(code: *) Called when we get a running AudioContext |
Public Constructors
public constructor() source
Public Members
public AudioContext: * source
public audioContext: * source
public isIOS: * source
public sounds: {} source
Private Members
Public Methods
public closeAudioContext() source
public decodeSample(key: *) source
Params:
Name | Type | Attribute | Description |
key | * |
public getAudioContext(): * source
Get an AudioContext. The state of the AudioContext may be "suspended". In Chrome (v83 Windows), Safari (v13.1 Mac Catalina), iOS (v11) you get a running context (and runUnlockedActions executes) upon user interaction. In Edge (v44.18362.449.0 Windows) you get a running AudioContext straight away but the runUnlockedActions executes. In Firefox (v75 Windows) you get a suspended AudioContext but it resumes (and runUnlockedActions executes) after a short while without interaction.
Return:
* |
public init() source
public loadSample(url: *, key: *) source
Params:
Name | Type | Attribute | Description |
url | * | ||
key | * |
public playHTMLaudio() source
public runUnlockedActions(code: *) source
Called when we get a running AudioContext
Params:
Name | Type | Attribute | Description |
code | * |