How to get a video image of a video, the stream will become (subsequently) from the StreamNow broadcast by default?

Using the YouTube Stream Now API, is there any way to get the video ID, by default the stream will be downloaded as (NOT BY STREAM ID DEFAULT), so you can create a URL to play it ... youtube. com / watch? v =

+7
youtube-livestreaming-api
source share
1 answer

Both liveStream and LiveBroadcast are two different things, as defined on the youtube website. Therefore, the ID for them should also be different.

Livestreams

The liveStream resource contains information about the video stream that you upload to YouTube. The stream provides content that will be broadcast to YouTube users. After creating a liveStream, a resource can be mapped to one or more liveBroadcast resources.

USING stream.getId() you can get the video streaming id

Sample code in a link gives an idea of ​​how to use it

Liveroadcasts

The liveBroadcast resource is an event that will be broadcast, through live video, on YouTube.

USING returnedBroadcast.getId().getId() you can get the broadcast id

Sample code in a link gives an idea of ​​how to use it

Check Try It the part in which there is streamId where you can indicate which video you can associate with the broadcast.

-2
source share

All Articles