FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    NativeMediaSession

    trait · ferroui-media-video · v0.5.0

    trait NativeMediaSession
    

    Narrow platform boundary. poll reports native facts, not requested intent. Implementations must release native resources on Drop and keep returned frame allocations immutable until the last lease/GPU completion releases them.

    View source

    Members

    has_pending_frame_work

    fn has_pending_frame_work(self: &Self) -> bool
    

    A producer/import is still pending, including a ready native image waiting for bounded GPU storage. Presentation must keep polling even while native playback is paused or ended; submission is not readiness.

    Source

    state

    fn state(self: &Self) -> Result<MediaPlaybackSession, MediaError>
    

    Source

    play

    fn play(self: &Self) -> MediaFuture<()>
    

    Source

    pause

    fn pause(self: &Self) -> Result<(), MediaError>
    

    Source

    stop

    fn stop(self: &Self) -> Result<(), MediaError>
    

    Retires pending preview output while preserving source ownership. The player separately resets seekable media and owns frame-zero publication.

    Source

    seek

    fn seek(self: &Self, position: Duration) -> MediaFuture<Duration>
    

    Source

    set_audio

    fn set_audio(self: &Self, volume: f64, muted: bool) -> Result<(), MediaError>
    

    Source

    supports_playback_rate

    fn supports_playback_rate(self: &Self) -> bool
    

    Source

    set_playback_rate

    fn set_playback_rate(self: &Self, _rate: f64) -> Result<(), MediaError>
    

    Source

    supports_casting

    fn supports_casting(self: &Self) -> bool
    

    Source

    cast

    fn cast(self: &Self) -> MediaFuture<()>
    

    Source

    tracks

    fn tracks(self: &Self, _kind: MediaTrackKind) -> Vec<MediaTrack>
    

    Source

    select_track

    fn select_track(self: &Self, _kind: MediaTrackKind, _id: Option<u32>) -> Result<(), MediaError>
    

    Source

    caption_text

    fn caption_text(self: &Self) -> Option<String>
    

    Source

    take_frame

    fn take_frame(self: &Self) -> Result<Option<FrameLease>, MediaError>
    

    Source

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.