import 'package:fis_common/event/event_type.dart';

import 'room.dart';
import 'models.dart';

/// RTMP仿WebRTC适配器
class NTRtmp2RtcAdapter {
  static NTRtmp2RtcAdapter? _adapter;

  /// 建立桥接
  static void bridging(NTRtmp2RtcAdapter adapter) {
    _adapter = adapter;
  }

  /// 当前适配器
  static NTRtmp2RtcAdapter get adapter {
    if (_adapter == null) {
      bridging(NTRtmp2RtcAdapter()); //TODO:
    }
    return _adapter!;
  }

  /// 当前RTMP房间
  NTRtmpRoom? room;

  RtmpMemberInfo? localMemberInfo;

  final remoteMemberJoineEvent = FEventHandler<RtmpMemberInfo>();
  final remoteMemberLeaveEvent = FEventHandler<String>();
  final mmberMuteVideoEvent = FEventHandler<RtmpSetMuteEventArgs>();
  final mmberMuteAudioEvent = FEventHandler<RtmpSetMuteEventArgs>();
}
