copyWith method

ParticipantSFU copyWith({
  1. String? ownerId,
  2. bool? isVideoEnabled,
  3. bool? isAudioEnabled,
  4. bool? isE2eeEnabled,
  5. bool? isSpeakerPhoneEnabled,
  6. bool? isSharingScreen,
  7. CameraType? cameraType,
  8. AudioLevel? audioLevel,
  9. RTCPeerConnection? peerConnection,
  10. WebRTCCodec? videoCodec,
  11. dynamic onFirstFrameRendered()?,
  12. MediaSource? cameraSource,
  13. MediaSource? screenSource,
})

Implementation

ParticipantSFU copyWith({
  String? ownerId,
  bool? isVideoEnabled,
  bool? isAudioEnabled,
  bool? isE2eeEnabled,
  bool? isSpeakerPhoneEnabled,
  bool? isSharingScreen,
  CameraType? cameraType,
  AudioLevel? audioLevel,
  RTCPeerConnection? peerConnection,
  WebRTCCodec? videoCodec,
  Function()? onFirstFrameRendered,
  MediaSource? cameraSource,
  MediaSource? screenSource,
}) {
  return ParticipantSFU(
    ownerId: ownerId ?? this.ownerId,
    isVideoEnabled: isVideoEnabled ?? this.isVideoEnabled,
    isAudioEnabled: isAudioEnabled ?? this.isAudioEnabled,
    isE2eeEnabled: isE2eeEnabled ?? this.isE2eeEnabled,
    isSpeakerPhoneEnabled:
        isSpeakerPhoneEnabled ?? this.isSpeakerPhoneEnabled,
    isSharingScreen: isSharingScreen ?? this.isSharingScreen,
    cameraType: cameraType ?? this.cameraType,
    audioLevel: audioLevel ?? this.audioLevel,
    peerConnection: peerConnection ?? this.peerConnection,
    videoCodec: videoCodec ?? this.videoCodec,
    onFirstFrameRendered: onFirstFrameRendered ?? this.onFirstFrameRendered,
    cameraSource: cameraSource ?? this.cameraSource,
    screenSource: screenSource ?? this.screenSource,
  );
}