pub struct PreviewMediaRequest {
pub items: Vec<PreviewMediaItem>,
pub start_index: i32,
pub advance: PreviewMediaAdvance,
pub show_index_indicator: bool,
pub callback_id: u64,
pub presented_callback_id: u64,
pub change_callback_id: u64,
}Fields§
§items: Vec<PreviewMediaItem>§start_index: i32§advance: PreviewMediaAdvance§show_index_indicator: bool§callback_id: u64Callback_id for the final preview result. Fires once when the session
ends (manual/auto/interrupted/error). Payload: serialized
PreviewMediaResultObj ({reason, lastIndex}).
presented_callback_id: u64Callback_id for the “first frame composited” signal. Fires once when
the first pixel of the underlying media has been painted to screen.
Native MAY skip on degenerate paths (abort before any item rendered,
process tear-down, etc.) — the JS-side presented Promise is also
woken by a fallback when completed settles, and by a total timeout
after that, so it never hangs. The callback payload, when fired, is
an empty JSON object {}.
change_callback_id: u64Stream callback_id for current-item changes. Native fires it with
payload {"index": N} whenever the displayed item changes — including
the initially displayed item — for swipes, taps, and auto-advance.
Consecutive duplicates are tolerated (the JS side dedupes); missing
the initial fire is also tolerated (the JS side seeds the snapshot
from startIndex).
Trait Implementations§
Source§impl Clone for PreviewMediaRequest
impl Clone for PreviewMediaRequest
Source§fn clone(&self) -> PreviewMediaRequest
fn clone(&self) -> PreviewMediaRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more