Click to See Complete Forum and Search --> : quicktime div innerHTML embed object reload no video


HotZat
10-30-2006, 08:52 PM
Hi webdevelopers
I have a page that chooses a video from a list using a button onclick event, writes the avi into object and embed quicktime as a string, and reloads it into a DIV element in the body.

The Problem is that after the avi is completely loaded, if I select the same video again, there is no image, only sound. In other words, as long as it says, "downloading WHATEVER.avi" in the status bar, it plays.

I have tried it on 3 machines to the same effect. All machines used IE6.

This is in the HEAD:
<script>
var video = new Array();
video[0]="powerslave.jpg";
video[1]="AJ1.avi";
video[2]="AJ2.avi";
video[3]="AJ3.avi";

var Title = new Array();
Title[0]="Iron Maiden's Power Slave.";
Title[1]="Aggie n Jason 1";
Title[2]="Aggie n Jason 2";
Title[3]="Aggie n Jason 3";

function changeDiv(aaa)
{
StrBOXX='<p>This is ' + Title[aaa] + '.</p>'
StrBOXX+='<form>'
if (aaa==0)
{StrBOXX+='<p><img src="' + video[aaa] + '" border="2"></p>'}
else
{StrBOXX+='<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="255" width="320" id="OCplayer" align="left"></p>'
StrBOXX+=' <param name="autoplay" value="true"></p>'
StrBOXX+=' <param name="controller" value="true"></p>'
StrBOXX+=' <param name="src" value="' + video[aaa] + '"></p>'
StrBOXX+=' <embed id="OCplayer" src="' + video[aaa] + '" height="255" width="320" align="left" autoplay="true" controller="true"></embed></p>'
StrBOXX+='</object></p>'}
StrBOXX+='</form>'
document.getElementById('BOXX').innerHTML=StrBOXX
}
</script>

This is in the Body:

<p>Choices:<br>
<input value="Stop" type="button" onclick="changeDiv(0)">
<input value="AJ1" type="button" onclick="changeDiv(1)">
<input value="AJ2" type="button" onclick="changeDiv(2)">
<input value="AJ3" type="button" onclick="changeDiv(3)">

</p>

<div id="BOXX">
<p>Choose.</p>
<form>
<p><img src="powerslave.jpg" border="2"></p>
</form>
</div>

VideoHelp
10-30-2006, 10:31 PM
One possibility,

For AVI - if you have audio but cannot see the video, the user needs the proper Codec.

For information about finding and downloading codecs, see the Using codecs FAQ.


Here’s a working link:

http://www.microsoft.com/windows/windowsmedia/player/faq/codec.mspx

Hope it helps.

HotZat
10-31-2006, 08:10 AM
Thank you for the reply
I believe that it is not a codec problem for two reasons.

1
I used "gspot" to check the avi's, and I have all necessary codecs.

2
The video plays properly, great sound and video, unless:
- I finish downloading the avi from the site, and
- click on the same video button again.
Then I hear sound, but the entire player appears to be missing, no controls visible or anything.

I should have the page back up later today and will post a link.

HotZat
10-31-2006, 10:50 AM
Here is the page:

http://www.hotzat.com/outrigger/Jasons.aspx

VideoHelp
10-31-2006, 10:54 AM
Hello again,

There's a pretty good QT EMBED reference page at:

http://www.apple.com/quicktime/tutorials/embed.html



You would think that W3C would have an extended reference on EMBED, but nada! I found a very useful EMBED parameter at the above-mentioned QT site (SCALE="tofit") that isn't even referenced at W3C:

http://www.w3.org/TR/html4/index/attributes.html



There is a CACHE parameter for EMBED that instructs QT to cache its videos. I don't know if it would work properly on AVIs. Might be worth a look.

I EMBED both QT and AVI using different (FP2003) HTMs of course with an inline frame. I haven't run into any cache'ing problems, yet.

Good luck.

HotZat
10-31-2006, 11:21 AM
Thank you again for the reply

I have tried the document.write method as described on the apple site. That works fine but it opens a new page, which is not what I am going for.

And the w3 table is awesome, thanks.

I found this ie6 bug at this site:

http://blog.deconcept.com/2006/05/18/flash-player-bug-streaming-content-innerhtml-ie/

That is what I am looking at now.

any ideas on that?

mind posting some code for your inline frame?

HotZat
10-31-2006, 12:42 PM
I got it working in firefox by changing the embed to this:
<embed id="OCplayer" type=video/quicktime pluginspage=http://www.apple.com/quicktime/download/ src="' + video[aaa] + '" height="255" width="320" align="left" autoplay="true" controller="true"></embed>
so,
now it works in firefox!
why not in ie6?
I think it is a "bug" in ie6 that doesn't like quicktime.
Any ideas on a fix there?

HotZat
12-06-2006, 12:58 PM
I wanted to let you know that I now believe it was completely the fault of ie6.
Ok, all my fault.

I have an old ie6 patch designed to block streaming video, installed by the office which owns my computers.

I believe this to be true because even the simplest embed code with no frills and repeat set to true has the exact same issue only on my office machines.

And 5 friends with IE6 on home machines have no issues.

Thanks again