import 'package:fis_common/event/event_type.dart';
import 'package:fis_measure/interfaces/process/player/play_controller.dart';
import 'package:fis_measure/view/player/enums.dart';

class ImageState {
  ///当前状态
  VidPlayStatus status = VidPlayStatus.ready;

  ///是否自动播放
  bool isAutoPlay = false;

  ///是否显示播放Icon
  int reloadTimes = 0;

  ///是否播放结束
  bool isPlayEnd = false;

  ///播放器Controller
  IPlayerController? vidPlayerController;

  ///播放状态改变
  FEventHandler<VidPlayStatus> onStateChanged = FEventHandler<VidPlayStatus>();

  ImageState({
    bool? isAutoPlay,
    VidPlayStatus? status,
  }) {
    this.isAutoPlay = isAutoPlay ?? false;
    this.status = status ?? VidPlayStatus.ready;
  }
}
