useLiveStreaming
useLiveStreaming
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)
Parameter | Required | Type | Description |
---|---|---|---|
onLiveStreamingError | Function | Callback for the live-streaming-error event | |
onLiveStreamingStarted | Function | Callback for the live-streaming-started event | |
onLiveStreamingStopped | Function | Callback for the live-streaming-stopped event | |
onLiveStreamingUpdated | Function | Callback for the live-streaming-updated event | |
onLiveStreamingWarning | Function | Callback for the nonfatal-error event with type 'live-streaming-warning' |
Return type
An object with the following properties:
Name | Type | Description |
---|---|---|
errorMsg | string | Details a live streaming error, defaults to undefined |
isLiveStreaming | boolean | Indicates whether a live stream is currently happening, defaults to false |
layout | Object | Describes any preset live streaming layout, and any corresponding layout-specific details. Defaults to undefined |
startLiveStreaming | Function | See startLiveStreaming() |
stopLiveStreaming | Function | See stopLiveStreaming() |
updateLiveStreaming | Function | See updateLiveStreaming() |
For more on live streaming with Daily, reference our guide.