This guide walks you from installing the Freakout SDK in Unity to playing your first HLS or DASH video in a WebGL build, using the ready-made prefabs and the WebGL template scripts.
To begin, install the Freakout SDK package into your Unity project. This SDK is specifically designed for compatibility with the WebGL build target.
After installation, the following key directories and files will be available:
/Assets/FreakoutSDK/#/Packages/FreakoutSDK/WebGL Templates/#FreakoutSDK.jshls/hls.min.jsindex.html (Example template showing how to integrate scripts)Dash/dash.all.min.js
Make sure to include FreakoutSDK.js ,hls.min.js , dash.all.min.jsin your WebGL template for proper video streaming support.
localhost is always free.The SDK includes ready-to-use prefabs for rapid integration.
After importing the Freakout SDK Unity package, you’ll find the sample prefab located at: Packages/FreakoutSDK/ To integrate our ready-to-use video prefab:

/Assets/FreakoutSDK/Prefabs..)..png)
Note: For UI-enabled prefabs, ensure your scene includes an EventSystem to enable UI interaction.
.png)
Important: Each video is assigned an index based on its position in the list (e.g., 0, 1, 2). You’ll need to reference these indexes when assigning the correct video source to each player in the next step.
💡 Tip: We recommend using SdkVideoUIControl.cs as a starting point if you plan to build your own custom video UI.
🧩 If UI controls are not needed, you can simply disable or remove the UI elements from the prefab.Warning
Important: In step 2, avoid enabling the StartOnInit flag unless a corresponding Video Source Index is assigned in step 3 for that specific entry.
Enabling StartOnInit without a valid index reference may cause the video player to initialize without proper configuration.
.png)
Video_NUMBER (Root GameObject with VideoSDKSource)
├── Canvas
│ └── VideoControlPanel // Contains built-in UI controls in SdkVideoUIControl
│ ├── State
│ ├── Play_Pause_Button
│ ├── Stop
│ ├── Mute
│ └── Slider
The following methods are available via VideoPlayerController. You can inspect SdkVideoUIControl.cs to see an example of usage with UI controls**:**
private VideoPlayerController PlayerController { get { return SdkManager.Instance.GetPlayerControllerAtIndex(PlayerIndex); } } private VideoPlayerController PlayerController { get { return SdkManager.Instance.GetPlayerControllerAtIndex(PlayerIndex); } } // accessing the controller
PlayerController.StartPlayer(); // Starts playback using assigned VideoContent
PlayerController.StartPlayer("url"); // Starts playback with custom URL
PlayerController.StopPlayer(); // Stops playback
PlayerController.PausePlayer(); // Pauses playback
PlayerController.ResumePlayer();
PlayerController.SetMuted(bool); // Set mute or unmute
PlayerController.SetVolume(0.5f); // Sets volume (0.0 to 1.0)
PlayerController.Shutdown(); // Releases and cleans up the video player
Info
By default, all videos will start muted. However, if you'd like to start the video unmuted on start, you can check for the corresponding video index and call "SetMuted", in the SdkVideoUIControl.cs, for example:
private void OnVideoManagerInitialized(object sender, System.EventArgs e)
{
PlayerController.VideoEventReceived -= PlayerController_VideoEventReceived;
PlayerController.VideoEventReceived += PlayerController_VideoEventReceived;
if (PlayerIndex == 0)
{
PlayerController.SetMuted(false); // explicitly unmute
_bMuted = false; // update internal state
}
}
🎨 The following methods to control material are available via SdkVideoSource:
SdkVideoSource.SetGamma(1.2f); // Adjusts gamma level of the video material
SdkVideoSource.SetBrightness(0.8f); // Adjusts brightness level of the video material
SdkVideoSource.SetContrast(1.0f); // Adjusts contrast level of the video material
SdkVideoSource.SetShaderParams(gamma, brightness, contrast);
// Convenience method to set all three at once
The url in the 1st step of integration is a public field in the script. If you know the video URL in advance, you can assign it directly in the Inspector. Alternatively, you can set it at runtime and call the PlayerController.StartPlayer("url") in the specific PlayerIndex component. By inspecting the prefab, you can make your own way of utilizing our SDK.
Warning
Please note that the video preview does not work in the Editor mode. If you need any help, do not hesitate to reach us!