Overview of special tags and variables.

Variables

Currently the only relevant special variable is _SPECIAL_resolve_xml which is used with inline VideoResource() calls. It is exclusively used with the ResolveXML() function.

function getVideoUrl()
_SPECIAL_resolve_xml = ResolveXML("http://www.url.com/video.flv");
end;

VideoResource("Title", "func:getVideoUrl()", "Inline VideoResource()", "", 10000);
The code above will display a video link to the user, what makes it special is that there is not processing of the video until the user selects that video. So if there is multiple video links that require multiple web requests and page parses it dramatically cuts down on the time it takes to initally retrieve the information.

Tags

The <special> tag is is used through out scripts to add special data to our functions calls.

Forcing Video types

local videoURL1 = "http://www.url.com/video?id=9999";

VideoResource("Test Video", videoURL1, "", "", 1000000);
In the above code we pass a video url to PlayOn which has no real identifying ways to tell what type of video codec it uses. PlayOn requires that we distingush between Windows Media and Flash videos. The Scripts Plugin tries its best to decide for us, and it works most of the time, however it's not always correct. If the above video is a WMV file it will fail to play.
local videoURL1 = 'http://www.url.com/video?id=9999<special force="wmv">';

VideoResource("Windows Media File", videoURL1, "", "", 1000000);

local videoURL2 = 'http://www.url.com/video?id=9999<special force="flv">';

VideoResource("Flash File", videoURL2, "", "", 1000000);
Using the <special> tag with the parameter of force we can explicitely tell PlayOn what type of video we want to play.

Setting the date of a VideoResource()

local dateXML = '<special date="1.0"><year>2009</year><month>11</month><day>11</day></special>';

VideoResource("test", "http://www.url.com/video.mp4", "This is before the special tag"..dateXML.."and this is after", "", 100000);
Using the <special> tag with the parameter of date we can let PlayOn know the date the video was recorded.