|
You want to be able to play WMV/WMA files...
For FireFox try these plug-ins For Mac OSX you will need the Flip4Mac plugin for QuickTime.
To play Windows Media (wmv/wma) files in Linux, try the MPlayer and mplayerplug-in. Just download and compile MPlayer first, then install mplayerplug-in. Firefox 3 should work also.
Use the following Javascript code in your website to stream your cams online. It has been tested with several browsers on Windows, Mac OSX, and Ubuntu. Be sure to change the commented lines to match your cam stream id:
<HTML> <HEAD><TITLE>uViewit Live 2 Cams</TITLE> <SCRIPT language="JavaScript"> <!-- function embPlayer(sID,init) { if (navigator.userAgent.toLowerCase().indexOf("windows") != -1) visitorOS="Windows"; else if (navigator.userAgent.toLowerCase().indexOf("linux") != -1) visitorOS="Linux"; else if (navigator.userAgent.toLowerCase().indexOf("mac") != -1) visitorOS="Mac";
var objTypeTag = "application/x-mplayer2"; var objStream = "http://ms1.uviewit.com:88/msft.asp?pp=" + sID; if (visitorOS=="Mac" || visitorOS=="Linux") { objStream = "http://ms1.uviewit.com/" + sID; // var link = document.referrer; if (link.search(location.href) != -1) ; else var mycook = document.cookie; if (init==1) { if (navigator.cookieEnabled && mycook.search("macasp=1")==-1) { document.cookie = "macasp=1"; window.location = "http://ms1.uviewit.com:88/mac.asp?pp=" + sID; } else document.cookie="macasp=1;expires=Thu, 01-Jan-1970 00:00:01 GMT;"; } if (visitorOS=="Mac") { objTypeTag = "video/x-ms-asf"; if (!detectQuickTime()) document.write("Please install QuickTime.<br>"); if (!detectF4M()) document.write("Please install the <a href='http://www.microsoft.com/windows/windowsmedia/player/wmcomponents.mspx'>Flip4Mac plugin</a> for QuickTime, then reboot.<br>"); } } document.writeln("<EMBED src='" + objStream + "' type='" + objTypeTag + "' autoplay='true' autostart='1' width=360 height=280 volume='-9' controller='1' PlayCount='7'></EMBED>"); document.close(); // Finalize document } function detectQuickTime() { return (detectPlugin('QuickTime')); } function detectF4M() { return (detectPlugin('Flip4Mac')); } function detectPlugin() { var daPlugins = detectPlugin.arguments; var pluginFound = false; if (navigator.plugins && navigator.plugins.length > 0) { var pluginsArrayLength = navigator.plugins.length; for (pluginsArrayCounter=0; pluginsArrayCounter < pluginsArrayLength; pluginsArrayCounter++ ) { var numFound = 0; for(namesCounter=0; namesCounter < daPlugins.length; namesCounter++) { if( (navigator.plugins[pluginsArrayCounter].name.indexOf(daPlugins[namesCounter]) >= 0) || (navigator.plugins[pluginsArrayCounter].description.indexOf(daPlugins[namesCounter]) >= 0) ) { numFound++; } } if (numFound == daPlugins.length) { pluginFound = true; break; } } } return pluginFound; } // detectPlugin // --> </SCRIPT> </HEAD> <BODY> <BR> <table> <tr> <td> <SCRIPT language="JavaScript"> embPlayer("m71kiueh", 1); </SCRIPT> <NOSCRIPT><EMBED src="http://ms1.uviewit.com:88/msft.asp?pp=m71kiueh" type="application/x-mplayer2" width=320 height=280 volume="-9" PlayCount="2" controller="1"></EMBED></NOSCRIPT> </td> <td> <SCRIPT language="JavaScript"> embPlayer("1gseffsw", 0); </SCRIPT> <NOSCRIPT><EMBED src="http://ms1.uviewit.com:88/msft.asp?pp=1gseffsw" type="application/x-mplayer2" width=320 height=280 volume="-9" PlayCount="2" controller="1"></EMBED></NOSCRIPT> </td> </tr> </table> <br> </BODY> </HTML>
|
Add to Favourites
Print this Article
|