| | |
[Help Please] Embeeding and Control Windows Media Player with HTML/JavaScript
![]() |
•
•
Join Date: Nov 2009
Posts: 3
Reputation:
Solved Threads: 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
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
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 ....
but I can not run the script through a different page.
The following script that I made:
file : player.html
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<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
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<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 ....
0
#2 Nov 29th, 2009
You need a mechanism for putting control.html to player.html back together. There are several approaches:
(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
- Server-side script : Recompose the page server-side - eg. PHP or SeverSide Includes (SSI).
- AJAX : Serve a page containing one component with JavaScript/ AJAX to fetch the other component and insert it dynamically into the DOM.
- Inline frame : Serve a page containing one component with an inline frame containing the other component.
(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
Last edited by Airshow; Nov 29th, 2009 at 1:10 pm.
50% of the solution lies in accurately describing the problem!
•
•
Join Date: Nov 2009
Posts: 3
Reputation:
Solved Threads: 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
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
#4 Nov 30th, 2009
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
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
Last edited by Airshow; Nov 30th, 2009 at 6:49 pm.
50% of the solution lies in accurately describing the problem!
![]() |
Similar Threads
- unable to drag and drop windows media player control from the visual studio toolbox (ASP.NET)
- Code Snippet: Emded Windows Media Player (HTML and CSS)
- Windows Media player starts automatically when windows starts (Windows NT / 2000 / XP)
- Problems with Windows Media Player 10 (Viruses, Spyware and other Nasties)
- Windows Media Player not playing movie clips Error ID = 0xC00D11D1 (Windows NT / 2000 / XP)
- Help windows media player (Windows NT / 2000 / XP)
- Windows media player, internal error has occur... (Viruses, Spyware and other Nasties)
- Windows Media Player bitten by virus (Windows 95 / 98 / Me)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: jquery select box - assign value
- Next Thread: creating a form page help plz. see attachment
Views: 845 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for JavaScript / DHTML / AJAX
ajax ajaxexample ajaxjspservlets alert array auto autoplay blackjack box boxes browser bug calling captchaformproblem child close content css date debugger dependent detect developer dialog disablefirebug div dom element embed engine events explorer ext file flash form forms game gears getselection google gxt hiddenvalue highlightedword hint html ie7 ie8 iframe internet java javascript javascripthelp2020 jquery jsp jump libcurl lists maps margin math media mysql objects onclick onerror onmouseoutdivproblem onreadystatechange paypal pdf php player position post programming rated refresh safari scriptlets scroll search security select size software solutions star stretch synchronous table tweet unicode variables video web webkit webservice window xhtml \n





