useLiveStreaming(params?) : Object

Returns information about a live stream, along with helper functions that wrap daily-js live streaming-related methods.

useLiveStreaming can also be used to set up optional callbacks for live streaming events.

Params (optional)

onLiveStreamingErrorFunctionCallback for the live-streaming-error event
onLiveStreamingStartedFunctionCallback for the live-streaming-started event
onLiveStreamingStoppedFunctionCallback for the live-streaming-stopped event

Return type

An object with the following properties:

errorMsgstringDetails a live streaming error, defaults to undefined
isLiveStreamingbooleanIndicates whether a live stream is currently happening, defaults to false
layoutObjectDescribes any preset [live streaming layout](/guides/products/live-streaming-recording/live-streaming#live-streaming-layout-options, and any corresponding layout-specific details. Defaults to undefined
startLiveStreamingFunctionSee startLiveStreaming()
stopLiveStreamingFunctionSee stopLiveStreaming()
updateLiveStreamingFunctionSee updateLiveStreaming()

For more on live streaming with Daily, reference our guide.

Sample code