pls help....media player wont play

Discussion in 'Javascript' started by shotokan99, Aug 30, 2007.

  1. shotokan99

    shotokan99 Guest

    hello,

    i wanted to embed on my page windows media player on run-time. test
    browser is ie, and my code goes like this:

    function make_player(){
    var r=document.getElementById('d_main');
    var k=document.createElement('object');
    k.classid='CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95';
    k.id='mplayer';
    k.width=320;
    k.height=286;
    k.codebase='http://activex.microsoft.com/activex/controls/mplayer/en/
    nsmp2inf.cab#Version=6,4,7,1112';
    r.appendChild(k);

    var p_showcontrol=document.createElement('param');
    p_showcontrol.name='Showcontrols';
    p_showcontrol.value='True';
    k.appendChild(p_showcontrol);

    var p_au2=document.createElement('param');
    p_au2.name='autoStart';
    p_au2.value='True';
    k.appendChild(p_au2);

    var p_file=document.createElement('param');
    p_file.name='Filename';
    p_file.value='Madagascar.avi';
    k.appendChild(p_file);
    }
    //----------------------------------- //

    the code above will run without any error msgs, but wont play the
    video. what is wrong with my code?
    shotokan99, Aug 30, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. cyshao
    Replies:
    1
    Views:
    3,319
    Steve C. Orr [MVP, MCSD]
    Apr 12, 2005
  2. tg
    Replies:
    1
    Views:
    1,560
    Travis Newbury
    May 9, 2006
  3. ary
    Replies:
    1
    Views:
    1,083
    =?Utf-8?B?Q2lhcmFuIE8nJ0Rvbm5lbGw=?=
    Nov 28, 2006
  4. Replies:
    0
    Views:
    970
  5. haiwen

    how to set media player loop play?

    haiwen, Jan 10, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    278
    haiwen
    Jan 10, 2005
Loading...

Share This Page