PDA

View Full Version : Flash/Silverlight URLs (api clarification)



DPK
June 10th, 2009, 01:03 AM
I just ran into this issue and it had me stumped for a bit as my video wasn't loading into the player. I even had Wireshark running in the background to monitor my GET requests and other packet info just to see if I was going crazy or not.

This post is in reference to the rss developer api (http://developer.boxee.tv/rss-specification/) specs for controlling the player window. In particular, it is in regards to when your video has more than one key in its own query string.

For example:
http://www.domain.com/path/to/video.swf?key1=val1&key2=val2

Now say you wanted to load that video but crop 50 pixels off of the right (for whatever reason). You have to use a combination of hex and html. Let's first go ahead and do all of the hex replacements, ignoring the & symbols anywhere in our urls and go ahead and put it in near final form:


flash://www.domain.com/?src=http%3A%2F%2Fwww.domain.com%2Fpath%2Fto%2Fvid eo.swf%3Dkey1%3Dval1&key2%3Dval2&bx-cropright%3D50

Now, first replace the boxee player config option &'s with & ONLY:


flash://www.domain.com/?src=http%3A%2F%2Fwww.domain.com%2Fpath%2Fto%2Fvid eo.swf%3Dkey1%3Dval1&key2%3Dval2&bx-cropright%3D50

Then replace the remaining & symbols with %26:


flash://www.domain.com/?src=http%3A%2F%2Fwww.domain.com%2Fpath%2Fto%2Fvid eo.swf%3Dkey1%3Dval1%26key2%3Dval2&bx-cropright%3D50


You should only EVER use & for boxee config values and never for your own personal query string data. The result will yield a broken video in the boxee player.

Hopefully this will help someone in the future, as the boxee api does not really make this clear. It kind of starts going in that direction but the reader could get confused as the api docs state that:


we need to encode the & to &

:p

Fuzzgtp
June 10th, 2009, 06:50 PM
this would have been nice yesterday XD

DPK
June 10th, 2009, 09:24 PM
Also note that I failed to provide the required values for width and height for the original swf flash. They're required parameters, but this example was done in somewhat haste/brevity for reference purposes for the ampersand symbol.

chad.socolovitch
February 10th, 2010, 11:53 AM
i am new here and was wondering if you could help me as im trying to develop a app

can i use any swf inside boxee?

im currently using flowplayer as video player on my site and i love it, can i still use flowplayer and link to it using flash://

thank you

DPK
February 10th, 2010, 11:57 AM
i am new here and was wondering if you could help me as im trying to develop a app

can i use any swf inside boxee?

im currently using flowplayer as video player on my site and i love it, can i still use flowplayer and link to it using flash://

thank you

In theory, yes.