How jagthedrummer/ember-stereo works
ember-stereo is an Ember audio playback library. An app supplies an identifier or URL to a template helper or the stereo service; the service resolves and loads a sound through connection strategies, then exposes playback state and controls for reactive UI. The README also documents audio metadata, error/state helpers, position and volume modifiers, and HLS/Howler/native connection support. Source excerpts show the service’s utility dependencies and the native adapter’s base-class relationship; unsampled helper and adapter wiring is represented only where documented.
Main entry points: stereo.js Stereo service · strategizer.js Strategy selection · play-sound.js Template helpers · sound-is-playing.js Sound state helpers
Components 18
Ember API
- Template helpers
ember-stereo/src/helpers/play-sound.js - Stereo service
ember-stereo/src/services/stereo.js
Playback Core
- URL normalization
ember-stereo/src/-private/utils/stereo-url.js - Sound and URL caches
ember-stereo/src/-private/utils/sound-cache.js - Strategy selection
ember-stereo/src/-private/utils/strategizer.js - Connection loading
ember-stereo/src/-private/utils/connection-loader.js - Error tracking
ember-stereo/src/-private/utils/error-cache.js - Sound proxy
ember-stereo/src/-private/utils/sound-proxy.js - Shared audio access
ember-stereo/src/-private/utils/shared-audio-access.js
Audio Connections
- Sound base
ember-stereo/src/stereo-connections/base.js - Native audio
ember-stereo/src/stereo-connections/native-audio.js - HLS connection
ember-stereo/src/stereo-connections/hls.js - Howler connection
ember-stereo/src/stereo-connections/howler.js
Reactive UI
- Sound state helpers
ember-stereo/src/helpers/sound-is-playing.js - Metadata helpers
ember-stereo/src/helpers/sound-metadata.js - Error details helper
ember-stereo/src/helpers/sound-error-details.js - Position and volume
ember-stereo/src/modifiers/sound-position-slider.js
Other components
- Ember app
Connections 23
- Ember app → Template helpers: invokes
- Ember app → Stereo service: calls
- Template helpers → Stereo service: controls
- Stereo service → URL normalization: normalizes URLs
ember-stereo/src/services/stereo.js - Stereo service → Sound and URL caches: uses caches
ember-stereo/src/services/stereo.js - Stereo service → Strategy selection: selects strategies
ember-stereo/src/services/stereo.js - Stereo service → Connection loading: loads connections
ember-stereo/src/services/stereo.js - Stereo service → Error tracking: tracks errors
ember-stereo/src/services/stereo.js - Stereo service → Sound proxy: creates proxies
ember-stereo/src/services/stereo.js - Stereo service → Shared audio access: shares audio
ember-stereo/src/services/stereo.js - Strategy selection → URL normalization: builds URL strategy
ember-stereo/src/-private/utils/strategizer.js - Strategy selection → Sound base: tests connections
- Native audio → Sound base: extends
ember-stereo/src/stereo-connections/native-audio.js - Stereo service → HLS connection: tries connection
- Stereo service → Howler connection: tries connection
- Ember app → Sound state helpers: reads state
- Ember app → Metadata helpers: reads metadata
- Ember app → Error details helper: reads errors
ember-stereo/src/helpers/sound-error-details.js - Ember app → Position and volume: binds controls
- Sound state helpers → Stereo service: queries sounds
- Metadata helpers → Stereo service: queries sounds
- Error details helper → Stereo service: reads cached errors
ember-stereo/src/helpers/sound-error-details.js - Position and volume → Stereo service: sets playback position