Get started
You can upload videos directly from the Cloudflare dashboard ↗ or using the API.
To use the API, replace the API_TOKEN
and ACCOUNT_ID
values with your credentials in the example below.
Because Stream must download and process the video, the video might not be available for a few seconds depending on the length of your video. You should poll the Stream API until readyToStream
is true
, or use webhooks to be notified when a video is ready for streaming.
Use the video UID from the first step to poll the video:
Videos uploaded to Stream can be played on any device and platform, from websites to native apps. See Play videos for details and examples of video playback across platforms.
To play video on your website with the Stream Player, copy the uid
of the video from the request above, along with your unique customer code, and replace <CODE>
and <VIDEO_UID>
in the embed code below:
The embed code above can also be found in the Cloudflare dashboard ↗.
- Edit your video and add captions or watermarks
- Customize the Stream player
You can create a live input via the Cloudflare dashboard ↗ or using the API.
To use the API, replace the API_TOKEN
and ACCOUNT_ID
values with your credentials in the example below.
We recommend using Open Broadcaster Software (OBS) ↗ to get started.
Live streams can be played on any device and platform, from websites to native apps, using the same video players as videos uploaded to Stream. See Play videos for details and examples of video playback across platforms.
To play the live stream you just started on your website with the Stream Player, copy the uid
of the live input from the request above, along with your unique customer code, and replace <CODE>
and <VIDEO_UID>
in the embed code below:
The embed code above can also be found in the Cloudflare dashboard ↗.
To make your video content more accessible, include captions and high-quality audio recording ↗.