Skip to main content

AudioSinkFactory

Trait AudioSinkFactory 

Source
pub trait AudioSinkFactory: Send + Sync {
    // Required method
    fn create(&self) -> Arc<dyn AudioSink> ⓘ;
}
Expand description

Creates one AudioSink per media element.

Audio widgets are built off the UI thread during layout, so the engine cannot construct a platform sink itself. The host injects this factory through the layout task instead.

Required Methods§

Source

fn create(&self) -> Arc<dyn AudioSink> ⓘ

Builds a sink for one <audio> element.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§