rejetto forum
May 24, 2012, 11:07:45 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: This forum is free, you do NOT need to register to post. But you may.
PROBLEMS? QUESTIONS? CLICK HERE!
Fill the survey!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Streaming AVI MOV's not quite working  (Read 2016 times)
0 Members and 2 Guests are viewing this topic.
svankley
Occasional poster
*
Offline Offline

United States United States

Posts: 6


View Profile Email
« on: November 13, 2007, 08:30:59 PM »

I want to stream training videos on the HFS server and I have it working on a test test page but when I try to incorporate it into HFS, I can't get it to work. Here's what I did:
I modified the AVI section as such:

Code:
[file.avi]
<tr>
   <td class="row1" align="center" valign="middle" height="50"><a href="%item-url%" class="messageimagelink"><img src="/template/icons/avi.gif" width="32" height="32" border="0"/></td>
   <td class="row6h" width="100%" height="50"><span class="forumlink"> <a href="%item-url%" class="forumlink">%item-name%</a><br />
   </span><span class="genmed">%comment%
   </span><span class="genmed">%new%</span><script language="javascript">var top='%item-dl-count%'; if (top > 24) { document.write ("<span class=bluetext><i>File has been downloaded %item-dl-count% times now!!</i></span>") }</script></td>
   <td class="row1" align="center" valign="middle" height="50"><span class="gensmall"><b>File Size:</b> %item-size%&nbsp;&nbsp;&nbsp;&nbsp;<b>Hits:</b> %item-dl-count%<br /><b>Date:</b> %item-modified%</span></td>
   <td class="row1" align="center" valign="middle" height="50"><span class="gensmall"><a href="javascript:LoadMOV('http://%host%%encoded-folder%%item-url%')"><img src="/template/icons/quicklink/wmp.gif" width=24 height=24/></a><img src="/template/images/spacer.gif" width="16" height="0" /><a href="%item-url%"><img src="/template/icons/quicklink/download.gif" alt="" border="0" height="24" width="24" /></a><br /><div id="mp3%item-name%"></div></span></td>


And then in the Header I have:

Code:
<script language="JavaScript" type="text/javascript"> <!-- This is used to play AVI movies in a new marquee window -->

function LoadMOV(URL) {

   HTMLstring='<HTML>'\n;
   HTMLstring+='<HEAD>'\n;
   HTMLstring+='<TITLE>Streaming Movie</TITLE>'\n;
   HTMLstring+='</HEAD>'\n;
   HTMLstring+='<BODY>'\n;
   HTMLstring+='<center>'\n;
   HTMLstring+='<EMBED src=URL width=&#34;820&#34; height=&#34;640&#34; scale=&#34;aspect&#34; autoplay=&#34;true&#34; controller=&#34;true&#34; loop=&#34;false&#34; bgcolor=&#34;#000000&#34; pluginspage=&#34;http://www.apple.com/quicktime/download/&#34;>'\n;
   HTMLstring+='</EMBED>'\n;
   HTMLstring+='</center>'\n;
   HTMLstring+='</BODY>'\n;
   HTMLstring+='</HTML>';
   alert(HTMLstring);
   newwindow=window.open('about:blank','','left=10,top=10,width=840,height=670');
   newdocument=newwindow.document;
   newdocument.write(HTMLstring);
   newdocument.close();
}
</script>

But the alert returns the attached JPG:


The problem is, the code works fine with double-quotes, but I can't get double-quotes in the javascript to work, so I tried to use &#34; in place of the quotes. The [\n] is supposed to be a CRLF, but that's not working either in HFS, but is working in my test code.

Has anyone implemented DivX AVI streaming another way or does anyone have any ideas how to make this work??

Thanks,

Steve
« Last Edit: November 13, 2007, 08:34:28 PM by svankley » Logged
rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11829


View Profile
« Reply #1 on: November 13, 2007, 08:42:15 PM »

i'm not a js-expert, but i guess \n should be inside the quotes, not outside.
Logged
svankley
Occasional poster
*
Offline Offline

United States United States

Posts: 6


View Profile Email
« Reply #2 on: November 13, 2007, 09:29:32 PM »

Thanks for the suggestion, but I tried that and I got an error stating something about an unterminated string value...
Logged
TSG
Moderator
Insane poster
*****
Offline Offline

Australia Australia

Posts: 1919



View Profile WWW
« Reply #3 on: November 13, 2007, 10:30:08 PM »

Remove the breaks altogether... and do it all in...

obj.write(' ');
obj.write(' ');
obj.write(' ');


Also, put a backslash before each " so \"value\"

without the backslash you are closing the string early.


Logged

svankley
Occasional poster
*
Offline Offline

United States United States

Posts: 6


View Profile Email
« Reply #4 on: November 18, 2007, 07:55:33 PM »

That did it!!!  Thanks!

Steve
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!


Google visited last this page May 12, 2012, 02:40:24 PM
anything