Download & Extend

Embeded player and Embed code has relative path for skin

Project:FLV Media Player
Version:6.x-1.0-beta3
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

When embed is enabled, the code produced works fine...unless you are using a custom skin. While the player has an absolute path, the skin does not. This results in no video.

In my case, the skin and player does not reside in the same folder; maybe this has something to do with it.

Comments

#1

I set the path as an absolute path to get around this, which works, except for in this case #441552: path to skin contains path prefix on multilingual sites

#2

I'm not quite sure how to handle this- perhaps paths to skin and plugins need to be parsed the same way that the url to the player is? It seems a bit dangerous to me, but not quite sure what to do... any suggestions?

#3

I would say, yes - parse the path to the skin in the same way as the player. There should definitely be a way to specify a path relative to the doc root, and have it prepend the domaim name automatically, just like we can do for the player path. Why do you say it seems a bit dangerous?

#4

Title:Embed code has relative path for skin» Embeded player and Embed code has relative path for skin

Attached is a patch which applies the same url parsing to the player skin path as to the player path. It doesn't make any modifications to the textfield description to let the user know this will happen - it simply changes the backend functionality.

AttachmentSize
flvmediaplayer-skin-path.patch 1.07 KB

#5

Status:active» needs review

#6

Status:needs review» fixed

I think you got your patch reversed here. I've added the check for the skin parameter. The other thing that needs to be considered are the plugin urls, but I'm not sure really how to handle that- I don't know enough about flash's crossdomain policy to know if having those paths hard coded is an issue. I've committed the fix

#7

Bare in mind that plugins are not always local :- The longtail ad solution plugin for example, requires the following settings to work:

Hi Tom,

I have prepared a demo for you over at this URL -
http://qa.longtailvideo.com/42CC/swf20standard4.html

By looking at the source code, I think that you will find the
implementation very straightforward.

Please ignore the error that you are seeing in the green box. Our error
script has not yet been optimized to understand SWF 2.x. That is why in
your dashboard profile, under channel setup, you should make sure to
disable so that you do not experience the same thing.

Essentially, what I added was this:
1) Under Flashvars

plugins: "ltas",
channel: "YOUR-UNIQUE-CHANNEL-ID"

2) Under Parameters:

wmode: "transparent",
allowscriptaccess: "always"

3) Under Attributes:

id: "longtail",
name: "longtail"

4) You also need to edit the divtags that your player is writing to. It
should look like this:

<div id='mediaspace' name='mediaspace'>
<div id='playerspace' name='playerspace'></div>
</div>

Lastly, at the bottom of the page, do not forget to paste your unique
LongTail API script so that the player can communicate with our servers.

To get this to work, I had to a) override theme_swfobject_api to get it to output two divs (this is actually a requirement of SWFObject 2 now I believe). and b) add the custom flashvars and params to that theme function, as that section of the admin interface (external config?) wasn't working

#8

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here