Welcome to the new Daily Docs. Please let us know what you think.

startLiveStreaming()

startLiveStreaming({ rtmpUrl, ...options })

Compatibility:
Prebuilt
Custom

Starts a live stream at the rtmpUrl specified. Note that the participant who initiates this must be an owner and there is a domain level constraint on the number of concurrent streams (max_live_streams).

Note: The outgoing rtmp stream has the following properties:

  • Resolution: 1920 x 1080
  • Framerate: 20fps
  • Keyframe: every 2 seconds (40 frames)
  • Target bitrate: 5Mbps

The following additional options are currently available:

  • height, width: Can be specified to control the resolution of the live stream

  • layout: an object specifying the way participants’ videos are laid out in the live stream. A preset key with one of the following values must be provided:

    • 'default': This is the default grid layout, which renders participants in a grid, or in a vertical grid to the right, if a screen share is enabled. Optionally, a max_cam_streams integer key can be provided to specify how many cameras to include in the grid. The default value is 9, which is also the maximum number of cameras in a grid. The maximum may be increased at a later date.
    • 'single-participant': Use this layout to limit the audio and video to be streamed to a specific participant. The selected participant’s session ID must be specified via a session_id key.
    • 'active-participant': This layout focuses on the current speaker, and places up to 9 other cameras to the right in a vertical grid in the order in which they last spoke.
    • 'portrait': Allows for mobile-friendly layouts. The video will be forced into portrait mode, where up to 2 participants will be shown. An additional variant key may be specified. Valid values are 'vertical' for a vertical grid layout (the default), and 'inset'for having one participant's video take up the entire screen, and the other inset in a smaller rectangle. Participants' videos are scaled and cropped to fit the entire available space. Participants with the is_owner flag are shown lower in the grid (vertical variant), or full screen (inset variant).

We're working on improving the set of available presets. Please contact us if you have specific requirements or feedback.