videoTile method

  1. @override
Widget videoTile(
  1. BuildContext context,
  2. NmCallTile tile
)
override

Video tile builder: the engine's renderer of tile (a texture, a LiveKit track, or a placeholder).

Implementation

@override
Widget videoTile(BuildContext context, NmCallTile tile) {
  final Participant? p = switch (tile) {
    NmCallTile.local => room.localParticipant,
    NmCallTile.remote => room.remoteParticipants.values.firstOrNull,
  };
  if (p == null) return const NmNoVideoWidget();
  return NmParticipantWidget.widgetFor(
    NmParticipantTrack(participant: p),
    fit: tile == NmCallTile.local ? localFit : remoteFit,
  );
}