Hi people. I have a problem loading videos using innerHTML and Firefox
the source is:
In the IE it functions but apper warnings of activex components...Code:<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Video Page</title> <style type="text/css"> #mediaplayer { width: 400px; height: 320px; background: #000; } </style> <script type="text/javascript"> function play(media){ //alert(media); document.getElementById('mediaplayer').innerHTML= '<object id="MediaPlayer" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"' +'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715"' +'standby="Loadin..." type="application/x-oleobject">' +'<param name="FileName" value="videos/'+media+'.wmv">' +'<param name="AnimationatStart" value="true">' +'<param name="TransparentatStart" value="true">' +'<param name="AutoStart" value="true">' +'<param name="ShowControls" value="TRUE">' +'<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/isapi/redir.dllprd=windows&sbp=mediaplayer&ar=' +'Media&sba=Plugin&" src="videos/'+media+'.wmv"' +'name="MediaPlayer" showcontrols="FALSE" width="400" height="320"></embed>' +'</object>' } </script> </head> <body> <div id="mediaplayer"> <object id="MediaPlayer" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" standby="Loading..." type="application/x-oleobject"> <param name="FileName" value="aaa.wmv"> <param name="AnimationatStart" value="true"> <param name="TransparentatStart" value="true"> <param name="AutoStart" value="true"> <param name="ShowControls" value="TRUE"> <embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/isapi/redir.dllprd=windows&sbp=mediaplayer&ar=Media&sba=Plugin&" src="aaa.wmv" name="MediaPlayer" showcontrols="FALSE" width="400" height="320"></embed> </object> </div> <ul id="menu"> <li><a onclick="play('1');return false" href="">Source 1</a></li> <li><a onclick="play('2');return false" href="">Source 2</a></li> <li><a onclick="play('3');return false" href="">Source 3</a></li> </ul> </embed> </body> </html>
The objective is a site that when click on links, appears in the video window the select video. I'm to use a wrong method?
Somebody can help me?
Thanks and sorry for my English



Reply With Quote

Bookmarks