Results 1 to 4 of 4

Thread: Problem Loading Videos

  1. #1
    Join Date
    Jul 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Problem Loading Videos

    Hi people. I have a problem loading videos using innerHTML and Firefox
    the source is:

    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>
    In the IE it functions but apper warnings of activex components...
    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

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    In order to avoid the 'click to activate feature' of IE and Opera with multimedia content, the script that loads the code must be external to the page. Warnings about Active X in IE are often just the result of loading a local page with javascript on or linked to it and will not happen once your page is live. I have a wizard for setting up the external code for multimedia content:

    http://home.comcast.net/~jscheuer1/s...activate_w.htm
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jul 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the reply...

    How it's that I must make loading of videos?
    Because it is that it does not work in Firefox?

    Thanks and sorry for my English!

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I'm not sure of the correct syntax for MediaPlayer in FF, usually there are several formats that will work for any given player, and what you have looks about right. No player will work in any given browser though if it is not configured in that browser's setup to do so as a plugin.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •