diff --git a/specs/components/engine/audio/SPEC.md b/specs/components/engine/audio/SPEC.md index f62937f6..c05aed08 100644 --- a/specs/components/engine/audio/SPEC.md +++ b/specs/components/engine/audio/SPEC.md @@ -11,6 +11,7 @@ This component is responsible for playing audio in the browser or web view. This - Broadcasting the audio element allows other browser tabs to monitor its playback progress and state, volume, etc. - When the broadcast leader tab gets closed, another tab will take the leader role and when that happens; if the audio was playing, the audio must start playing in the tab of the new leader. - Consumers of this custom element must be able to tap into the code that allows for audio visualisations. Though it is not required to work simultaneously on all browser tabs. +- Audio is routed through the Web Audio API (`createMediaElementSource`) so consumers can insert their own processing (equalizer filters, analyzers for visualizations, etc) via the exposed `webAudio` graph. - The volume of the audio must be able to be set and persisted across sessions. This value depends on the used `group`. - The mime type must be set on the audio if provided. - The element must support a `initial-progress` attribute which can be used to start playing audio from that particular point. @@ -19,3 +20,19 @@ This component is responsible for playing audio in the browser or web view. This ## Implementation specific - When using a HTML audio element, use a silent audio file data-uri as the `src` to cancel the loading of any data. + +### Web Audio graph + +Every `