Embedding WMP (Windows Media Player) means that you have to attach an external component in your page so that you can play the audio and video files in your JSP page by giving the source path.
Embedding WMP (Windows Media Player) means that you have to attach an external component in your page so that you can play the audio and video files in your JSP page by giving the source path.Implementing JSP and embedding Windows Media Player(wmp)
Example code for implementing JSP and also embedding wmp in JSP page
Embedding WMP (Windows Media Player) means that you have to attach an external component in your page so that you can play the audio and video files in your JSP page by giving the source path. This will make your JSP page interactive.
Before starting, you have to download Windows Media Player. You can download WMP by the following URL http://www.microsoft.com/windows/windowsmedia/player/download
This example will illustrate you how you can embed Windows Media Player in a
JSP page. To embed windows media player in your JSP page Object class ID is
required and for Windows Media Player 7, 9, 10 and 11, it is CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6.
For embedding this into the "Object" tag we have to insert
following lines into our code:
<embed width="356" height="300"></embed> |
Some parameters for media player are as follows:
Full code for "wmp.jsp" is given as below:
<%@ page language="java" import="java.io.*" %> <html> <head> <title>Embedding Windows Media Player in JSP</title> </head> <body> <OBJECT id="VIDEO" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-oleobject" width="320" height="240"> <PARAM NAME="URL" VALUE="supman.mpg"> <PARAM NAME="enabled" VALUE="True"> <PARAM NAME="AutoStart" VALUE="False"> <PARAM name="PlayCount" VALUE="3"> <PARAM name="Volume" VALUE="50"> <PARAM NAME="balance" VALUE="0"> <PARAM NAME="Rate" VALUE="1.0"> <PARAM NAME="Mute" VALUE="False"> <PARAM NAME="fullScreen" VALUE="False"> <PARAM name="uiMode" VALUE="full"> </OBJECT> </body> </html> |
To run this example you have to follow these steps:
Output:
By clicking on Play, media file will open
Ads