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.
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.