Skip to content

Added VLC Canvas Example and VLC 3D Example scenes to Demos and reorganized Demos folder slightly

LL requested to merge brisingre/vlc-unity:new-demos into master

Added two new demos for VLC Unity.

VLC Canvas Example implements a canvas GUI for a simple media player with play, pause, stop, seek, volume, track switching, and file loading functionality.

VLC 3D Example demonstrates how to play media on a 3D model in a unity scene. The scene is very simple but I tried to make it look a little nicer with baked lighting and some textures. It only added about 20mb to the package, I think that's worth it.

Both examples are based on VLCPlayerExample.cs, a more fleshed-out MediaPlayer monobehavior with enough features that it could be used as-is for some simple tasks. It has fixes and workarounds for many issues we have discovered over the past few months, some of which may not be required for much longer. All of these are commented.

There are still a few things here that could be improved, including:

A better system for executing actions on the main thread from VLC events in VlcPlayerExampleGUI.cs (once we decide on one)

An official VLC font instead of LiberationSans, which is a Unity default

A shader that can handle letterboxing for the 3d screen, so it can play videos that aren't 16:9

A loop option on VLCPlayerExample

Audio output through Unity audio for the 3d scene

We should also be sure we mention any licenses we need to, including the VlcPlayerExampleCamera script and the icons.

Edited by LL

Merge request reports

Loading