Audio
The <Audio> component is a drop-in replacement for the <audio> tag. This is how you insert audio into Liqvid videos, ensuring that the audio will be synced up to the video playback. The syntax is:
import {Audio} from "liqvid";
<Audio>
<source src={`audio.webm`} type="audio/webm"/>
<source src={`audio.mp4`} type="audio/mp4"/>
</Audio>
Props
This component accepts the following props. Any additional props or children will be forwarded to the underlying <audio> element.
obstructCanPlay
If true, prevents Player.canPlay from resolving until the underlying <audio> element can play.
obstructCanPlay?: boolean = false;
obstructCanPlayThrough
If true, prevents Player.canPlayThrough from resolving until the underlying <audio> element can play through.
obstructCanPlayThrough?: boolean = false;
start
Time in milliseconds when the video should start playing.
start?: number = 0;
Web Autoplay Policy
When recording, it can be helpful to record several segments individually. Then you can use several <Audio> elements with different start attributes. However, due to the Web Autoplay Policy, the final recording must be joined into a single file. We provide the liqvid audio join command to help with this.