pub trait VideoPlayerManager:
Send
+ Sync
+ 'static {
// Required method
fn bind_player(
&self,
component_id: &str,
) -> Result<Box<dyn VideoPlayerHandle>, PlatformError>;
// Provided method
fn set_player_callback(
&self,
_component_id: &str,
_callback_id: u64,
) -> Result<(), PlatformError> { ... }
}Expand description
Platform-facing API for binding to native component video instances. Note: Native player creation is handled by the UI layer, not Rust.
Required Methods§
Sourcefn bind_player(
&self,
component_id: &str,
) -> Result<Box<dyn VideoPlayerHandle>, PlatformError>
fn bind_player( &self, component_id: &str, ) -> Result<Box<dyn VideoPlayerHandle>, PlatformError>
Bind to an existing native player.
Returns a handle for dispatching commands to the player. The native player must already be created by the UI layer (native component).
Provided Methods§
Sourcefn set_player_callback(
&self,
_component_id: &str,
_callback_id: u64,
) -> Result<(), PlatformError>
fn set_player_callback( &self, _component_id: &str, _callback_id: u64, ) -> Result<(), PlatformError>
Set (or update) the callback ID for video player events for a component.
Default implementation is a no-op for platforms that don’t support callbacks.