pub trait ObsMediaSourceExt: ObsSourceTrait {
// Provided methods
fn media_play(&self) -> Result<(), ObsError> { ... }
fn media_pause(&self) -> Result<(), ObsError> { ... }
fn media_set_paused(&self, paused: bool) -> Result<(), ObsError> { ... }
fn media_restart(&self) -> Result<(), ObsError> { ... }
fn media_stop(&self) -> Result<(), ObsError> { ... }
fn media_next(&self) -> Result<(), ObsError> { ... }
fn media_previous(&self) -> Result<(), ObsError> { ... }
fn media_seek(&self, position: Duration) -> Result<(), ObsError> { ... }
fn media_position(&self) -> Result<Option<Duration>, ObsError> { ... }
fn media_duration(&self) -> Result<Option<Duration>, ObsError> { ... }
fn media_state(&self) -> Result<MediaState, ObsError> { ... }
}Provided Methods§
fn media_play(&self) -> Result<(), ObsError>
fn media_pause(&self) -> Result<(), ObsError>
fn media_set_paused(&self, paused: bool) -> Result<(), ObsError>
fn media_restart(&self) -> Result<(), ObsError>
fn media_stop(&self) -> Result<(), ObsError>
fn media_next(&self) -> Result<(), ObsError>
fn media_previous(&self) -> Result<(), ObsError>
Sourcefn media_seek(&self, position: Duration) -> Result<(), ObsError>
fn media_seek(&self, position: Duration) -> Result<(), ObsError>
Requests a media seek to position.
The native operation is asynchronous and source/plugin-specific. A successful return means
libobs accepted the request, not that Self::media_position already reflects it. Some
plugins may also defer a seek made while paused until playback resumes.
fn media_position(&self) -> Result<Option<Duration>, ObsError>
fn media_duration(&self) -> Result<Option<Duration>, ObsError>
fn media_state(&self) -> Result<MediaState, ObsError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".