player_plugin library

player_plugin.dart Dart API for the native video player (iOS + Android).

Usage: final controller = PlayerController(); Widget playerWidget = PlayerView(controller: controller);

// After the view is created: await controller.play('https://example.com/video.m3u8');

Classes

FullscreenPlayerPage
Full-screen landscape page for video playback.
GestureLayer
Transparent gesture-capture layer placed on top of the native PlatformView.
MobileOverlay
MoheVVC
火龙 VVC (H.266) 全屏播放。
PlayerController
Controls the native iOS video player.
PlayerEvent
Typed representation of a native player event.
PlayerLoadFailureReason
加载失败原因常量(与 iOS/Android 原生上报的 reason 字符串一致)。 宿主监听 error 事件后读取 params['detail']['reason'] 与之比较, 即可对断网/弱网/超时分别展示「加载失败/点击重试」等提示。
PlayerPreload
全局预加载控制器。单例,使用 plugin-level MethodChannel('player_plugin')。
PlayerQualityConfig
全局画质选项配置。在播放前调用一次,原生画质选择器即使用该配置。
PlayerUIState
Tracks all playback state driven by PlayerController.eventStream.
PlayerView
A widget that renders the native iOS / Android video player.
PlayerViewWithControls
A drop-in replacement for PlayerView that adds a Flutter UI control layer.
PreloadRequest
单个视频预加载请求。对齐 iOS {@code ILookPreloadTask}。
VideoProgressBar

Enums

PlayerFitMode
画面填充模式。
PlayerMode
Native player mode.