RSS Forums RSS
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 2490 | Replies: 3 | Thread Tools  Display Modes
Reply
Join Date: Dec 2007
Posts: 17
Reputation: rouse is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
rouse rouse is offline Offline
Newbie Poster

Pop Up Media Player

  #1  
Jan 30th, 2008
I need to be able to launch the default medial player to a pop-up window. As anyone done this before and can point me to a method to do this.
Thanks!
WBR
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2007
Posts: 17
Reputation: rouse is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
rouse rouse is offline Offline
Newbie Poster

Solution Re: Pop Up Media Player

  #2  
Jan 30th, 2008
This problem was solved.
Reply With Quote  
Join Date: Jun 2004
Location: Hemet, CA
Posts: 429
Reputation: FC Jamison is on a distinguished road 
Rep Power: 5
Solved Threads: 19
Colleague
FC Jamison's Avatar
FC Jamison FC Jamison is offline Offline
Posting Pro in Training

Re: Pop Up Media Player

  #3  
Feb 1st, 2008
Can you share the solution for other people to see?
Reply With Quote  
Join Date: Dec 2007
Posts: 17
Reputation: rouse is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
rouse rouse is offline Offline
Newbie Poster

Re: Pop Up Media Player

  #4  
Feb 1st, 2008
This is the solution I put together. A link from my menu that calls a JavaScript file to build the popup window, and then a call from the script to load the HTML. (I made a quick attempt to edit out irrelevant portions of the HTML file)

The link:
<a onclick="javascript:showMedia();return false" />Paint Removal Demo</a>

The JS file:
unction showMedia(){
var width = 600;
var height = 400;
var left = (screen.width - width)/2;
var top = (screen.height - height)/2;
var params = 'width='+width+', height='+height;
params += ', top='+top+', left='+left;
params += ', directories=no';
params += ', location=no';
params += ', menubar=no';
params += ', resizable=no';
params += ', scrollbars=no';
params += ', status=no';
params += ', toolbar=no';
newwin=window.open('external/paintRemovalDemo.html','media01', params);
if (window.focus){
newwin.focus();
}
return false;

The HTML file:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Paint Removal Demo</title>
</head>
<script type="text/javascript" src="JavaScript/media.js"></script>
<body>

<CENTER>
<div id="video">
<OBJECT ID="MediaPlayer2" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
width="400" height="320">
<PARAM NAME="URL" VALUE="../video/PaintRemoval.wmv">
<PARAM NAME="ClickToPlay" VALUE="TRUE">
<PARAM NAME="AutoStart" VALUE="FALSE">
<PARAM NAME="ShowControls" VALUE="TRUE">
<PARAM NAME="ShowDisplay" VALUE="FALSE">
<PARAM NAME="ShowStatusBar" VALUE="FALSE">
<embed TYPE="application/x-mplayer2" pluginspage="http://www.microsoft.com/windows/windowsmedia/download/"
filename="../video/PaintRemoval.wmv" SRC="../video/PaintRemoval.wmv" Name=MediaPlayer2
ClickToPlay=1 AutoStart=0 ShowControls=1 ShowDisplay=0 ShowStatusBar=0
controls="PlayButton" width=400 height=320>
</embed>
</OBJECT>
</div>
</CENTER>

<CENTER>
<FORM><INPUT type="button" value="Close Window"
onClick="window.close()"></FORM>
</CENTER>
</body>
</html>

Hope this helps someone.
WBR
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Similar Threads
Other Threads in the HTML and CSS Forum
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 7:33 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC