AbstractWhether sidecar is active. Only active sidecar is shown, inactive sidecar only warms up.
Sidecar duration in seconds, available once loaded.
Emits whether sidecar should be shown, see shown.
Whether sidecar element has its source attached, see SidecarVideoResidency.
Whether sidecar should be shown, sidecar is active and main media time is inside its time window.
Resolved time window, available once loaded.
Whether sidecar is warming up hidden, ahead of its time window, or inside it while inactive.
Awake priority is distance in seconds of main media time from sidecar warm-up and time window, active sidecar inside its time window comes first. Warm-up is on the side main media enters time window from, see SidecarTimeWindow.warmUpIn.
Called when slot became free, waiting candidate may try to acquire it again.
Activates or deactivates sidecar, sidecar is re-synced with main media.
Updates track state, time window is re-resolved and sidecar is re-synced with main media.
Called when candidate lost its awake slot to more important one, candidate releases its source and waits for a free slot.
Plays sidecar in its own SidecarDomController, synced with main media.
Main media is the master clock. Main media time is mapped to sidecar time through SidecarTimeWindow. Base controller resolves time window position, warm-up, visibility, residency and whether main media has to wait for sidecar. Playing, pausing and seeking sidecar media is left to subclass, see syncPlayback.
Sidecar element has its source attached only while main media time is near its time window, from SidecarTrackControllerConfig.wakeAhead before warm-up to SidecarTrackControllerConfig.keepAwakeAfter after time window. Elsewhere sidecar is dormant, source is released, so many sidecars on main media timeline don't hold decoders, network and buffers. Dormant active sidecar inside its time window is woken up and main media waits for it. Number of sidecars awake at once is limited by SidecarTrackControllerConfig.awakeBudget, sidecars closer to main media time take precedence.
First load needs sidecar duration, to validate time window: