How To: Advanced Composition
Nested sequences
Sequences can nest inside other sequences. Each level computes its duration independently.
<ef-timegroup mode="sequence" overlap="1s"><ef-timegroup mode="sequence"><ef-timegroup mode="fixed" duration="3s">Sub A1</ef-timegroup><ef-timegroup mode="fixed" duration="2s">Sub A2</ef-timegroup></ef-timegroup><ef-timegroup mode="fixed" duration="4s">B</ef-timegroup></ef-timegroup>
The inner sequence has duration 5s. After a 1s overlap, B starts at 4s. Total: 9s.
Background track spanning a full sequence
Use contain as the root with a sequence for content and a fit for the background:
<ef-timegroup mode="contain"><ef-timegroup mode="sequence"><ef-timegroup mode="fixed" duration="3s">Intro</ef-timegroup><ef-timegroup mode="fixed" duration="10s">Main</ef-timegroup><ef-timegroup mode="fixed" duration="2s">Outro</ef-timegroup></ef-timegroup><ef-timegroup mode="fit"><!-- background — spans full 15s automatically --></ef-timegroup></ef-timegroup>
The contain parent takes the longest child (the sequence at 15s). The fit child inherits that 15s. The background is always in sync with the content, regardless of how scene durations change.