Video API, gRPC: VideoService.GetPlayerURL
Generates a standard player URL for watching the video.
The URL respects the video's access rights and can include custom player parameters.
For videos with signed URL access, an expiration duration can be specified.
gRPC request
rpc GetPlayerURL (GetVideoPlayerURLRequest) returns (GetVideoPlayerURLResponse)
GetVideoPlayerURLRequest
{
"video_id": "string",
"params": {
"mute": "bool",
"autoplay": "bool",
"hidden": "bool"
},
"signed_url_expiration_duration": "google.protobuf.Duration"
}
|
Field |
Description |
|
video_id |
string Required field. ID of the video for which to generate a player URL. The maximum string length in characters is 50. |
|
params |
Optional player parameters to customize the playback experience. |
|
signed_url_expiration_duration |
For episodes with signed URL access, specifies how long the generated URL will be valid. |
VideoPlayerParams
|
Field |
Description |
|
mute |
bool If true, the player will start with audio muted. |
|
autoplay |
bool If true, the video will start playing automatically when the player loads. |
|
hidden |
bool If true, the player interface controls will be hidden initially. |
GetVideoPlayerURLResponse
{
"player_url": "string",
"html": "string"
}
|
Field |
Description |
|
player_url |
string Direct URL to the video player. |
|
html |
string HTML embed code in iframe format that can be inserted into web pages. |