Leviathan  0.8.0.0
Leviathan game engine
How the Leviathan VideoPlayer Works

Add a definition for the widget type

Before using the widget you will need to define a widget that uses the video player type. To do this put this in your games' gui scheme file (this is an example is from Thrive):

<FalagardMapping windowType="Thrive/VideoPlayer" targetType="Leviathan/VideoPlayer" renderer="Core/Default" lookNFeel="Thrive/Image" />

Example Usage

This snippet is from Thrive and plays a video when the GUI is loaded.

Todo:
Make sure the latest, working code is copied here
Todo:
This is outdated as CEGUI is no longer used. Replace with an example of playing video on an Ogre material
o GuiObject "_IntroVideoStarter"{
s{
[@Listener="OnInit"]
bool WriteVersion(GuiObject@ instance){
CEGUI::Window@ videoPlayer = instance.GetOwningManager().GetRootWindow().
CreateAndAddChild("Thrive/VideoPlayer");
videoPlayer.SetSize(1.0, 0, 1.0, 0);
auto@ castedPlayer = cast<CEGUIVideoPlayer>(videoPlayer);
// Start playback
castedPlayer.Play("Data/Videos/intro.mp4");
return true;
}
@%};
}