954,535 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Adding media and videos using VBScript

whats goin guys? I wanted to know how you would add in videos or music into your website using VBScript. If anyone can help me out I'tll be great :) thank you

kittystitches
Newbie Poster
8 posts since Jul 2004
Reputation Points: 10
Solved Threads: 0
 

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/windowsmedia/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 tag. Here is how the Media Player ActiveX control looks like:

<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.
meabed
Junior Poster
Team Colleague
139 posts since May 2004
Reputation Points: 55
Solved Threads: 3
 

thank you VERY much! I think I'm going to go with the first way of doing a media file. I dont acutally want it embeded in my web page. Thank you VERY VERY much! :) If I have anymore questions I will ask you!

kittystitches
Newbie Poster
8 posts since Jul 2004
Reputation Points: 10
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

vishalmishra2k
Newbie Poster
2 posts since May 2005
Reputation Points: 10
Solved Threads: 0
 



CTRL-SIEM

Bem-vindo %USER%


media90cj
Newbie Poster
1 post since Jan 2011
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You