Class: AudioComponent

AudioComponent(dataObjectopt, optionsopt)

AudioComponent contains a sound source and shows an icon. If you want to display controls, use {AudioPlayerComponent}.

Constructor

new AudioComponent(dataObjectopt, optionsopt)

Parameters:
Name Type Attributes Default Description
dataObject DataObject <optional>
null
options Object <optional>
Properties
Name Type Attributes Default Description
audio string <optional>
null a URL to an audio file
audioDOM HTMLElement <optional>
null an HTML `audio` element to use as a source
Source:
To Do:
  • Actually display the icon
Example
const audioComponent = new AudioComponent(undefined, {
	audio: '/media/sound.wav'
})

Members

audio :HTMLAudioElement

Type:
  • HTMLAudioElement
Source: