import 'package:fis_common/event/event_type.dart'; import 'package:fis_measure/view/player/enums.dart'; import 'package:fis_measure/view/player/events.dart'; import 'package:fis_vid/data_channel/channel.dart'; import 'package:vid/us/vid_us_image.dart'; /// 播放器控制器 abstract class IPlayerController { /// 状态 VidPlayStatus get status; /// 当前帧的信息 VidUsImage? get currentFrame; /// 是否已释放 bool get disposed; /// 数据通道 VidDataChannel get dataChannel; /// 链接 String get url; bool get hasView; /// 加载资源 Future load(); /// 定位到指定帧 Future locateTo(int index); /// 播放 void play(); /// 暂停 void pause(); /// 释放资源 void dispose(); /// 事件处理 late final FEventHandler eventHandler; /// 帧更新事件 late final FEventHandler frameUpdated; /// 首帧事件处理 late final FEventHandler firstFrameLoaded; /// 单帧加载状态变更事件 late final FEventHandler frameLoadStateChanged; /// 发生错误事件 late final FEventHandler errorOccured; }