useUpdateStream
React Hook for updating an stream.
Hook for updating an existing Stream.
Usage
The following example shows how an stream can be updated to enable recording and require a JWT for playback
Return Value
The return value is partially based on Tanstack Query, with some return types aggregated for simplicity.
Configuration
streamId
The stream ID to update - required.
suspend
Whether to immediately block ingest and playback of the stream.
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.
The multistream targets can be either a full MultistreamTarget
like on create,
or a MultistreamTargetRef
. The Ref
object comes directly from the existing
Stream
object, in case multistream has already been configured for the given
stream. It contains a vanity ID instead of the full Spec
since the ingest URL
contains user secrets like the stream key.
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.
Was this page helpful?