rejetto forum
Software => HTML & templates => HFS ~ HTTP File Server => RAWR-Designs => Topic started by: stit on July 12, 2009, 06:18:12 PM
-
Hi all,
i detected a bug concerning the streaming of videos.
if i want to preview an .avi video the url is not completely going to the video.
e.g. the folder is called "the house" and the video is called "video1.avi"
the link in the preview windows is going only to "/the", so the bug seems to be a missing "" in the embed code.
maybe s.o. knows where to find the specific term in the template.
hopefully i could help solving a bug!?
greetz
stit
-
Hi all,
i detected a bug concerning the streaming of videos.
if i want to preview an .avi video the url is not completely going to the video.
e.g. the folder is called "the house" and the video is called "video1.avi"
the link in the preview windows is going only to "/the", so the bug seems to be a missing "" in the embed code.
maybe s.o. knows where to find the specific term in the template.
hopefully i could help solving a bug!?
greetz
stit
Which template are you using? Do you actually get any error?
*make sure you set your video folder to allow anonymous access if you have a password set other wise it won't play.
rawr templates almost all are same.
in tpl look at [File]
in previewbox.js - look for the divx spawn box code
-
# Which template are you using? Do you actually get any error?
I use the RAWR Design black.
I get an error from my divx player, because the link isnt working.
# make sure you set your video folder to allow anonymous access if you have a password set other wise it won't play.
i have set a password for the root and if i give anonymous to the folder it wont be displayed to my normal account. i dont want the videos to be accesses for anonymous too.
# in previewbox.js
where is this file ?
i only find the .css file
and in the template file at [file] i dont find any txt like <embed>
thx so far.
stit
-
rawr_previewbox.js is in rawr_default folder.
The error you are getting probably because of not setting anonymous access. Try setting anonymous access in video folder you can keep the password in root. We haven't figured out a way to make it work without setting anonymous access.
// Insert DivX
function spawnDIVXBox(target,file) {
spawnBox(target,640,380);
setTimeout("setDIVXBox(\""+target+"\",\""+file+"\");",300);
}
function setDIVXBox(target,file) {
setName(file);
gEBI(target+"Content").innerHTML = "<object classid='clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616' width=640 height=380><param name=src value=\""+file+"\"/><embed type='video/divx' src="+file+" width=640 height=380 autoplay=true/></object>";
}
-
rawr_previewbox.js is in rawr_default folder.
i only have the *.tpl and a template folder and in the template folder there is no rawr_preview.js.
The error you are getting probably because of not setting anonymous access.
i gave anonymous access but the problem is still there.
<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"/>
this is the code which is generated. and you see this embed is fully corrupted.
why are drumbo and cup a new element ?
so this must be a bug in the preview.js but i don't find it.
am i just blind ?
thx so far.
-
rawr_previewbox.js is in rawr_default folder.
i only have the *.tpl and a template folder and in the template folder there is no rawr_preview.js.
The error you are getting probably because of not setting anonymous access.
i gave anonymous access but the problem is still there.
<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"/>
this is the code which is generated. and you see this embed is fully corrupted.
why are drumbo and cup a new element ?
so this must be a bug in the preview.js but i don't find it.
am i just blind ?
thx so far.
download the template again, you may be using the black, but you need default folder to stay in template.
-
This has nothing to do with my script so hopefully someone can help you here. For a start how are you even seeing this script, its generated in the javascript. I don't even use the embed tag for divx. Divx web player can act strangely at times.
EDIT: My bad, you are using firebug, and I do use embed. I see the problem, however I have NO IDEA, why it does that to the embed tag. I had to use Embed to fix Internet Explorer. Really weird.
Ok I found it, replace the code with this piece, I will silent update the templates, its a minor error.
// Insert DivX
function spawnDIVXBox(target,file) {
spawnBox(target,640,380);
setTimeout('setDIVXBox("'+target+'","'+file+'");',300);
}
function setDIVXBox(target,file) {
setName(file);
gEBI(target+'Content').innerHTML = '<object type="video/divx" width=640 height=380><param name=src value="'+file+'"/></object>';
}
Thanks for locating this :)
-
yes i use firebug.
good to know i could help.
but: i downloaded the template again and replaced the old rawr_previewbox.js with the new one. and now the preview isn't popping up any more. it simply happens nothing. maybe another bug ? oder which files have to be copied too ?
thanks so far..
-
try this attached preview box.
-
No I changed some more things, renamed the initPreviewBox to initBox. Sometimes its not as simple as it seems, when I update a template archive.
-
No I changed some more things, renamed the initPreviewBox to initBox. Sometimes its not as simple as it seems, when I update a template archive.
ok i copied all files and it works now, but only when i give anonymous access to the folder too.
i can live with that, but it would be cool if this would be fixed sometimes. (with .wmv files the preview works without giving anonymous access (WMP Plugin). maybe this is a "bug" with the divx player ?)
EDIT: i found a new bug. when i have a folder named with "x & y" the preview doesn't work too. the url will be corrupted as:
http://xx.homeftp.net/GUITOUD - I%26I/02 - Redemption & Blessing.mp3
HFS doesn't start the download when clicking the preview. i could play the folder before updating because of the other bug (this maybe helps).
& should be one of these http://de.selfhtml.org/html/referenz/zeichen.htm#benannte_html (http://de.selfhtml.org/html/referenz/zeichen.htm#benannte_html), like &
or &
when you want to test ist with the same folder: http://www.fresh-poulp.net/releases/FPR036.html (http://www.fresh-poulp.net/releases/FPR036.html)
thanks so far for fixing the bug so fast !
great job !
greetz
-
Which preview does this? It should still work, I run this for RAWR-Player and it fixes it:
file = file.replace('+','%2B').replace('&','%26');
-
this is the preview for an .mp3 file
if u edit:
file = file.replace('+','%2B').replace('&','&');
it will be correctly displayed but the file still isn't playing.
i wonder why i could play the folder before changing the files.
EDIT:
the player shows an corrupted path instead of the ID3 tag when playing a file. maybe this help solving the problem.
it shows ".net/GUITOUD - I&I/" instead of the name of the file
-
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!
-
Ehm... yeah I don't know how to fix this, HFS should be displaying the URL correctly, its got nothing to do with me.
Also stit you are the only person experiencing this, I do not, and never have.
-
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:
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:
http://www.my favorite mp3 collection.com/
What make you think you can have files that have spaces in them?
http://www.my favorite mp3 collection.com/Rihanna - Don't Stop The Music.mp3
Does that look like a legitimate URL to anyone?
-
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.
-
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.
-
stit, trust me, it's the dam space... Look at this code
<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.