问题
Meerkat allows access to all its live broadcasts via REST API. Does YouTube's live streaming API allow the same? I can see that they allow CRUD through the API for a particular user. My question is can I access all live broadcasts with the API?
回答1:
You can use the Search/list endpoint of the regular YouTube v3 API and filter the results to only receive live content. Make sure to pass in the following parameters:
part -> snippet
eventType -> live
type -> video
(required when setting eventType
to live
)
The full get request:
HTTP GET https://www.googleapis.com/youtube/v3/search?part=snippet&eventType=live&type=video&key={YOUR_API_KEY}
来源:https://stackoverflow.com/questions/33380083/can-i-access-all-live-broadcasts-with-youtubes-livestreaming-api