class RtmpMemberInfo {
  final String id;
  final RtmpLiveInfo? liveInfo;
  final List<DeviceRtmpLiveInfo>? deviceInfoList;

  bool get isDevice =>
      liveInfo == null && deviceInfoList != null && deviceInfoList!.isNotEmpty;

  RtmpMemberInfo({
    required this.id,
    this.liveInfo,
    this.deviceInfoList,
  });
}

class DeviceRtmpLiveInfo extends RtmpLiveInfo {
  final DeviceTypeEnum type;
  final bool isMerge;
  final int mergeWidth;
  final int mergeHeight;

  DeviceRtmpLiveInfo({
    required super.flvUrl,
    required super.rtmpUrl,
    required super.width,
    required super.height,
    required this.type,
    this.isMerge = false,
    this.mergeWidth = 0,
    this.mergeHeight = 0,
  });
}

class RtmpLiveInfo {
  final String flvUrl;
  final String rtmpUrl;
  final String? pushUrl;
  final int width;
  final int height;

  RtmpLiveInfo({
    required this.flvUrl,
    required this.rtmpUrl,
    this.pushUrl,
    required this.width,
    required this.height,
  });
}

enum DeviceTypeEnum {
  desktop,
  camera,
}

class RtmpSetMuteEventArgs {
  final String userId;
  final bool isMute;

  RtmpSetMuteEventArgs({
    required this.userId,
    required this.isMute,
  });
}
