Hi everyone,
hope that you can help me out.
I try to get data about the live stream and videos.
For videos like (https://www.twitch.tv/riotgames/v/72749628 ) it’s working https://api.twitch.tv/v5/oembed?url=https%3A%2F%2Fwww.twitch.tv%2Friotgames%2Fv%2F72749628 .
Now I need the same thing for live stream (https://www.twitch.tv/riotgames ), but oembed is not working for a live stream https://api.twitch.tv/v5/oembed?url=https%3A%2F%2Fwww.twitch.tv%2Friotgames .
Any suggestions how to get data for a live stream?
Thank you and have a nice day
if the stream is live you can get a stream object from Reference | Twitch Developers if it’s not live your’ll get a blank/empty response
https://api.twitch.tv/helix/streams?user_login=riotgames
returns:
{
“data”: ,
“pagination”: {}
}
Currently for example so no stream to embed.
You might want to look at Embedding Twitch | Twitch Developers instead of embedding which’ll work a little better rather than relying on oembed?
2 Likes
Thank you so much for the respond. Yeah I looked at the api and it looks good.
Still do you maybe know if it’s possible to get it via oembed?
Thank you
It seems that Twitch hasn’t configured oEmbed for live streams just pre-recorded content. Saves showing a embed for a not live stream I suppose. And using “Twitch Everywhere” as documented here Embedding Twitch | Twitch Developers you get a better experience for the end user as you embed the right player
Thank you very much for the replay. Will work with API for now. Hope that they will add support for live streams as well
system
Closed
March 30, 2018, 6:12am
6
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.