ViewerSessionHandle constructor

ViewerSessionHandle({
  1. required ViewerSessionProvider provider,
  2. required String roomName,
  3. String? displayName,
  4. Duration pollInterval = const Duration(seconds: 5),
  5. Duration heartbeatInterval = const Duration(seconds: 30),
  6. void onChange(
    1. ViewerSessionSnapshot
    )?,
})

Implementation

ViewerSessionHandle({
  required this.provider,
  required this.roomName,
  this.displayName,
  this.pollInterval = const Duration(seconds: 5),
  this.heartbeatInterval = const Duration(seconds: 30),
  this.onChange,
}) {
  _snapshot = ViewerSessionSnapshot(
    phase: ViewerSessionPhase.idle,
    session: null,
    status: null,
    error: '',
    canRequestPromotion: provider.requestPromotion != null,
  );
}