Skip to main content

VideoBackend

Trait VideoBackend 

Source
pub trait VideoBackend: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn open(
        &self,
        request: &VideoRequest,
    ) -> Result<Box<dyn VideoPlayer>, String>;
}
Expand description

What opens videos (Video::backend, and the viewer’s).

Required Methods§

Source

fn name(&self) -> &str

Its name, in the widget’s state.

Source

fn open(&self, request: &VideoRequest) -> Result<Box<dyn VideoPlayer>, String>

A player, paused at the start of the file, or why not. It stops when dropped, without making the interface’s thread wait.

Implementors§