Embedding WM Player

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Anil Gupte

    Embedding WM Player

    How do I embed Windows Media Player so I can control it with VB code. I am
    familiar with embedding in a web page like this:
    ***************
    <embed src="Test.asx" width=320 height=300 autostart=True
    type="applicati on/x-mplayer2"
    pluginspage="ht tp://www.microsoft.c om/Windows/MediaPlayer/"
    name="MediaPlay er1" showcontrols=1 showstatusbar=1 </embed>
    *************** *

    I have also created a WM Player control in a VB Windows Application. But
    now, I want to create the same app in a web page. I want to create my own
    Play, FF, Rewind etc buttons with associated functions that handle these
    events in a custom manner. I am using VB.Net 2003

    Thanx,
    --
    Anil Gupte
    Innovate with UsLeading the Way in Advanced Technology Solutions Discover state-of-the-art services in logistics, databases, and AI designed for evolving




  • Michel Posseth  [MCP]

    #2
    Re: Embedding WM Player

    Hello Anil

    Just set a media player control in the toolbox and drag it on your form

    regards

    michel




    "Anil Gupte" <anil-list@icinema.co mschreef in bericht
    news:OWtNxMR7HH A.4736@TK2MSFTN GP06.phx.gbl...
    How do I embed Windows Media Player so I can control it with VB code. I
    am familiar with embedding in a web page like this:
    ***************
    <embed src="Test.asx" width=320 height=300 autostart=True
    type="applicati on/x-mplayer2"
    pluginspage="ht tp://www.microsoft.c om/Windows/MediaPlayer/"
    name="MediaPlay er1" showcontrols=1 showstatusbar=1 </embed>
    *************** *
    >
    I have also created a WM Player control in a VB Windows Application. But
    now, I want to create the same app in a web page. I want to create my own
    Play, FF, Rewind etc buttons with associated functions that handle these
    events in a custom manner. I am using VB.Net 2003
    >
    Thanx,
    --
    Anil Gupte
    Innovate with UsLeading the Way in Advanced Technology Solutions Discover state-of-the-art services in logistics, databases, and AI designed for evolving


    >
    >

    Comment

    • Anil Gupte

      #3
      Re: Embedding WM Player

      I tried that but it does not work. The object I dragged into the WebForm
      appears to have no name or ID that I can use to address it. One of the
      params in the embedded object is "ID" and another is "Name". I tried
      supplying values to those paramaters, but it does not work.

      So, the HTML looks like this:

      <OBJECT id="PlayerID" style="Z-INDEX: 102; LEFT: 432px; POSITION: absolute;
      TOP: 48px" classid="clsid: 6BF52A52-394A-11D3-B153-00C04F79FAA6"
      name="PlayerNam e" VIEWASTEXT>
      <PARAM NAME="URL" VALUE="">
      etc...
      </OBJECT>

      Note that I added id= and name= . Then I added a button:
      Private Sub btnPlay_Click(B yVal sender As System.Object, ByVal e As
      System.EventArg s) Handles btnPlay.Click
      PlayerID.enable d = True
      PlayerID.URL = "bud5.wmv"
      PlayerID.contro ls.play()
      End Sub

      It will not work.

      Thanx,
      --
      Anil Gupte
      Innovate with UsLeading the Way in Advanced Technology Solutions Discover state-of-the-art services in logistics, databases, and AI designed for evolving



      "Michel Posseth [MCP]" <MSDN@posseth.c omwrote in message
      news:%23zpgp6e7 HHA.4712@TK2MSF TNGP04.phx.gbl. ..
      Hello Anil
      >
      Just set a media player control in the toolbox and drag it on your form
      >
      regards
      >
      michel
      >
      >
      >
      >
      "Anil Gupte" <anil-list@icinema.co mschreef in bericht
      news:OWtNxMR7HH A.4736@TK2MSFTN GP06.phx.gbl...
      >How do I embed Windows Media Player so I can control it with VB code. I
      >am familiar with embedding in a web page like this:
      >************** *
      ><embed src="Test.asx" width=320 height=300 autostart=True
      >type="applicat ion/x-mplayer2"
      >pluginspage="h ttp://www.microsoft.c om/Windows/MediaPlayer/"
      >name="MediaPla yer1" showcontrols=1 showstatusbar=1 </embed>
      >************** **
      >>
      >I have also created a WM Player control in a VB Windows Application. But
      >now, I want to create the same app in a web page. I want to create my
      >own Play, FF, Rewind etc buttons with associated functions that handle
      >these events in a custom manner. I am using VB.Net 2003
      >>
      >Thanx,
      >--
      >Anil Gupte
      >www.keeninc.net
      >www.icinema.com
      >>
      >>
      >
      >

      Comment

      • Lloyd Sheen

        #4
        Re: Embedding WM Player


        "Anil Gupte" <anil-list@icinema.co mwrote in message
        news:OheoKh37HH A.5752@TK2MSFTN GP04.phx.gbl...
        >I tried that but it does not work. The object I dragged into the WebForm
        >appears to have no name or ID that I can use to address it. One of the
        >params in the embedded object is "ID" and another is "Name". I tried
        >supplying values to those paramaters, but it does not work.
        >
        So, the HTML looks like this:
        >
        <OBJECT id="PlayerID" style="Z-INDEX: 102; LEFT: 432px; POSITION:
        absolute; TOP: 48px" classid="clsid: 6BF52A52-394A-11D3-B153-00C04F79FAA6"
        name="PlayerNam e" VIEWASTEXT>
        <PARAM NAME="URL" VALUE="">
        etc...
        </OBJECT>
        >
        Note that I added id= and name= . Then I added a button:
        Private Sub btnPlay_Click(B yVal sender As System.Object, ByVal e As
        System.EventArg s) Handles btnPlay.Click
        PlayerID.enable d = True
        PlayerID.URL = "bud5.wmv"
        PlayerID.contro ls.play()
        End Sub
        >
        It will not work.
        >
        Thanx,
        --
        Anil Gupte
        Innovate with UsLeading the Way in Advanced Technology Solutions Discover state-of-the-art services in logistics, databases, and AI designed for evolving


        >
        "Michel Posseth [MCP]" <MSDN@posseth.c omwrote in message
        news:%23zpgp6e7 HHA.4712@TK2MSF TNGP04.phx.gbl. ..
        >Hello Anil
        >>
        >Just set a media player control in the toolbox and drag it on your form
        >>
        >regards
        >>
        >michel
        >>
        >>
        >>
        >>
        >"Anil Gupte" <anil-list@icinema.co mschreef in bericht
        >news:OWtNxMR7H HA.4736@TK2MSFT NGP06.phx.gbl.. .
        >>How do I embed Windows Media Player so I can control it with VB code. I
        >>am familiar with embedding in a web page like this:
        >>************* **
        >><embed src="Test.asx" width=320 height=300 autostart=True
        >>type="applica tion/x-mplayer2"
        >>pluginspage=" http://www.microsoft.c om/Windows/MediaPlayer/"
        >>name="MediaPl ayer1" showcontrols=1 showstatusbar=1 </embed>
        >>************* ***
        >>>
        >>I have also created a WM Player control in a VB Windows Application. But
        >>now, I want to create the same app in a web page. I want to create my
        >>own Play, FF, Rewind etc buttons with associated functions that handle
        >>these events in a custom manner. I am using VB.Net 2003
        >>>
        >>Thanx,
        >>--
        >>Anil Gupte
        >>www.keeninc.net
        >>www.icinema.com
        >>>
        >>>
        >>
        >>
        >
        >
        To use the embedded control you will have to use javascript to play. If you
        set the control to autoplay then you set the url and when the page loads it
        will play. The play code on the server will do nothing so your button click
        will have to be handled on the client side.

        Hope this helps
        Lloyd Sheen

        Comment

        • Anil Gupte

          #5
          Re: Embedding WM Player

          Yeah, I got this same feedback elsewhere. I thought embedded objects were
          to be addressed only server side. After all the point of having an embedded
          object was so the object did not need to be installed on the client side.
          --
          Anil Gupte
          Innovate with UsLeading the Way in Advanced Technology Solutions Discover state-of-the-art services in logistics, databases, and AI designed for evolving



          "Lloyd Sheen" <a@b.cwrote in message
          news:u8wQQQ87HH A.748@TK2MSFTNG P04.phx.gbl...
          >
          "Anil Gupte" <anil-list@icinema.co mwrote in message
          news:OheoKh37HH A.5752@TK2MSFTN GP04.phx.gbl...
          >>I tried that but it does not work. The object I dragged into the WebForm
          >>appears to have no name or ID that I can use to address it. One of the
          >>params in the embedded object is "ID" and another is "Name". I tried
          >>supplying values to those paramaters, but it does not work.
          >>
          >So, the HTML looks like this:
          >>
          ><OBJECT id="PlayerID" style="Z-INDEX: 102; LEFT: 432px; POSITION:
          >absolute; TOP: 48px" classid="clsid: 6BF52A52-394A-11D3-B153-00C04F79FAA6"
          >name="PlayerNa me" VIEWASTEXT>
          > <PARAM NAME="URL" VALUE="">
          >etc...
          ></OBJECT>
          >>
          >Note that I added id= and name= . Then I added a button:
          > Private Sub btnPlay_Click(B yVal sender As System.Object, ByVal e As
          >System.EventAr gs) Handles btnPlay.Click
          > PlayerID.enable d = True
          > PlayerID.URL = "bud5.wmv"
          > PlayerID.contro ls.play()
          > End Sub
          >>
          >It will not work.
          >>
          >Thanx,
          >--
          >Anil Gupte
          >www.keeninc.net
          >www.icinema.com
          >>
          >"Michel Posseth [MCP]" <MSDN@posseth.c omwrote in message
          >news:%23zpgp6e 7HHA.4712@TK2MS FTNGP04.phx.gbl ...
          >>Hello Anil
          >>>
          >>Just set a media player control in the toolbox and drag it on your form
          >>>
          >>regards
          >>>
          >>michel
          >>>
          >>>
          >>>
          >>>
          >>"Anil Gupte" <anil-list@icinema.co mschreef in bericht
          >>news:OWtNxMR7 HHA.4736@TK2MSF TNGP06.phx.gbl. ..
          >>>How do I embed Windows Media Player so I can control it with VB code.
          >>>I am familiar with embedding in a web page like this:
          >>>************ ***
          >>><embed src="Test.asx" width=320 height=300 autostart=True
          >>>type="applic ation/x-mplayer2"
          >>>pluginspage= "http://www.microsoft.c om/Windows/MediaPlayer/"
          >>>name="MediaP layer1" showcontrols=1 showstatusbar=1 </embed>
          >>>************ ****
          >>>>
          >>>I have also created a WM Player control in a VB Windows Application.
          >>>But now, I want to create the same app in a web page. I want to create
          >>>my own Play, FF, Rewind etc buttons with associated functions that
          >>>handle these events in a custom manner. I am using VB.Net 2003
          >>>>
          >>>Thanx,
          >>>--
          >>>Anil Gupte
          >>>www.keeninc.net
          >>>www.icinema.com
          >>>>
          >>>>
          >>>
          >>>
          >>
          >>
          >
          To use the embedded control you will have to use javascript to play. If
          you set the control to autoplay then you set the url and when the page
          loads it will play. The play code on the server will do nothing so your
          button click will have to be handled on the client side.
          >
          Hope this helps
          Lloyd Sheen

          Comment

          • Lloyd Sheen

            #6
            Re: Embedding WM Player


            "Anil Gupte" <anil-list@icinema.co mwrote in message
            news:%23Po$LW87 HHA.1444@TK2MSF TNGP05.phx.gbl. ..
            Yeah, I got this same feedback elsewhere. I thought embedded objects were
            to be addressed only server side. After all the point of having an
            embedded object was so the object did not need to be installed on the
            client side.
            --
            Anil Gupte
            Innovate with UsLeading the Way in Advanced Technology Solutions Discover state-of-the-art services in logistics, databases, and AI designed for evolving


            >
            "Lloyd Sheen" <a@b.cwrote in message
            news:u8wQQQ87HH A.748@TK2MSFTNG P04.phx.gbl...
            >>
            >"Anil Gupte" <anil-list@icinema.co mwrote in message
            >news:OheoKh37H HA.5752@TK2MSFT NGP04.phx.gbl.. .
            >>>I tried that but it does not work. The object I dragged into the WebForm
            >>>appears to have no name or ID that I can use to address it. One of the
            >>>params in the embedded object is "ID" and another is "Name". I tried
            >>>supplying values to those paramaters, but it does not work.
            >>>
            >>So, the HTML looks like this:
            >>>
            >><OBJECT id="PlayerID" style="Z-INDEX: 102; LEFT: 432px; POSITION:
            >>absolute; TOP: 48px"
            >>classid="clsi d:6BF52A52-394A-11D3-B153-00C04F79FAA6" name="PlayerNam e"
            >>VIEWASTEXT>
            >> <PARAM NAME="URL" VALUE="">
            >>etc...
            >></OBJECT>
            >>>
            >>Note that I added id= and name= . Then I added a button:
            >> Private Sub btnPlay_Click(B yVal sender As System.Object, ByVal e As
            >>System.EventA rgs) Handles btnPlay.Click
            >> PlayerID.enable d = True
            >> PlayerID.URL = "bud5.wmv"
            >> PlayerID.contro ls.play()
            >> End Sub
            >>>
            >>It will not work.
            >>>
            >>Thanx,
            >>--
            >>Anil Gupte
            >>www.keeninc.net
            >>www.icinema.com
            >>>
            >>"Michel Posseth [MCP]" <MSDN@posseth.c omwrote in message
            >>news:%23zpgp6 e7HHA.4712@TK2M SFTNGP04.phx.gb l...
            >>>Hello Anil
            >>>>
            >>>Just set a media player control in the toolbox and drag it on your form
            >>>>
            >>>regards
            >>>>
            >>>michel
            >>>>
            >>>>
            >>>>
            >>>>
            >>>"Anil Gupte" <anil-list@icinema.co mschreef in bericht
            >>>news:OWtNxMR 7HHA.4736@TK2MS FTNGP06.phx.gbl ...
            >>>>How do I embed Windows Media Player so I can control it with VB code.
            >>>>I am familiar with embedding in a web page like this:
            >>>>*********** ****
            >>>><embed src="Test.asx" width=320 height=300 autostart=True
            >>>>type="appli cation/x-mplayer2"
            >>>>pluginspage ="http://www.microsoft.c om/Windows/MediaPlayer/"
            >>>>name="Media Player1" showcontrols=1 showstatusbar=1 </embed>
            >>>>*********** *****
            >>>>>
            >>>>I have also created a WM Player control in a VB Windows Application.
            >>>>But now, I want to create the same app in a web page. I want to
            >>>>create my own Play, FF, Rewind etc buttons with associated functions
            >>>>that handle these events in a custom manner. I am using VB.Net 2003
            >>>>>
            >>>>Thanx,
            >>>>--
            >>>>Anil Gupte
            >>>>www.keeninc.net
            >>>>www.icinema.com
            >>>>>
            >>>>>
            >>>>
            >>>>
            >>>
            >>>
            >>
            >To use the embedded control you will have to use javascript to play. If
            >you set the control to autoplay then you set the url and when the page
            >loads it will play. The play code on the server will do nothing so your
            >button click will have to be handled on the client side.
            >>
            >Hope this helps
            >Lloyd Sheen
            >
            >
            Unless the control exists on the client nothing will happen. There is no
            way for a server to cause music to play on a client. The client will
            request a song from a server and then play it using the WM player that
            exists on the client. All control of the playing is done thru the client
            although the server may update attributes on the client page.


            If you PM me (private message) at sqlguy at hotmail dot com I will give you
            link to my site and see if that is close to what you want. If so I can
            share code.

            Lloyd Sheen

            Comment

            Working...