| | |
Adding media and videos using VBScript
Thread Solved
![]() |
Embedding the Windows Media Player
this is for IE ..only .. ther is another ways for if u r using another browser .. just PM me
There are two ways to play a streaming media file. The first one is through an external Media Player. If you haven't install it yet on your computer, this link will connect you immediately to the download area:
http://www.microsoft.com/windows/win...a/default.aspx
To invoke the external Media Player, just place a link to an asf or ASX file in your Web page. To see a live demo of a streaming media, try this story about a turtle. The minimum modem baud rate should be 28.8K. The video stream will look more like still pictures with lower-rate communication link.
The second method to play a streaming media is to embed the Media Player in the Web page. The way to do it is by embedding an ActiveX control. As the subject of ActiveX controls needs much more attention than we can give it here, we won't dive into it in this column (we will dedicate a column to it in the near future). For now, it is sufficient to view ActiveX controls as objects that we embed in Web pages. Each object type supports a set of properties, methods, and events that is relevant to its role on the page. It is not a coincident that the HTML tag that embeds ActiveX controls is the <OBJECT> tag. Here is how the Media Player ActiveX control looks like:
this is for IE ..only .. ther is another ways for if u r using another browser .. just PM me

There are two ways to play a streaming media file. The first one is through an external Media Player. If you haven't install it yet on your computer, this link will connect you immediately to the download area:
http://www.microsoft.com/windows/win...a/default.aspx
To invoke the external Media Player, just place a link to an asf or ASX file in your Web page. To see a live demo of a streaming media, try this story about a turtle. The minimum modem baud rate should be 28.8K. The video stream will look more like still pictures with lower-rate communication link.
The second method to play a streaming media is to embed the Media Player in the Web page. The way to do it is by embedding an ActiveX control. As the subject of ActiveX controls needs much more attention than we can give it here, we won't dive into it in this column (we will dedicate a column to it in the near future). For now, it is sufficient to view ActiveX controls as objects that we embed in Web pages. Each object type supports a set of properties, methods, and events that is relevant to its role on the page. It is not a coincident that the HTML tag that embeds ActiveX controls is the <OBJECT> tag. Here is how the Media Player ActiveX control looks like:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
<OBJECT ID="mediaPlayer" CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/ nsmp2inf.cab#Version=5,1,52,701" // (The above two lines should be joined as one line. // They have been split for formatting purposes.) STANDBY="Loading Microsoft Windows Media Player components..." TYPE="application/x-oleobject"> <PARAM NAME="fileName" VALUE="http://msdn.microsoft.com/ downloads/samples/Internet/imedia/netshow/smedia/NS3/JavaScript/ Buttons/control.asx"> // (The above three lines should be joined as one line. // They have been split for formatting purposes.) <PARAM NAME="animationatStart" VALUE="true"> <PARAM NAME="transparentatStart" VALUE="true"> <PARAM NAME="autoStart" VALUE="true"> <PARAM NAME="showControls" VALUE="true"> </OBJECT> Let's examine the components of this tag: Attribute Description ID :- Object ID. Can be assigned any string constant. CLASS ID: - Media Player ActiveX control registration number. Must be copied and pasted as is. CODEBASE: - URL of the decompression application. Must be copied and pasted as is. STANDBY:- A message to be displayed while loading the Media Player. TYPE:- ActiveX control type specification. Must be copied and pasted as is. The <OBJECT> tag is accompanied with several parameter specifications: NAME Type Description fileName:- String URL of the ASF or ASX file. Can reside on an HTTP server (http://), MultiMedia Server (mms://), local hard drive (u:), or on a network drive (p://). animationAtStart:- Boolean Specifies whether to activate the Microsoft animation show while the ASF or ASX file buffers. Default is true; ignored if transparentAtStart is true. autoStart :- Boolean Specifies whether to start the ASF file when the page loads. showControls:- Integer Specifies whether to show the player's control buttons. A value of true shows the controls, while a value of false means no controls. clickToPlay :- Boolean Specifies whether to start the ASF when the user clicks on the player's display area. transparentAtStart:- Boolean Specifies whether to make the player transparent at the start of the play. Default is false. Takes precedence over animationAtStart.
Real Eyes Realize Real Lies
My Resume
My Resume
•
•
Join Date: May 2005
Posts: 2
Reputation:
Solved Threads: 0
hiii meabed
saw your post n thought u may help me..
i ve embedded a Windows Media Player component in the ASP.NET Web Application interface.. but dunno how to play a media(audio/video) file in it...
i m using VB.NET as the frontend and oracle9i as the backend...on Windows 2000 Advanced Server..
saw your post n thought u may help me...
i ve tried giving a URL path to a Hyperlink, when this Hyperlink is clicked, another Windows Media Player pops up and plays that media file... but i want the embedded media player(on the interface) to play the file..
how to do this.. ??
and also how to go for dynamic URL path for the media files.. like when a user clicks on any file, its URL shud be invoked n played in the Embedded Windows Media Player(on interface)...
can you help me ???
badly need the help
saw your post n thought u may help me..
i ve embedded a Windows Media Player component in the ASP.NET Web Application interface.. but dunno how to play a media(audio/video) file in it...
i m using VB.NET as the frontend and oracle9i as the backend...on Windows 2000 Advanced Server..
saw your post n thought u may help me...
i ve tried giving a URL path to a Hyperlink, when this Hyperlink is clicked, another Windows Media Player pops up and plays that media file... but i want the embedded media player(on the interface) to play the file..
how to do this.. ??
and also how to go for dynamic URL path for the media files.. like when a user clicks on any file, its URL shud be invoked n played in the Embedded Windows Media Player(on interface)...
can you help me ???
badly need the help
![]() |
Similar Threads
- Firefox won't play videos. Anyone know why? (Windows NT / 2000 / XP)
- News Story: Tracking Santa with Google Maps and Google Earth (Upcoming News Stories)
- How to play videos using windows media player in asp.net2.0 webpage using c# (ASP.NET)
- Advertising Programs for Media Site (Advertising Sales Strategies)
- Windows Media PLayer will not play sounds or plays videos with no sound (Windows NT / 2000 / XP)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Wait/Pause Application before next process.
- Next Thread: Printer Object Question
| Thread Tools | Search this Thread |
* 6 2007 access activex add age basic beginner birth bmp calculator cd cells.find click client code college connection connectionproblemusingvb6usingoledb creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit excel excelmacro file filename form header iamthwee image inboxinvb internetfiledownload listbox listview liveperson login looping microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading remotesqlserverdatabase report save search sendbyte sites sql sql2008 sqlserver subroutine tags time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web windows




thank you 
