We have recently decided to switch from Twitch to YouTube Live as our main streaming partner, and our only regret is that it means our stream won't be visible in TL's list of Live streams, which is a rather big issue since it's usually where our viewers first found out about us.
From what I understand after searching the forums - There have been previous requests to support YouTube Live streams, but it's been discarded due to limitations in YouTube's API - but those threads were really old and my own investigations show that such is not the case anymore, and that it in fact should be rather easy to do:
The big difference between YouTube Live and Twitch when it comes to retrieving the status of a "channel" is that in YouTube your _channel_ is never "live". Instead YouTube focuses on created "Live events" which can have the status planned, live or complete. However; since you can search for active live events for a specific channel - this should not really be a problem.
What is a minor inconvenience though is that the search doesn't return the active viewer count for the live stream, but that can now be retrieved with a second call where you provide the ID returned in the initial search-call.
Simple workflow:
0. Get the channel-id for the TL-user's specified YouTube account. (Optional step, and should preferably be done only once right after a TL-user changes his/hers stream settings on TL)
+ Show Spoiler +
https://www.googleapis.com/youtube/v3/channels?part=id&forUsername={youtube_channel]&maxResults=1&key={YOUR_API_KEY}
1. Search for active live-streams for a specific channel.
+ Show Spoiler +
https://www.googleapis.com/youtube/v3/search?part=id&channelId={CHANNEL_ID}&eventType=live&maxResults=1&type=video&key={YOUR_API_KEY}
2. If the request returned an empty response -> the channel is not live -> end
3.Request liveStreamingDetails information from the returned video/stream.
+ Show Spoiler +
https://www.googleapis.com/youtube/v3/videos?part=liveStreamingDetails&id={VIDEO_ID}&key={YOUR_API_KEY}
For more info about the Youtube API, see https://developers.google.com/youtube/v3/
( I used the youtube.channels.list, youtube.search.list and youtube.videos.list calls in my own tests )
I hope this information is of help to you, and I really wish to see this feature implemented.
If I can be of any more help in this, feel free to contact me directly: ludvig {a} unisl.se
Best regards
// Ludvig Fjell
Executive Producer
University Star League
Youtube.com/UniSL
www.unisl.se