Video API, gRPC: VideoService.BatchGetPlayerURLs
Generates multiple player URLs for a list of videos in a specific channel in a single request.
This is more efficient than making multiple GetPlayerURL requests when retrieving several URLs.
gRPC request
rpc BatchGetPlayerURLs (BatchGetVideoPlayerURLsRequest) returns (BatchGetVideoPlayerURLsResponse)
BatchGetVideoPlayerURLsRequest
{
"channel_id": "string",
"video_ids": [
"string"
],
"params": {
"mute": "bool",
"autoplay": "bool",
"hidden": "bool"
},
"signed_url_expiration_duration": "google.protobuf.Duration"
}
|
Field |
Description |
|
channel_id |
string Required field. ID of the channel containing the videos for which to generate player URLs. The maximum string length in characters is 50. |
|
video_ids[] |
string List of video IDs for which to generate player URLs. The maximum string length in characters for each value is 50. The number of elements must be in the range 1-100. |
|
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. |
BatchGetVideoPlayerURLsResponse
{
"player_urls": [
"string"
]
}
|
Field |
Description |
|
player_urls[] |
string List of player URLs corresponding to the requested video IDs. |