2025.10.1b
Another Video Player update! This update focuses on improving media downloading for all platforms and improves downloading experience and optimization.
This update contains a security patch! It is incredibly important that you update ASAP!
Streaming API Changes
The Streaming API has been completely redesigned to improve the reliability of video fetching across clients. These changes simplify and optimize the fetching, and pave the way for the upcoming updates. The biggest change is that yt-dlp on the client has been reduced heavily, now only being used for YouTube downloads; however, we plan to switch away from yt-dlp once another library is working correctly. Once we have moved away completely from yt-dlp, video downloading will work everywhere without needing yt-dlp on the client. Instead, yt-dlp is contained on the game server. A client (or the server itself) can request media using the server's new Streaming API, then the server can send the metadata to the client, where the client can download the media, without even needing yt-dlp. Amazing, right?
For developers, let's take a look at what the client handling will look like
let Events = instance.GetHandler("Events")
let VideoPlayer = item.GetComponent("Video")
// VideoRequests MUST come from the server, so we need to listen to events
Events.Subscribe(ScriptEvent.OnServerNetworkEvent, (eventName, eventArgs) => {
// Not the right message, ignore
if(eventName !== "getVideo") return
// Get the VideoRequest object
let req = eventArgs[0]
print("Downloading video from " + req.GetDownloadUrl())
// Use the new Streaming API to download the media from the VideoRequest object
Streaming.Download(req, downloadResult => {
// If the download failed, don't do anything
if(downloadResult === undefined || downloadResult === null){
print("Could not find a video for URL!")
return
}
// Otherwise, load the video!
VideoPlayer.LoadFromStream(downloadResult)
})
})
As you can see in the above example, the client will wait for the server to give it a VideoRequest object, then it will try and download the video locally from the VideoRequest object.
Changes
- Updated to Unity version
2023.2.22f1- Please upgrade to the current version! A download can be found on the Dashboard
- Completely redesigned Streaming API!
- Please see the notes above for more information
- Bumped vlc-unity to include VLCAudioSources
- This means that VLC can properly output audio to Unity's audio sources
- This implementation may still have issues. If you encounter any, please consider contributing to vlc-unity!
- Added optional
--stream-youtubelaunch argument- When this is enabled, YouTube videos will stream the
m3u8file rather than downloading the entire video - This is currently very buggy and has lots of issue, hence why this is a launch argument
- When this is enabled, YouTube videos will stream the
- Added
IStreamProvider- This allows clients to extract media information and download it when the Game Server can't
- Currently, only YouTube requires this integration
- Added ability to check if Media can be loaded on the current platform
- Fixed loading issues with some
m3u8files on VLCVideoPlayers - Re-did broken configuration files
- Added optional override for DownloadTools to always use HttpClient
- Necessary for some file downloads
- Bumped Nexport to latest
- This also implements support for DynamicNetworkObjects with NetworkedEvents
- Removed old auto-generated MessagePack messages
- Removed FFmpeg Downloader
Known Issues
- Some
m3u8andmdp(and probably more) files will crash Hypernex when being loaded with VLC- You can disable VLC with the
--no-vlcargument
- You can disable VLC with the