473,246 Members | 1,574 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,246 software developers and data experts.

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="application/x-mplayer2"
pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
name="MediaPlayer1" 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
Sep 2 '07 #1
5 3380
Hello Anil

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

regards

michel


"Anil Gupte" <an*******@icinema.comschreef in bericht
news:OW**************@TK2MSFTNGP06.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="application/x-mplayer2"
pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
name="MediaPlayer1" 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


Sep 3 '07 #2
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="PlayerName" VIEWASTEXT>
<PARAM NAME="URL" VALUE="">
etc...
</OBJECT>

Note that I added id= and name= . Then I added a button:
Private Sub btnPlay_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnPlay.Click
PlayerID.enabled = True
PlayerID.URL = "bud5.wmv"
PlayerID.controls.play()
End Sub

It will not work.

Thanx,
--
Anil Gupte
www.keeninc.net
www.icinema.com

"Michel Posseth [MCP]" <MS**@posseth.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
Hello Anil

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

regards

michel


"Anil Gupte" <an*******@icinema.comschreef in bericht
news:OW**************@TK2MSFTNGP06.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="application/x-mplayer2"
pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
name="MediaPlayer1" 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



Sep 5 '07 #3

"Anil Gupte" <an*******@icinema.comwrote in message
news:Oh**************@TK2MSFTNGP04.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="PlayerName" VIEWASTEXT>
<PARAM NAME="URL" VALUE="">
etc...
</OBJECT>

Note that I added id= and name= . Then I added a button:
Private Sub btnPlay_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnPlay.Click
PlayerID.enabled = True
PlayerID.URL = "bud5.wmv"
PlayerID.controls.play()
End Sub

It will not work.

Thanx,
--
Anil Gupte
www.keeninc.net
www.icinema.com

"Michel Posseth [MCP]" <MS**@posseth.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>Hello Anil

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

regards

michel


"Anil Gupte" <an*******@icinema.comschreef in bericht
news:OW**************@TK2MSFTNGP06.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="application/x-mplayer2"
pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
name="MediaPlayer1" 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

Sep 5 '07 #4
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
www.keeninc.net
www.icinema.com

"Lloyd Sheen" <a@b.cwrote in message
news:u8*************@TK2MSFTNGP04.phx.gbl...
>
"Anil Gupte" <an*******@icinema.comwrote in message
news:Oh**************@TK2MSFTNGP04.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="PlayerName" VIEWASTEXT>
<PARAM NAME="URL" VALUE="">
etc...
</OBJECT>

Note that I added id= and name= . Then I added a button:
Private Sub btnPlay_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnPlay.Click
PlayerID.enabled = True
PlayerID.URL = "bud5.wmv"
PlayerID.controls.play()
End Sub

It will not work.

Thanx,
--
Anil Gupte
www.keeninc.net
www.icinema.com

"Michel Posseth [MCP]" <MS**@posseth.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>>Hello Anil

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

regards

michel


"Anil Gupte" <an*******@icinema.comschreef in bericht
news:OW**************@TK2MSFTNGP06.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="application/x-mplayer2"
pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
name="MediaPlayer1" 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

Sep 5 '07 #5

"Anil Gupte" <an*******@icinema.comwrote in message
news:%2****************@TK2MSFTNGP05.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
www.keeninc.net
www.icinema.com

"Lloyd Sheen" <a@b.cwrote in message
news:u8*************@TK2MSFTNGP04.phx.gbl...
>>
"Anil Gupte" <an*******@icinema.comwrote in message
news:Oh**************@TK2MSFTNGP04.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="PlayerName"
VIEWASTEXT>
<PARAM NAME="URL" VALUE="">
etc...
</OBJECT>

Note that I added id= and name= . Then I added a button:
Private Sub btnPlay_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnPlay.Click
PlayerID.enabled = True
PlayerID.URL = "bud5.wmv"
PlayerID.controls.play()
End Sub

It will not work.

Thanx,
--
Anil Gupte
www.keeninc.net
www.icinema.com

"Michel Posseth [MCP]" <MS**@posseth.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl.. .
Hello Anil

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

regards

michel


"Anil Gupte" <an*******@icinema.comschreef in bericht
news:OW**************@TK2MSFTNGP06.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="application/x-mplayer2"
pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
name="MediaPlayer1" 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

Sep 5 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

56
by: alan b | last post by:
I copied it and tried to edit the movie.htm below in the <PARAM NAME=*** location of the file where the videoclip is on my hard drive. It is already recorded by Windows Media Player. My version...
5
by: John | last post by:
I have a number of self-composed songs in mp3 format which are linked to their individual titles with <a href... The problem with this coding is that the songs open in a new window containing the...
6
by: jonathanztaub | last post by:
I have a DVD CD. * Is it possible to embed it within an html page? * Does the user has to have windows media player or any other program associated with it? * How exactly do I use the <embed>...
6
by: Qun Cao | last post by:
Hi Everyone, I am a beginner on cross language development. My problem at hand is to build a python interface for a C++ application built on top of a 3D game engine. The purpose of this python...
3
by: alice | last post by:
I've been trying for a long time to figure this out, to have a page with several MP3 clips, and each one having a custom start and stop button next to them to play the track. I finally found a bit...
3
by: Ollie Riches | last post by:
How do I embed a *.flv file (Flash Video) into an aspx page similar to embedding windows media player active x control? Cheers Ollie Riches
1
by: SeanBoyWalton | last post by:
Hi, I'm currently trying to build a website for a DJ friend of mine and I have come stuck with a couple of issues. I've searched everywhere and put some code together but I still have problems. ...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.