MediaHelpers

A library used to retrieve video stream urls for use with the VideoPlayer class.

How to use



Add the following package to your game/addon:

Make sure your class is 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);
}
}