Created
February 15, 2012 15:14
-
-
Save ChrisMoney/2a6e6c3e84bc0ded002c to your computer and use it in GitHub Desktop.
Javascript --Real Player
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <script type = 'text/javascript'> | |
| var fileName = ""; | |
| function Play() | |
| { | |
| document.video.Setsource("file:///" + fileName); | |
| document.video.DoPlay(); | |
| } | |
| function Stop() | |
| { | |
| document.video.DoStop()'' | |
| } | |
| function window_onload() | |
| { | |
| var plugInInstalled = false; | |
| if (navigator.appName.indexOf("Microsoft") == -1) | |
| { | |
| var plugInCounter; | |
| for (plugInCounter = 0; plugInCounter < navigator.plugins.length; plugInCounter++) | |
| { | |
| if (naviag.plugins[plugInCounter].name.indexOf("RealPlayer") >= 0) | |
| { | |
| plugInInstalled = true; | |
| break; | |
| } | |
| } | |
| } | |
| else | |
| { | |
| if (readyState == 4) | |
| { | |
| plugInInstalled = true; | |
| } | |
| } | |
| if (plugInInstalled == false) | |
| { | |
| window.location.replace("NoRealPlayerPage.htm")" | |
| } | |
| } | |
| function backgroundCheck() | |
| var BgColor = BgColor | |
| if (document.myControl.BgColor == null) | |
| { | |
| alert("This is an old version"); | |
| } | |
| </script> | |
| </head> | |
| <body> | |
| <noembed> | |
| <OBJECT id="video" width="320" height="240" | |
| style="position:absolute; left:0;top:0;" | |
| CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" | |
| type="application/x-oleobject"> | |
| <PARAM NAME="URL" VALUE="your file or url"> | |
| <PARAM NAME="SendPlayStateChangeEvents" VALUE="True"> | |
| <PARAM NAME="AutoStart" VALUE="True"> | |
| <PARAM name="uiMode" value="none"> | |
| <PARAM name="PlayCount" value="9999"> | |
| <embed name = "recall" | |
| id = "recall" | |
| border = "0" | |
| controls = "play" | |
| height = 0 | |
| width = 0 | |
| type = "audio/x-pn-realaudio-plugin"> | |
| <!--IE ignores the <embed> element--> | |
| <!--Firefox ignores the <object element--> | |
| </object> | |
| <form id = videoControls name = videoControls> | |
| <input type = "button" value = "Play sound" id = "butPlay" name = "butPlay" | |
| onclick = "return butPlay_onclick()"> | |
| <input type = "button" value = "Stop Sound" id = "butStop" name = "butStop" | |
| onclick = "return butStop_onclick()"> | |
| <input type = "file" id = "file" name = "file" | |
| onblur = "return file1_onblur()"> | |
| </form> | |
| <!--Tells browsers without ActiveX that their browser doesn't support Plugins--> | |
| <h2>this page requires a browser supporting Plug-ins or ActiveX controls</h2> | |
| </noembed> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment