Closed
Description
Bug Report 🐛
- Audio Starts prematurely when using
premountFor
TheAudio
element inside aSequence
withpremountFor
set starts playing before the sequence actually becomes visible. In the example below, the audio is expected to start at frame 30. However, due topremountFor
being set to30
, the audio begins playback from frame0
instead. - Audio playback continues even after player stops
When the player is started and then stopped before reaching frame 30, the audio never stops playing as expected. This results in the audio continuing in the background, even though playback has been halted.
const container: React.CSSProperties = {
backgroundColor: "white",
};
export const Main = ({ title }: z.infer<typeof CompositionProps>) => {
const { durationInFrames } = useVideoConfig();
return (
<AbsoluteFill style={container}>
<Sequence from={0} durationInFrames={durationInFrames}>
<div>test</div>
</Sequence>
<Sequence from={30} durationInFrames={100} premountFor={30}>
<Audio src="https://sampleaudio.url />
</Sequence>
</AbsoluteFill>
);
};
Tested on version 4.0.311
and 4.0.267