MediaHelpers
by
Carson Kompon
| Summary | A library used to retrieve video stream urls for use with the VideoPlayer class. |
|---|---|
| Description |
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); } }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);
}
}
|
| Votes | 👍10 👎0 ❤️15 |
| Error Rate | 0% |
| Usage |
8,943 players
16,770 sessions
4,159 hours playtime
15 minutes avg session
Totals captured
|
| Data | {} |
| Version | Created | Size (modified) | Files | Changes |
|---|---|---|---|---|
| 36414 | 73.3 KB (45.7 KB) | 7 +2 ~1 | Updated HttpAsync function to be the new order | |
| 24037 | 72.2 KB (44.8 KB) | 5 ~2 -4 | revert to monke | |
| 24030 | 404.7 KB (377.3 KB) | 9 +4 ~2 | Start of Soundcloud integration? | |
| 23502 | 72.2 KB (44.5 KB) | 5 ~1 | Forgot www for youtube | |
| 23501 | 72.2 KB (44.5 KB) | 5 ~1 | youtu.be and /shorts/ url support | |
| 23284 | 72.2 KB (44.5 KB) | 5 ~1 | Fixed Duration | |
| 23245 | 72.2 KB (44.5 KB) | 5 ~1 | Null duration fixes | |
| 23244 | 72.2 KB (44.8 KB) | 5 ~2 | Minor Documentation on the player interface | |
| 23239 | 71 KB (43.5 KB) | 5 ~1 | MediaHelper Pain Day! GetYoutubePlayerResponse is now GetYoutubePlayerResponseFromUrl and GetYoutubePlayerResponseFromId | |
| 19499 | 69.5 KB (43.1 KB) | 5 +1 ~2 | Changes on 2023-06-24 | |
| 18943 | 73.1 KB (73.1 KB) | 4 +2 ~1 | Changes on 2023-06-17 | |
| 18816 | 42.1 KB | 2 +2 | Initial commit |
Loading history…