Skip to main content
Version: 8.1

Perspective - Audio

Component Palette Icon:

info

The UI for this component is hidden by default and is browser dependent. There is a hidden property, props.display, which can be used to display UI for this component. In the event a user is displaying the UI (props.display = true), the component will be displayed differently based on the browser in use.

Description​

New in 8.1.16
An audio component, hidden by default, that Designers can use to play and pause sound clips in the browser.

Supported Audio Files​

Supported audio file types are browser dependent.

File TypeBrowser Compatibility
3GPFirefox for Android
ADTSFirefox

Available only if available on the underlying operating system's media framework.
FLACChrome 56, Edge 16, Firefox 51, Safari 11
MPEG-4 (MP4)Chrome 3, Edge 12, Firefox, Internet Explorer 9, Opera 24, Safari 3.1
OggChrome 3, Firefox 3.5, Edge 17 (desktop only), Internet Explorer 9, Opera 10.50

Edge requires Web Media Extensions to be installed.
QuickTime (MOV)Only older versions of Safari, plus other browsers that supported Apple's QuickTime plugin
Waveform Audiofile (WAV)Chrome 8+, Edge 12+, Firefox 4+, Opera 11.5+, Safari 4+
WebMChrome 6, Edge 17 (desktop only), Firefox 4, Opera 10.6, Safari 14.1 (macOS), Safari 15 (iOS).

Edge requires Web Media Extensions to be installed.

Properties​

Most Properties have binding options. For more information on Bindings, see Types of Bindings in Perspective. This section only documents the Props Category of properties. The other Categories are described on the Perspective Component Properties page.

NameDescriptionProperty Type
sourceThe source URL of the media file.value: string
playThe play state of the media file. Toggling this property will start or pause the media file.value: boolean
loopDetermines if the media file should loop after reaching the end.value: boolean
volumeThe percentage of maximum volume (from 0 to 100).value: numeric
playbackRateA double that represents the playback rate of the media file.value: numeric
allowDownloadDetermines whether the audio player allows downloading of the media file.value: boolean
styleSets a style that applies to the component. The Style menu contains all the tools for modifying text, background, margins, and borders. You can also specify a style class.object

Scripting​

See the Perspective - Audio Scripting page for the full list of scripting functions available for this component.