Skip to main content
Hook for creating a new Stream.

Usage

The stream ID should only be passed to users who are allowed to modify the stream. Ensure viewers are only provided with the playbackId, which is a limited identifier that provides only the ability to stream media using the Player.
The following example shows how a stream can be created.

Return Value

The return value is partially based on Tanstack Query, with some return types aggregated for simplicity.

Configuration

name

The name for the new stream. Required to create a stream.

profiles

Transcoding profiles to use for the stream for ABR playback. When this is not defined, the defaultTranscodingProfiles are used (720p, 480p, and 360p).

record

Whether to create recordings of the stream sessions. Defaults to false.

multistream

The configuration for multistreaming (AKA “restream” or “simulcast”) - allows configuration of targets where this stream should be simultaneously streamed to.

playbackPolicy

Configuration for stream playback access-control policy. Defaults to public.

mutationConfig

The mutationConfig parameter allows for any Tanstack Query useMutation options, such as cacheTime or retry. These override any configs passed by default by the internal hook.
Last modified on March 18, 2026