473,786 Members | 2,407 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
www.keeninc.net
www.icinema.com
Sep 2 '07 #1
5 3414
Hello Anil

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

regards

michel


"Anil Gupte" <an*******@icin ema.comschreef in bericht
news:OW******** ******@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
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="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
www.keeninc.net
www.icinema.com

"Michel Posseth [MCP]" <MS**@posseth.c omwrote in message
news:%2******** ********@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" <an*******@icin ema.comschreef in bericht
news:OW******** ******@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



Sep 5 '07 #3

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

"Michel Posseth [MCP]" <MS**@posseth.c omwrote in message
news:%2******** ********@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" <an*******@icin ema.comschreef in bericht
news:OW******* *******@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

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******** *****@TK2MSFTNG P04.phx.gbl...
>
"Anil Gupte" <an*******@icin ema.comwrote in message
news:Oh******** ******@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]" <MS**@posseth.c omwrote in message
news:%2******* *********@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" <an*******@icin ema.comschreef in bericht
news:OW****** ********@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

Sep 5 '07 #5

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

"Lloyd Sheen" <a@b.cwrote in message
news:u8******** *****@TK2MSFTNG P04.phx.gbl...
>>
"Anil Gupte" <an*******@icin ema.comwrote in message
news:Oh******* *******@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]" <MS**@posseth.c omwrote in message
news:%2****** **********@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" <an*******@icin ema.comschreef in bericht
news:OW***** *********@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

Sep 5 '07 #6

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

Similar topics

56
6974
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 is 9.0 although it is coded 5.0 in this htm file. Let me know if it is able to be fixed. *** denotes where it is edited to locate the path where the videoclip is.
5
4108
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 media player transport control. I've tried embedding, but this is not suitable for multiple files. Ideally, I'd like visitors to have control over the playing of the songs with their media player embedded on the same page. I'm brainstorming here,...
6
7708
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> tag? * Do I have to convert the original to another format?
6
3009
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 interface is providing a convenient scripting toolkit for the application. One example is that a user can write a python script like: player = Player() game.loadPlayer(player) player.moveTo(location)
3
2924
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 of code that does this, but it's made for only one mp3 file. I don't know enough about javascript to customize the code myself. I know there probably needs to be an "array" of some sort, but I need some help figuring out where and how that works....
3
13672
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
11633
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. I want to be able to map controls of the media player to images on the page ie - when user clicks play image - song plays. I can currently get it working in IE but I can't get it to work in Firefox. Problems: 1. The buttons (image buttons)...
0
9647
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9492
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10360
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10108
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9960
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6744
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4064
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3668
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.