Load Video File Dynamically

V

vunet

I am trying to load FLV file dynamically:

User stays on the same page and clicks link to watch video.
Floating DIV is created (I used fade-in effect from Scriptaculous) and
I write DIV's innerHTML for FLV object like

function getFLVContainer(filePath){
return "<p style='text-align:center;padding:20px 5px;'>" +
"<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'
codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/
swflash.cab#version=8,0,0,0' width='640' height='376' id='fullscreen'
align='middle'>" +
"<param name='allowScriptAccess' value='sameDomain' />" +
"<param name='movie' value='/movieplayer.swf' />" +
"<param name='quality' value='high' />" +
"<param name='salign' value='tl' />" +
"<param name='bgcolor' value='#ffffff' />" +
"<param NAME=FlashVars VALUE='vidpath="+filePath+"'> " +
"<embed src='/movieplayer.swf' FlashVars='vidpath="+filePath+"'
quality='high' salign='tl' bgcolor='#ffffff' width='640' height='376'
name='fullscreen' align='middle' allowScriptAccess='sameDomain'
type='application/x-shockwave-flash' pluginspage='http://
www.macromedia.com/go/getflashplayer' />" +
"</object></p>";
}

However, IE6, for example, takes 10-15 seconds to load the whole thing
without even showing a sign of that something was clicked by user. I
mean user clicks and nothing happens for a long time.
Also, in FF multiple clicks on video link end up in showing empty DIV
without any video inside. Refreshing the page fixes it but it is not
the solution.
Can one recommend an idea to load FLV or any movie file dynamically
which works really well?
Thanks a lot to everyone.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

onfocus on flash element 0
Document.write and Flash 3
Passing a value from jscript to html 5
YouTube video code 9
Problem with javascript function call 7
swfobject.js 0
Firefox 0
frames with flash 1

Members online

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,699
Latest member
AnneRosen

Latest Threads

Top