StreamLiveInputOutput
Source:
src/Cloudflare/Stream/LiveInputOutput.ts
A Cloudflare Stream live input output — restreams (simulcasts) live
video received by a StreamLiveInput to another RTMP(S) destination
such as YouTube Live or Twitch.
The destination (url + streamKey) is immutable: Cloudflare’s update
endpoint only toggles enabled, so changing the destination replaces
the output. Toggling enabled updates the output in place.
Requires the Stream subscription to be enabled on the account.
Creating an output
Section titled “Creating an output”const input = yield* Cloudflare.StreamLiveInput("Broadcast", {});
const youtube = yield* Cloudflare.StreamLiveInputOutput("YouTube", { liveInputId: input.liveInputId, url: "rtmps://a.rtmps.youtube.com/live2", streamKey: youtubeStreamKey,});Managing an output
Section titled “Managing an output”const youtube = yield* Cloudflare.StreamLiveInputOutput("YouTube", { liveInputId: input.liveInputId, url: "rtmps://a.rtmps.youtube.com/live2", streamKey: youtubeStreamKey, enabled: false,});