Embed Windows Media Player into a web page...?

Discussion in 'ASP .Net' started by benmourra@hotmail.com, Mar 6, 2006.

  1. Guest

    Hi all,

    I'm trying to create a web page using VS2005, ASP.NET 2.0, that will
    allow me to choose from a list of media files on my computer and then
    play my selection within an embedded Windows Media Player on the page.

    I've been able to eventually find out how to embed the player into the
    page by manually inserting code into the source view of my aspx file.
    It plays the file specified in the source view, but I'd like to be able
    to dynamically select a media file from a drop down list and then have
    it play, at runtime. Any ASP.NET 2.0 Media Player gurus out there?

    Any ideas/comments/suggestions would be greatly appreciated! (I'd like
    to get some sleep eventually...)

    Thanks in advance,
    Ben


    PS. For those who are interested, I got it working by inserting this
    code into the source of my aspx file:
    <OBJECT ID="MediaPlayer" WIDTH="320" HEIGHT="240"
    CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" STANDBY="Loading
    Windows
    Media Player components..." TYPE="application/x-oleobject" VIEWASTEXT>
    <PARAM NAME="FileName" VALUE="file:///C:/MovieClip.avi">
    <PARAM name="autostart" VALUE="false">
    <PARAM name="ShowControls" VALUE="true">
    <param name="ShowStatusBar" value="true">
    <PARAM name="ShowDisplay" VALUE="false">
    <EMBED TYPE="application/x-mplayer2" NAME="MediaPlayer">
    </EMBED>
    </OBJECT>
     
    , Mar 6, 2006
    #1
    1. Advertising

  2. inlay Guest

    Use COM... wmp.dll and then dynamically create a player object to play
    files. It works for me, but only problem I am having is that I can't
    get it to stop :(... it goes on playing until the file comes to an end,
    even if I close the browser!
     
    inlay, Mar 6, 2006
    #2
    1. Advertising

  3. Guest

    Yeah, that's happening for me too! I'd like the user to be able to use
    the builtin buttons, but all the samples i could find involve hiding
    the WMP buttons and creating your own Start, Pause and Stop buttons..
    Even in the SDK for Windows Media Player.. Or maybe I'm not looking in
    the right places?

    When you say dynamically what do you mean exactly? Are you using
    client-side scripting to dynamically change the file being played or
    are you doing it via Postback?

    Thanks for posting a reply, inlay..

    Ben
     
    , Mar 7, 2006
    #3
    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,346
    Steve C. Orr [MVP, MCSD]
    Apr 12, 2005
  2. ary
    Replies:
    1
    Views:
    1,095
    =?Utf-8?B?Q2lhcmFuIE8nJ0Rvbm5lbGw=?=
    Nov 28, 2006
  3. Mark C
    Replies:
    1
    Views:
    360
    mank1327
    Jan 8, 2007
  4. richard
    Replies:
    8
    Views:
    415
    Bergamot
    Nov 13, 2008
  5. Mark C
    Replies:
    1
    Views:
    123
    Evertjan.
    Jan 8, 2007
Loading...

Share This Page