Description
V2 scripts are built on top of the ScriptProvider class that is practically the same for plugins. All of the classes available to Plugins are also available to V2 scripts. Please consult the Plugin Documentation for more information about the ScriptProvider and the new classes.
A provider object is created for you called "provider" and it can have methods overridden like the following:
--[[Director function provider:MethodName(Args) --method body end; EndDirector]]-- |
Methods and Properties
Overridable Methods
Automatically Imported Classes (Consult Plugin Documentation or .NET Framework)
Example
function provider:LoadDynamicVirtualFolder(vf) if vf == self.VFS.Root then vf.Dynamic = false; local url0 = "http://www.youtube.com/watch?v=c4xmZLv_wI8&feature=player_detailpage"; local url1 = "http://www.youtube.com/watch?v=dQw4w9WgXcQ&feature=player_detailpage"; local url2 = "http://www.youtube.com/watch?v=CD2LRROpph0&feature=player_detailpage"; self.VFS:CreateVideoFile(vf, "Test Video 0", url0, "Test Video 0", "http://www.playon.tv/sites/all/themes/playonblue/assets/PlayOnBox75.png", DateTime.Now, url0, nil, 0, 0, nil, nil); self.VFS:CreateVideoFile(vf, "Test Video 1", url1, "Test Video 1", "http://www.playon.tv/sites/all/themes/playonblue/assets/PlayOnBox75.png", DateTime.Now, url1, nil, 0, 0, nil, nil); self.VFS:CreateVideoFile(vf, "Test Video 2", url2, "Test Video 2", "http://www.playon.tv/sites/all/themes/playonblue/assets/PlayOnBox75.png", DateTime.Now, url2, nil, 0, 0, nil, nil); end; end; function provider:CreatePlaybackDescriptor(vvf) local pd = PlaybackDescriptor(vvf.Path, MediaFormat.FlashDirect); pd.AudioAbortInterval = 15; pd.VideoAbortInterval = 15; return pd; end; |