---
title: "MediaHelpers - s&box library"
description: "A library used to retrieve video stream urls for use with the VideoPlayer class."
canonical: "https://sbox.watch/fr/libraries/carsonk/mediahelpers/"
generated_at: "2026-10-09T13:44:15.152Z"
---

# MediaHelpers

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

- Type: bibliothèque
- Identifiant: carsonk.mediahelpers
- Créateur: Carson Kompon
- URL canonique: https://sbox.watch/fr/libraries/carsonk/mediahelpers/
- Markdown: https://sbox.watch/fr/libraries/carsonk/mediahelpers/index.md
- sbox.game: https://sbox.game/carsonk/mediahelpers/
- Généré: 2026-10-09T13:44:15.152Z

## Statistiques

- dynamique sur 24 h: +0
- Terry Score: 79%
- Favoris: 15
- Votes positifs: 10
- Votes négatifs: 0
- Mis à jour: 26 août 2023
- Créé: 15 juin 2023
- Taille: 73.3 KB
- Fichiers: 7
- Tags: videoplayer, media, video, helper

## 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);
 }
}




## More by Carson Kompon

| Package | Identifiant | Joueurs | Favoris | Votes positifs | Score | Markdown |
| --- | --- | --- | --- | --- | --- | --- |
| Razor Panel Tooltips | carsonk.razor_tooltips | 0 | 6 | 6 | 55% | https://sbox.watch/fr/libraries/carsonk/razor_tooltips/index.md |
| RichText Razor Panels | carsonk.richtextpanels | 0 | 3 | 4 | 60% | https://sbox.watch/fr/libraries/carsonk/richtextpanels/index.md |
| Editor All Chat | carsonk.editor_all_chat | 0 | 2 | 6 | 69% | https://sbox.watch/fr/libraries/carsonk/editor_all_chat/index.md |
| TikTokTTS | carsonk.tiktoktts | 0 | 1 | 4 | 60% | https://sbox.watch/fr/libraries/carsonk/tiktoktts/index.md |
| SFXR | carsonk.sfxr | 0 | 1 | 2 | 43% | https://sbox.watch/fr/libraries/carsonk/sfxr/index.md |
| Granular Pitch Audio Processor | carsonk.granularpitchprocessor | 0 | 1 | 0 | -- | https://sbox.watch/fr/libraries/carsonk/granularpitchprocessor/index.md |
