Skip to main content

EmbedBackend

Trait EmbedBackend 

Source
pub trait EmbedBackend: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn open(&self, request: &EmbedRequest) -> Result<Box<dyn Embedded>, String>;

    // Provided method
    fn in_panel(&self, place: &Placement) -> bool { ... }
}
Expand description

What opens web views for the viewer (ViewerPlugin::web_video).

Required Methods§

Source

fn name(&self) -> &str

Its name, in viewer.state.

Source

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

A web view loading the request’s page, or why not. It closes when dropped.

Provided Methods§

Source

fn in_panel(&self, place: &Placement) -> bool

Whether a web view opened at place sits over the panel, so that the panel’s place is the player’s size (checked against MIN_PLAYER); false: a window of its own, which the backend keeps at least MIN_PLAYER each way. By default: a child of an X11 window.

Implementors§