rejetto forum

Bug on playing Video Files (url cut off)

stit · 19 · 8105

0 Members and 1 Guest are viewing this topic.

Offline XGate

  • Occasional poster
  • *
    • Posts: 2
    • View Profile
TSG: No it's not the HFS or your script.  People who uses internet should know that URL should not contain spaces.  For example.  There's NO such URL written as:

Code: [Select]
http://www.my favorite mp3 collection.com/
Hence, you can't have a space in your file name or folders on any web server.  What this mean is that if you want to host "Rihanna - Don't Stop The Music.mp3", you can't.  If you were to host a download link to that mp3 file, you'll notice that IE will add "%20" if you click to download it.  But if you try to stream that MP3, you'll find out that it will not work.  If you can't have:

Code: [Select]
http://www.my favorite mp3 collection.com/
What make you think you can have files that have spaces in them?

Code: [Select]
http://www.my favorite mp3 collection.com/Rihanna - Don't Stop The Music.mp3
Does that look like a legitimate URL to anyone?


Offline TSG

  • Moderator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
That's the point I was trying to make... I don't get the bug he speaks of.

Ok after some research, it appears to be Firefox decoding the value automatically for the name tag... I think... I knew that method would bite us on the arse eventually hehe.

If I force a double encoding, I see it correctly in name, as if it has been decoded, however it bugs other browsers. {.encodeuri|%item-full-url%.}

Either way, it has never stopped my previews from working.

I will not fix any more bugs with this, we are working on a new preview box anyway that is far superior.
« Last Edit: July 15, 2009, 08:09:01 AM by TSG »


Offline stit

  • Occasional poster
  • *
    • Posts: 16
    • View Profile
Gosh, I hate to tell you people this.  The error is not from the script!!!  The error is in the file name!!!  RULE #1.  THERE SHOULD NEVER BE "SPACE" USED IN THE URL OR THE FILE NAME THAT RESIDES ON THE WEB SERVER.

Ofcourse it seems to work with IE because IE translate your dam file that contains space to "%20"

So if you have a file that contains space, in your static URL, try to replace the space with "%20" and you'll see everything kicks in.  Many browsers does not encode "spaces" in the file name to "%20" as it would break the rule.

For Crying Out Loud, you are venturing into an unknown territory!  Get back to your basic routine!

i tried your way but it doesnt work too. and other files with blank in it work FINE.
so please dont say i would have no idea of the territory.

..
lets TSG make a new preview box. thanks for that.

greetz.
« Last Edit: July 16, 2009, 08:52:23 PM by stit »


Offline XGate

  • Occasional poster
  • *
    • Posts: 2
    • View Profile
stit, trust me, it's the dam space... Look at this code

Code: [Select]
<param value="http://xxxx.homeftp.net/Videos/Volleyball Drumbo Cup.avi" name="src"/>
<embed width="640" height="380" autoplay="true/" cup.avi="" drumbo="" src="http://xxxx.homeftp.net/Videos/Volleyball" type="video/divx"/>
Line 1: "http://xxxx.homeftp.net/Videos/Volleyball Drumbo Cup.avi" contains spaces that was cut off by the URL encoding engine.  Thus this is why you get the wrong embedding code.  Let me explain below.

Line 2:
 (a) error 1 is autoplay="true/"  <-- "autoplay" only looks for "true" or "false"... NOT "true/"
 (b) error 2 cup.avi and drumbo was part of the filename but since the Line 1 of your example code contains spaces, the encoder or code generator treated drumbo and Cup.avi as a string parameter, hence your "src" is truncated at the first space.

Recap
Line 1: contains 2 errors. 1) the spaces in filename 2) another space in filename
Line 2: (1) "true/" is not the correct boolean  (2) "cup.avi" is not an embed reserved parameter  (3) "Drumbo" is not an embed reserved parameter  (4) DivX reserved "src" must be a valid DivX file.  "Volleyball" is not a divx file but "Volleyball Drumbo Cup.avi" is but yet, because you have the space there, it was truncated by the code generator thus leaving you with just "Volleyball" as a folder.  Another word, you didn't supply a supported DivX file.