google-code-export / flowplayer-core

Automatically exported from code.google.com/p/flowplayer-core
2 stars 0 forks source link

clip urls relative to player, not page (regression) #494

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
http://flowplayer.org/forum/2/97893#post-97893 says:

---
I have upgraded an existing movie page on my website from 3.2.7 to 3.2.8. The 
page uses relative URLs for the clips. The movies played with 3.2.7, where the 
URL was relative to the movie page's html file. With 3.2.8, the player attempts 
to access the URL relative to the player, even though the documentation states 
that the clip URL is relative to the HTML file:

http://flowplayer.org/documentation/configuration/clips.html

---

Confirmed by me. That's a bad one.

Original issue reported on code.google.com by blacktrashproduct on 12 Mar 2012 at 6:50

GoogleCodeExporter commented 9 years ago
confirming an issue. the baseUrl is the swf player url not the html url. 

Original comment by dani...@electroteque.org on 13 Mar 2012 at 5:36

GoogleCodeExporter commented 9 years ago
Here is the problem, this has been around for a while, it checks if a base url 
is set, if its set then use the completeurl, inside the complete url check it 
will first check for baseurl, if null get the pageurl then the swfurl. I'll 
have to confirm against the old release but this change has been in there for a 
good year or so. 

The check was there to fix an issue when using encoding on the urls. 

By default flash will set the baseurl to the swf url. 

Can they not simply set the baseUrl to the new location ? 

Original comment by dani...@electroteque.org on 13 Mar 2012 at 7:56

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
confirming if its changed back it will directly affect the url encode feature, 
will have to try something. 

Original comment by dani...@electroteque.org on 13 Mar 2012 at 8:09

GoogleCodeExporter commented 9 years ago
http://code.google.com/p/flowplayer-core/issues/detail?id=412 change was 
affected due to this. 

Original comment by dani...@electroteque.org on 13 Mar 2012 at 8:41

GoogleCodeExporter commented 9 years ago
This is fixed in trunk, a change was required in the rtmp plugin to handle 
complete  urls differently so it doesn't obtain the player base url when no 
base url is set ;)

Original comment by dani...@electroteque.org on 13 Mar 2012 at 9:00

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
When the swf is loaded from a different domain (like with Unlimited from the 
Service Domain) this is still broken with _absolute_ (not relative) local paths:

$f("player", "http://myservicedomain.com/flowplayer-3.2.11.swf", {
  clip: {
    url: "/mymovie.flv"
    // relative path works:
    // url: "mymovie.flv"
  }
}

See: http://flowplayer.blacktrash.org/test/relative.html

Reopening.

Original comment by blacktrashproduct on 4 Jun 2012 at 8:20

GoogleCodeExporter commented 9 years ago
Just had a look with 327 that is not correct, same issue with 327. Because its 
checking for a forward slash on the filename and letting it pass through 
without adding the base url to it ??

Original comment by dani...@electroteque.org on 29 Jun 2012 at 4:39

GoogleCodeExporter commented 9 years ago
You're right, not a regression. But a bug.

Original comment by blacktrashproduct on 30 Jun 2012 at 1:37

GoogleCodeExporter commented 9 years ago
Not a bug a new feature from the looks of it, because it was never working. Its 
passing straight through and not adding the baseurl from the page. files 
without forward slashes were fine as it was going to that section of code. the 
detected default baseUrl is still the page url.  

in fact a url like this it would need to strip all paths from the page base 
url, then add it to the filename, otherwise it would start from the path of the 
page,  when a more direct way would be to simply set the baseURL config what do 
you think ? 

This line is the culprit

http://code.google.com/p/flowplayer-core/source/browse/flowplayer/trunk/src/acti
onscript/org/flowplayer/util/URLUtil.as#47

I don't think it was ever working like that adding the baseurl to such a 
filename, because its passing straight through and no baseurl is prepended the 
running application domain will be used. Its possible to add in and hopefully 
not slow anything down with string processing. 

Let me know. 

Original comment by dani...@electroteque.org on 30 Jun 2012 at 1:53

GoogleCodeExporter commented 9 years ago
I think this will work simply taking that part out because logically it will be 
returned on the next line if no baseurl is provided, but the baseurl has to be 
stripped in the next part of the function. 

Original comment by dani...@electroteque.org on 2 Jul 2012 at 4:16

GoogleCodeExporter commented 9 years ago
https://dl.dropbox.com/u/3394987/flowplayer-3.2.12.zip

tested all possible ways to configure the clip and baseurl and seems to 
function. It needs to strip all paths from the baseurl if set and prepend to 
the filename. 

Original comment by dani...@electroteque.org on 2 Jul 2012 at 5:37

GoogleCodeExporter commented 9 years ago
Closing this for now, will possibly have to go out with a new release with the 
slomo and rtmp plugin changes. 

Original comment by dani...@electroteque.org on 2 Jul 2012 at 6:01