API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classMusicFactory

@codexo/exojs / resources / stable

AssetFactory implementation that loads streaming audio assets (MP3, OGG, WAV, AAC, and other browser-supported formats) and produces a Music instance backed by an `<audio>` element. Unlike SoundFactory, music assets are decoded lazily via the browser's streaming audio pipeline rather than being fully decoded into an AudioBuffer up-front, making them appropriate for long-form background tracks. The underlying `<audio>` elements are paused and detached when MusicFactory.destroy is called.

1
props
5
methods
0
events
Import
import { MusicFactory } from '@codexo/exojs'

AssetFactory implementation that loads streaming audio assets (MP3, OGG, WAV, AAC, and other browser-supported formats) and produces a Music instance backed by an `\<audio>` element.

Unlike SoundFactory, music assets are decoded lazily via the browser's streaming audio pipeline rather than being fully decoded into an AudioBuffer up-front, making them appropriate for long-form background tracks. The underlying `\<audio>` elements are paused and detached when MusicFactory.destroy is called.

Constructors 1
new(): MusicFactory
Methods 5
create(source: ArrayBuffer, options: MusicFactoryOptions): Promise<Music>
createObjectUrl(blob: Blob): string
destroy(): void
process(response: Response): Promise<ArrayBuffer>
revokeObjectUrl(objectUrl: string): void
Properties 1
storageName: "music"
Source