Video API, gRPC: PlaylistService.GetPlayerURL
Generates a player URL for watching the playlist.
The URL can include player parameters such as autoplay, mute, and visibility of interface controls.
gRPC request
rpc GetPlayerURL (GetPlaylistPlayerURLRequest) returns (GetPlaylistPlayerURLResponse)
GetPlaylistPlayerURLRequest
{
"playlist_id": "string",
"params": {
"mute": "bool",
"autoplay": "bool",
"hidden": "bool"
}
}
|
Field |
Description |
|
playlist_id |
string Required field. ID of the playlist for which to generate a player URL. The maximum string length in characters is 50. |
|
params |
Optional player parameters to customize the playback experience. |
PlaylistPlayerParams
|
Field |
Description |
|
mute |
bool If true, the player will start with audio muted. |
|
autoplay |
bool If true, the playlist will start playing automatically when the player loads. |
|
hidden |
bool If true, the player interface controls will be hidden initially. |
GetPlaylistPlayerURLResponse
{
"player_url": "string",
"html": "string"
}
|
Field |
Description |
|
player_url |
string Direct URL to the playlist player. |
|
html |
string HTML embed code in iframe format that can be inserted into web pages. |