Web Audio
Reads the signal that lights the filament.

How Riff uses it
The first time something plays through the audio element on a non-iOS browser, the script creates an AudioContext. It wraps the element in a media source and connects it through an analyser and back to the destination, so the sound still comes out. The context suspends on pause and resumes on play.
Why
This is what drives the filament. On iOS the graph breaks lock-screen and background playback, so iPhones are left out.
Without it
Where there is no analyser the wire breathes at working temperature on a fixed loop instead.
Where
- plugins/riff/assets/player/filament.js, line 60
const ctx = new AudioContext(); - plugins/riff/assets/player/filament.js, line 61
const src = ctx.createMediaElementSource( audio );
Links open the source at the commit this page was published from.
Specification: Web Audio API. Reference: Web Audio on MDN.