Skip to content

Video

Provides functions to interface with the Steam video and broadcasting platforms. See Steam Video for more information.

Only available in the main GodotSteam branches

Functions

getOPFSettings

getOPFSettings( uint32_t app_id )

Argument Type Notes
app_id uint32_t The video app ID to get the OPF details of.

Get the OPF details for 360 video playback.

To retrieve the 360 OPF (open projection format) data to playback a 360 video, start by making a call to this, then the callback will indicate whether the request was successful. If it was successful, the actual OPF JSON data can be retrieved with a call to getOPFStringForApp.

Returns: void

Triggers

get_opf_settings_result callback


Read more in the official Steamworks SDK documentation

getOPFStringForApp

getOPFStringForApp( uint32_t app_id )

Argument Type Notes
app_id uint32_t The video app ID to get the OPF string for.

Gets the OPF string for the specified video app ID.

Once the callback for get_opf_settings_result has been raised and the EResult indicates success, then calling this will return back the actual OPF data in a JSON format. The size of the OPF string varies, but at this time 48,000 bytes should be sufficient to contain the full string.

Note: The data returned in a successful call to getOPFStringForApp can only be retrieved once. If you need to retrieve it multiple times, a call to getOPFSettings will need to be made each time.

Returns: string


Read more in the official Steamworks SDK documentation

getVideoURL

getVideoURL( uint32_t app_id )

Argument Type Notes
app_id uint32_t The video app ID to receive the video stream for.

Asynchronously gets the URL suitable for streaming the video associated with the specified video app ID.

See DASH on Wikipedia.

Returns: void

Triggers

get_video_result callback


Read more in the official Steamworks SDK documentation

isBroadcasting

isBroadcasting( )

Checks if the user is currently live broadcasting and gets the number of users.

Returns: dictionary

Contains the following keys:

Key Type Notes
broadcasting bool Returns true if user is uploading a live broadcast; otherwise, false.
viewers int The number of viewers if the user is currently broadcasting.

Read more in the official Steamworks SDK documentation

Signals

These callbacks require you to setup one of the three callback methods to receive them.

broadcast_upload_start

broadcast_upload_start

Automatically called whenever the user starts broadcasting.

Returns

Key Type Notes
is_rtmp bool Whether or not this is RTMP.

Read more in the official Steamworks SDK documentation Added GodotSteam 4.13

broadcast_upload_stop

broadcast_upload_stop

Automatically called whenever the user stops broadcasting.

Returns

Key Type Notes
result BroadcastUploadResult The reason why the broadcast has stopped.

Read more in the official Steamworks SDK documentation Added GodotSteam 4.13

get_opf_settings_result

get_opf_settings_result

Triggered when the OPF Details for 360 video playback are retrieved. After receiving this you can use getOPFStringForApp to access the OPF details.

Returns

Key Type Notes
result Result enum The result of the operation.
app_id uint32_t The app ID of the video that we got the details of.

Read more in the official Steamworks SDK documentation

get_video_result

get_video_result

Provides the result of a call to getVideoURL.

Returns

Key Type Notes
result Result enum The result of the operation. May be RESULT_INVALID_PARAM if the app ID provided is not a video app ID or if the user does not own a license for it.
app_id uint32_t The App ID provided in the original call to getVideoURL.
url string If the call was successful this contains the URL to the MPEG-DASH Standard schema formatted xml document which can be used to stream the content.

Read more in the official Steamworks SDK documentation