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

# MediaHelpers

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

- Тип: библиотека
- Идентификатор: carsonk.mediahelpers
- Автор: Carson Kompon
- Канонический URL: https://sbox.watch/ru/libraries/carsonk/mediahelpers/
- Markdown: https://sbox.watch/ru/libraries/carsonk/mediahelpers/index.md
- sbox.game: https://sbox.game/carsonk/mediahelpers/
- Создано: 2026-10-09T13:14:14.632Z

## Статистика

- динамика за 24 ч: +0
- Terry Score: 79%
- Избранное: 15
- Положительные оценки: 10
- Отрицательные оценки: 0
- Обновлено: 26 авг. 2023 г.
- Создано: 15 июн. 2023 г.
- Размер: 73.3 KB
- Файлы: 7
- Теги: videoplayer, media, video, helper

## Описание

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 | Идентификатор | Игроки | Избранное | Положительные оценки | Оценка | Markdown |
| --- | --- | --- | --- | --- | --- | --- |
| Razor Panel Tooltips | carsonk.razor_tooltips | 0 | 6 | 6 | 55% | https://sbox.watch/ru/libraries/carsonk/razor_tooltips/index.md |
| RichText Razor Panels | carsonk.richtextpanels | 0 | 3 | 4 | 60% | https://sbox.watch/ru/libraries/carsonk/richtextpanels/index.md |
| Editor All Chat | carsonk.editor_all_chat | 0 | 2 | 6 | 69% | https://sbox.watch/ru/libraries/carsonk/editor_all_chat/index.md |
| TikTokTTS | carsonk.tiktoktts | 0 | 1 | 4 | 60% | https://sbox.watch/ru/libraries/carsonk/tiktoktts/index.md |
| SFXR | carsonk.sfxr | 0 | 1 | 2 | 43% | https://sbox.watch/ru/libraries/carsonk/sfxr/index.md |
| Granular Pitch Audio Processor | carsonk.granularpitchprocessor | 0 | 1 | 0 | -- | https://sbox.watch/ru/libraries/carsonk/granularpitchprocessor/index.md |
