Thursday, November 19, 2009

Forcing Video Type

In the next version of the Scripts Plugin, v0.7.0.0, I've added the ability to force the Scripts Plugin to send videos to PlayOn based on what you submit and not what the Scripts Plugin thinks it is.

How it works now
Originally the Scripts Plugin checked for a file extension, if it was WMV then the video was set to Windows Media, everything else would be Flash. This proved flawed as server side parameters break this set up. As an example would be interpreted as a Flash video when it is a WMV. So instead of checking file extensions I changed it to simply check for the existence of .wmv and if it exists then it will set it as Windows Media. Still flawed however when you consider a url like this: the plugin assumes it is a WMV file which is incorrect.

Enter the <special> tag. So far the tag only excepts one parameter "force". By appending a url we send, to ResolveXML() or to the plugin directly from a VideoResource(), with the new tag we can explicitly tell the plugin the type, regardless of file extension. Using the example above we could do:<special force="flv"> The Scripts Plugin will now tell PlayOn that the video is a flash video regardless of any other factors. We could even tell PlayOn that the video with a .flv extension is to be decoded as Windows Media:<special force="wmv">

Version will be released a short time after Thanksgiving.

No comments:

Post a Comment