473,398 Members | 2,380 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,398 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 3391
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.