startLivestream method

Future<void> startLivestream(
  1. List<LivestreamOutput> outputs, {
  2. LivestreamConfig? config,
})

Starts an RTMP livestream to outputs.

await room.startLivestream([
  LivestreamOutput(
      url: 'rtmp://a.rtmp.youtube.com/live2', streamKey: 'your-key'),
]);

Implementation

Future<void> startLivestream(
  List<LivestreamOutput> outputs, {
  LivestreamConfig? config,
}) =>
    _backend.startLivestream(
      [for (final o in outputs) o.toJson()],
      config: config?.toJson(),
    );