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 http://www.url.com/video.wmv?hashcode=ff7fa02b 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: http://www.url.com/video.wmv.flv the plugin assumes it is a WMV file which is incorrect.

Solution
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: http://www.url.com/video.wmv.flv<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: http://www.url.com/video.wmv.flv<special force="wmv">

Version 0.7.0.0 will be released a short time after Thanksgiving.

No comments:

Post a Comment