A library used to retrieve media urls for the VideoPlayer class in S&box
The Kick.com-related functions are currently not working as intended as they require a cloudflare bypass. I'm not sure I can natively build that in S&box so I am currently waiting for an official Kick.com API :)
-
Make sure you're
using MediaHelpers;
and you're good to go! Here's some example code:
public void PlayVideo(string url)
{
if(MediaHelper.IsYoutubeUrl(url))
{
string streamUrl = MediaHelper.GetUrlFromYoutubeUrl(url);
videoPlayer.Play(streamUrl);
}
else
{
videoPlayer.Play(url);
}
}
Based on YoutubeExplode: https://github.com/Tyrrrz/YoutubeExplode