Function: narrate()
narrate(
host,url,options):Promise<AudioTrack>
Defined in: src/audio/Voiceover.ts:393
Place a pre-recorded narration clip at the current timeline time ("now") and, by default, hold the scene for the clip's length.
The clip goes into the scene's AudioManager, so AudioManager.mixdown and a
WebCodecs video export hold it at the same time offset as the frames that
were on screen when it started.
await scene.play(new Create(circle));
await narrate(scene, '/narration/intro.mp3'); // starts now, waits its length
Parameters
host
url
string
options
NarrateOptions = {}
Returns
Promise<AudioTrack>
The scheduled track (its startTime is the "now" it was placed at)
Post
result.startTime >= 0