Home Reference Source Repository
public class | source

MorseAudioContext

You can directly use an instance of this class. morseAudioContext

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public
public
public

isIOS: *

public

sounds: {}

Private Members
private

Method Summary

Public Methods
public
public

decodeSample(key: *)

public

Get an AudioContext.

public

getSounds(): *

public

init()

public

isUnlocked(): *

public

loadSample(url: *, key: *)

public
public

Called when we get a running AudioContext

Public Constructors

public constructor() source

Public Members

public AudioContext: * source

public audioContext: * source

public hasAudioContext: boolean source

public isIOS: * source

public sounds: {} source

Private Members

private _unlocked: boolean source

Public Methods

public closeAudioContext() source

public decodeSample(key: *) source

Params:

NameTypeAttributeDescription
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 getSounds(): * source

Return:

*

public init() source

public isUnlocked(): * source

Return:

*

public loadSample(url: *, key: *) source

Params:

NameTypeAttributeDescription
url *
key *

public playHTMLaudio() source

public runUnlockedActions(code: *) source

Called when we get a running AudioContext

Params:

NameTypeAttributeDescription
code *