12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- 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<bool> load();
- /// 定位到指定帧
- Future<bool> locateTo(int index);
- /// 播放
- void play();
- /// 暂停
- void pause();
- /// 释放资源
- void dispose();
- /// 事件处理
- late final FEventHandler<VidPlayerEvent> eventHandler;
- /// 帧更新事件
- late final FEventHandler<VidUsImage> frameUpdated;
- /// 首帧事件处理
- late final FEventHandler<VidUsImage> firstFrameLoaded;
- /// 单帧加载状态变更事件
- late final FEventHandler<bool> frameLoadStateChanged;
- /// 发生错误事件
- late final FEventHandler<String?> errorOccured;
- }
|