0

Hi, I'm doing embedding Windows Media Player with the HTML
but I can not run the script through a different page.
The following script that I made:

file : player.html

<html>
<OBJECT id="VIDEO" width="640" height="480" 
	style="position:relatif; left:0;top:0;"
	CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
	type="application/x-oleobject">
	
	<PARAM NAME="URL" VALUE="file_name.mpg">
	<PARAM NAME="SendPlayStateChangeEvents" VALUE="true">
	<PARAM NAME="AutoStart" VALUE="true">
	<PARAM name="uiMode" value="Full">
	<PARAM name="fullScreen" value="false">
	<PARAM name="balance" value="0">
	<PARAM name="volume" value="100">
	<PARAM name="stretchToFit" value="true">
	<PARAM name="PlayCount" value="1">
</OBJECT>

<br><br>

<input type=submit name=play1 value="New File" onClick=document.getElementById('VIDEO').URL="new_file.mpg";>
<input type=submit name=play2 value=Play onClick=document.getElementById('VIDEO').controls.play();>
<input type=submit name=play3 value=Pause onClick=document.getElementById('VIDEO').controls.Pause();>

</html>

above is the script for embbeding and scripts to perform the control in Windows Media Player, the script above work well on IE not on Mozzila Firefox (why??), then I save the file with the name player.html

The next script I tried to separate the Windows Media Player control into a different file, for example control.html

file : control.html

<html>

<input type=submit name=play1 value="New File" onClick=document.getElementById('VIDEO').URL="new_file.mpg";>
<input type=submit name=play2 value=Play onClick=document.getElementById('VIDEO').controls.play();>
<input type=submit name=play3 value=Pause onClick=document.getElementById('VIDEO').controls.Pause();>


</html>

but I can not control the files player.html, my question how do the control on different files (control.html to player.html )...???

for the help I thank you ....

2
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by Airshow
0

You need a mechanism for putting control.html to player.html back together. There are several approaches:

  1. Server-side script : Recompose the page server-side - eg. PHP or SeverSide Includes (SSI).
  2. AJAX : Serve a page containing one component with JavaScript/ AJAX to fetch the other component and insert it dynamically into the DOM.
  3. Inline frame : Serve a page containing one component with an inline frame containing the other component.

(1) is by far the easiest and the one I recommend if available to you.

(2) Not too difficult if you already know AJAX/DOM scripting. Otherwise it will take a little time to master a couple of things.

(3) A bit messy as the controls need to communicate into (or out of) an inline frame. I've done this sort of stuff in the past and it's not so bad once you've got your mind round what is effectively window-window addressing. However, I suggest this is the least attractive of the options.

Hope this helps.

Airshow

Edited by Airshow: n/a

0

Thank you for your advice.

I've tried with AJAX Updater, which is my goal to make a file in order to control the player.html files, but I can not take back the value of a variable.

if you please ... Can you give me a little bit example, I've been working for 2 months but did not work very well.

thanks before
Your help is my hope

0

I have just done some research and the web is full of people's problems with Windows Media Player in Firefox 3.

Firefox needs a plugin but it seems it doesn't always install very reliably.

I think that the plugin may be the main reason for your failure to get WMP woking in Firefox. I have just tried and can't get it to work here either.

Maybe try embedding QuickTim instead. I'm not sure how to do this but from what I've read it is more reliable - at least in Firefox.

Sorry I can't be more positive.

Airshow

Edited by Airshow: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.