diff options
Diffstat (limited to 'docs/dymaxion/soundmanagerv297a-20101010/troubleshoot')
| -rwxr-xr-x | docs/dymaxion/soundmanagerv297a-20101010/troubleshoot/debug.css | 120 | ||||
| -rwxr-xr-x | docs/dymaxion/soundmanagerv297a-20101010/troubleshoot/debug.js | 173 | ||||
| -rwxr-xr-x | docs/dymaxion/soundmanagerv297a-20101010/troubleshoot/fpgss-add-location.png | bin | 0 -> 25513 bytes | |||
| -rwxr-xr-x | docs/dymaxion/soundmanagerv297a-20101010/troubleshoot/fpgss-added-location.png | bin | 0 -> 24125 bytes | |||
| -rwxr-xr-x | docs/dymaxion/soundmanagerv297a-20101010/troubleshoot/index.html | 154 |
5 files changed, 447 insertions, 0 deletions
diff --git a/docs/dymaxion/soundmanagerv297a-20101010/troubleshoot/debug.css b/docs/dymaxion/soundmanagerv297a-20101010/troubleshoot/debug.css new file mode 100755 index 0000000..2b0b8ae --- /dev/null +++ b/docs/dymaxion/soundmanagerv297a-20101010/troubleshoot/debug.css @@ -0,0 +1,120 @@ +/* SM2 troubleshooting CSS */
+
+#sm2-test {
+ position:relative;
+ background:#f6f6f6;
+ border:1px solid #eee;
+ padding:3px;
+}
+
+#sm2-test,
+#sm2-test ul.items {
+ -moz-border-radius:3px;
+ -khtml-border-radius:3px;
+ -webkit-border-radius:3px;
+}
+
+#sm2-test ul.items {
+ position:relative;
+ background:#fff;
+ list-style-type:none;
+ margin:0px;
+ padding:0px;
+ border:1px solid #ccc;
+}
+
+#sm2-test ul.items li {
+ position:relative;
+ margin-left:0.5em;
+ padding-left:0.5em;
+ margin-right:0.5em;
+ padding-right:0.5em;
+}
+
+#sm2-test ul.items li h3 {
+ padding-top:0.3em;
+ margin-top:0px;
+ border-bottom:1px solid #ccc;
+}
+
+#sm2-test ul.items li:last-child h3 {
+ border-bottom:none;
+}
+
+#sm2-test ul.items li div.details {
+ border-bottom:1px solid #ccc;
+}
+
+#sm2-test ul.items li:hover div.details {
+ border-bottom:1px solid #ccc;
+}
+
+#sm2-test ul.items li.open:last-child h3,
+#sm2-test ul.items li.fail:last-child h3,
+#sm2-test ul.items li:last-child div.details:last-child {
+ border-bottom:1px solid #fff;
+}
+
+#sm2-test ul.items li div.details {
+ display:none;
+}
+
+#sm2-test ul.items li.open div.details,
+#sm2-test ul.items li.unknown div.details,
+#sm2-test ul.items li.fail div.details {
+ display:block;
+}
+
+#sm2-test ul.items li span.yay,
+#sm2-test ul.items li span.boo,
+#sm2-test ul.items li span.default,
+#sm2-test ul.items li span.unknown {
+ display:none;
+}
+
+#sm2-test ul.items li span.yay,
+#sm2-test ul.items li.pass span.msg {
+ color:green;
+}
+
+#sm2-test ul.items li span.boo,
+#sm2-test ul.items li.fail span.msg {
+ color:red;
+}
+
+#sm2-test ul.items li span.default,
+#sm2-test ul.items li.default span.msg {
+ color:#ccc;
+}
+
+#sm2-test ul.items li span.unknown,
+#sm2-test ul.items li.unknown span.msg {
+ color:#666;
+}
+
+#sm2-test ul.items li.default span.msg {
+ display:none; /* hide messages in the event a reset occurs */
+}
+
+#sm2-test ul.items li.pass span.yay,
+#sm2-test ul.items li.fail span.boo,
+#sm2-test ul.items li.default span.default,
+#sm2-test ul.items li.unknown span.unknown {
+ float:right;
+ display:inline;
+}
+
+#sm2-container.flash_debug {
+ /* flash movie, when soundManager.debugFlash = true */
+ position:relative;
+ width:auto;
+ height:300px;
+ width:100%;
+ background:#f6f6f6;
+ border:1px solid #ccc;
+}
+
+#sm2-container.flash_debug object,
+#sm2-container.flash_debug embed {
+ border:1px solid #fff;
+}
\ No newline at end of file diff --git a/docs/dymaxion/soundmanagerv297a-20101010/troubleshoot/debug.js b/docs/dymaxion/soundmanagerv297a-20101010/troubleshoot/debug.js new file mode 100755 index 0000000..052955a --- /dev/null +++ b/docs/dymaxion/soundmanagerv297a-20101010/troubleshoot/debug.js @@ -0,0 +1,173 @@ +// SoundManager 2 start-up troubleshooting tool
+
+// FlashDetect, by Carl Yestrau
+// http://www.featureblend.com/license.txt
+var FlashDetect=new function(){var self=this;self.installed=false;self.raw="";self.major=-1;self.minor=-1;self.revision=-1;self.revisionStr="";var activeXDetectRules=[{"name":"ShockwaveFlash.ShockwaveFlash.7","version":function(obj){return getActiveXVersion(obj);}},{"name":"ShockwaveFlash.ShockwaveFlash.6","version":function(obj){var version="6,0,21";try{obj.AllowScriptAccess="always";version=getActiveXVersion(obj);}catch(err){}
+return version;}},{"name":"ShockwaveFlash.ShockwaveFlash","version":function(obj){return getActiveXVersion(obj);}}];var getActiveXVersion=function(activeXObj){var version=-1;try{version=activeXObj.GetVariable("$version");}catch(err){}
+return version;};var getActiveXObject=function(name){var obj=-1;try{obj=new ActiveXObject(name);}catch(err){}
+return obj;};var parseActiveXVersion=function(str){var versionArray=str.split(",");return{"raw":str,"major":parseInt(versionArray[0].split(" ")[1],10),"minor":parseInt(versionArray[1],10),"revision":parseInt(versionArray[2],10),"revisionStr":versionArray[2]};};var parseStandardVersion=function(str){var descParts=str.split(/ +/);var majorMinor=descParts[2].split(/\./);var revisionStr=descParts[3];return{"raw":str,"major":parseInt(majorMinor[0],10),"minor":parseInt(majorMinor[1],10),"revisionStr":revisionStr,"revision":parseRevisionStrToInt(revisionStr)};};var parseRevisionStrToInt=function(str){return parseInt(str.replace(/[a-zA-Z]/g,""),10)||self.revision;};self.majorAtLeast=function(version){return self.major>=version;};self.FlashDetect=function(){if(navigator.plugins&&navigator.plugins.length>0){var type='application/x-shockwave-flash';var mimeTypes=navigator.mimeTypes;if(mimeTypes&&mimeTypes[type]&&mimeTypes[type].enabledPlugin&&mimeTypes[type].enabledPlugin.description){var version=mimeTypes[type].enabledPlugin.description;var versionObj=parseStandardVersion(version);self.raw=versionObj.raw;self.major=versionObj.major;self.minor=versionObj.minor;self.revisionStr=versionObj.revisionStr;self.revision=versionObj.revision;self.installed=true;}}else if(navigator.appVersion.indexOf("Mac")==-1&&window.execScript){var version=-1;for(var i=0;i<activeXDetectRules.length&&version==-1;i++){var obj=getActiveXObject(activeXDetectRules[i].name);if(typeof obj=="object"){self.installed=true;version=activeXDetectRules[i].version(obj);if(version!=-1){var versionObj=parseActiveXVersion(version);self.raw=versionObj.raw;self.major=versionObj.major;self.minor=versionObj.minor;self.revision=versionObj.revision;self.revisionStr=versionObj.revisionStr;}}}}}();};FlashDetect.release="1.0.3";
+
+// flash version URL switch (for this demo page)
+var winLoc = window.location.toString();
+if (winLoc.match(/flash9/i)) {
+ soundManager.flashVersion = 9;
+ if (winLoc.match(/highperformance/i)) {
+ soundManager.useHighPerformance = true;
+ soundManager.useFastPolling = true;
+ }
+} else if (winLoc.match(/flash8/i)) {
+ soundManager.flashVersion = 8;
+}
+
+var sm2Debugger = null;
+
+function SM2Debugger() {
+
+ var elementIDs = ['flashtojs','jstoflash','onload','soundtest','swf','hasflash'];
+ var elements = {};
+ var self = this;
+
+ this.getXHR = function() {
+ var xhr = null;
+ if (typeof window.XMLHttpRequest != 'undefined') {
+ try {
+ xhr = new XMLHttpRequest();
+ } catch(e) {
+ // d'oh
+ }
+ }
+ if (!xhr) {
+ try {
+ xhr = new ActiveXObject('Msxml2.XMLHTTP');
+ } catch(e) {
+ try {
+ xhr = new ActiveXObject('Microsoft.XMLHTTP');
+ } catch(E) {
+ xhr = null;
+ }
+ }
+ }
+ return xhr;
+ }
+
+ this.testURL = function(sURL,fOnComplete) {
+ var xhr = self.getXHR();
+ var msg = '<a href="'+soundManager.url+'" title="This should be a valid .SWF URL, not a 404 etc.">'+soundManager.url+'</a>';
+ if (soundManager.getMoviePercent() == 100) {
+ // SWF may have already loaded
+ fOnComplete(true,msg);
+ } else {
+ try {
+ xhr.open("HEAD",sURL,true);
+ xhr.onreadystatechange = function() {
+ if (xhr.readyState == 4) {
+ if (xhr.status == '200') {
+ fOnComplete(true,msg);
+ } else if (xhr.status == '404') {
+ fOnComplete(false,msg);
+ } else {
+ // some other response
+ fOnComplete('unknown',(xhr.status != '0'?'HTTP response: '+xhr.status+', ':'')+msg); // safari returns 0 when offline
+ }
+ }
+ }
+ xhr.send(null);
+
+ } catch(e) {
+ // fail (cross-domain, or no XHR) unless offline
+ fOnComplete('unknown',msg);
+ return false;
+ }
+ }
+ }
+
+ this.handleEvent = function(sEventType,bSuccess,sMessage) {
+ var o = elements[sEventType];
+ if (o) {
+ o.className = (bSuccess == true?'pass':(bSuccess != false?bSuccess:'fail')); // true = pass, className as argument, or false == fail
+ if (sMessage) {
+ var oSpan = o.getElementsByTagName('span')[4];
+ if (oSpan) {
+ oSpan.innerHTML = (oSpan.innerHTML +' <span class="msg">'+sMessage+'</msg>');
+ } else {
+ o.title = sMessage;
+ }
+ }
+ // associated events
+ if (sEventType == 'onload') {
+ if (bSuccess) {
+ self.doSoundTest();
+ } else {
+ self.testURL(soundManager.url,function(bSuccess,sMessage) {
+ if (typeof sMessage == 'undefined') {
+ sMessage = null;
+ }
+ self.handleEvent('swf',bSuccess,sMessage);
+ });
+ }
+ } else if (sEventType == 'swf') {
+ if (bSuccess == false) {
+ // don't show flashtojs at all if SWF failed to load
+ self.handleEvent('flashtojs','default'); // reset to N/A status
+ }
+ } else if (sEventType == 'flashtojs') {
+ if (bSuccess != true) {
+ // online or offline help messages
+ if (soundManager._overHTTP) {
+ document.getElementById('d-flashtojs-offline').style.display = 'none';
+ } else {
+ document.getElementById('d-flashtojs-online').style.display = 'none';
+ }
+ }
+ }
+ } else {
+ soundManager._writeDebug('SM2 debugger warning: Undefined event type "'+sEventType+'"',1);
+ }
+ }
+
+ this.doSoundTest = function() {
+ var foo = soundManager.createSound({
+ id: 'sm2TestSound',
+ url: ('http://schillmania.com/projects/soundmanager2/demo/_mp3/mouseover.mp3')
+ });
+ if (!soundManager._disabled) {
+ foo.play();
+ // looks to be OK..
+ if (!soundManager._disabled) {
+ // still OK..
+ self.handleEvent('soundtest',true);
+ } else {
+ self.handleEvent('soundtest',false,': Failed after play()');
+ }
+ } else {
+ self.handleEvent('soundtest',false,': Failed after createSound()');
+ }
+ }
+
+ this.init = function() {
+ // map event elements to DOM nodes - eg. elements.flashtojs = document.getElementById('d-flashtojs');
+ for (var i=elementIDs.length; i--;) {
+ elements[elementIDs[i]] = document.getElementById('d-'+elementIDs[i]);
+ }
+ self.doFlashTest();
+ }
+
+ this.doFlashTest = function() {
+ var fd = FlashDetect;
+ var hasFlash = fd.installed;
+ var isSupported = (hasFlash && fd.major >= soundManager.flashVersion);
+ var flashVersion = fd.major+'.'+fd.minor+'.'+fd.revisionStr;
+ var flashInfo = ' version '+(!isSupported?'unsupported ('+flashVersion+', SWF version '+soundManager.flashVersion+')':flashVersion);
+ document.getElementById('d-flashversion').innerHTML = 'soundManager.flashVersion = '+soundManager.flashVersion+';';
+ self.handleEvent('hasflash',isSupported,hasFlash?flashInfo:null);
+ }
+
+ soundManager.debugFlash = true; // try to get flash debug output, as well
+
+ this.init();
+
+}
+
+function sm2DebugInit() {
+ sm2Debugger = new SM2Debugger();
+}
\ No newline at end of file diff --git a/docs/dymaxion/soundmanagerv297a-20101010/troubleshoot/fpgss-add-location.png b/docs/dymaxion/soundmanagerv297a-20101010/troubleshoot/fpgss-add-location.png Binary files differnew file mode 100755 index 0000000..61db61c --- /dev/null +++ b/docs/dymaxion/soundmanagerv297a-20101010/troubleshoot/fpgss-add-location.png diff --git a/docs/dymaxion/soundmanagerv297a-20101010/troubleshoot/fpgss-added-location.png b/docs/dymaxion/soundmanagerv297a-20101010/troubleshoot/fpgss-added-location.png Binary files differnew file mode 100755 index 0000000..6cf1c19 --- /dev/null +++ b/docs/dymaxion/soundmanagerv297a-20101010/troubleshoot/fpgss-added-location.png diff --git a/docs/dymaxion/soundmanagerv297a-20101010/troubleshoot/index.html b/docs/dymaxion/soundmanagerv297a-20101010/troubleshoot/index.html new file mode 100755 index 0000000..c371d1a --- /dev/null +++ b/docs/dymaxion/soundmanagerv297a-20101010/troubleshoot/index.html @@ -0,0 +1,154 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<title>SoundManager 2 Start-up Test / Troubleshooting Tool</title> +<meta name="robots" content="noindex" />
+<meta name="description" content="A standalone version of the SoundManager 2 Start-up Troubleshooting Tool." />
+<meta name="keywords" content="javascript sound, javascript audio, javascript play mp3, javascript sound control, javascript video, mp3, mp4, mpeg4" />
+<meta name="robots" content="all" />
+<meta name="author" content="Scott Schiller" />
+<meta name="copyright" content="Copyright (C) 1997 onwards Scott Schiller" />
+<meta name="language" content="en-us" />
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="stylesheet" type="text/css" media="screen" href="../demo/index.css" /> <!-- prettier fonts etc., optional -->
+<link rel="stylesheet" type="text/css" media="screen" href="debug.css" />
+<!-- soundManager.useFlashBlock: related CSS -->
+<link rel="stylesheet" type="text/css" href="../flashblock/flashblock.css" />
+<style type="text/css">
+#sm2-container {
+ position:relative;
+ width:auto;
+ height:auto;
+ max-height:200px;
+ margin-top:1em;
+ border:1px solid #999;
+ background:#eee;
+ padding:0.5em;
+}
+</style>
+<script type="text/javascript" src="../script/soundmanager2.js"></script>
+<script type="text/javascript">
+// optional
+soundManager.url = '../swf/';
+soundManager.onload = function() {}
+
+</script>
+
+<script type="text/javascript" src="debug.js"></script>
+</head>
+
+<body>
+
+<!-- the following markup, debug.css and debug.js are required. -->
+
+<div style="position:relative;width:500px;margin:1em">
+
+<p class="note">Flash options: <a href="#flash8" onclick="window.location.replace(this.href);window.location.reload()">Flash 8</a> (default), <a href="#flash9" onclick="window.location.replace(this.href);window.location.reload()">Flash 9</a> (normal) or <a href="#flash9-highperformance" onclick="window.location.replace(this.href);window.location.reload()">Flash 9 + highPerformance + fastPolling</a> modes.</p>
+
+<div id="sm2-test">
+ <ul class="items">
+
+ <li id="d-onload" class="default">
+ <h3><span class="yay">OK</span><span class="boo">FAIL</span><span class="default">N/A</span><span class="unknown">Unknown</span><span>SoundManager 2 start-up</span></h3>
+ <div id="sm2-startup" class="details">
+ <p>soundManager.onload() or soundManager.onerror() is ultimately called when start-up completes.</p>
+ <p>If you're seeing a failure, refer to the below for troubleshooting details for common causes.</p>
+ </div>
+ </li>
+
+ <li id="d-hasflash" class="default">
+ <h3><span class="yay">OK</span><span class="boo">Error</span><span class="default">N/A</span><span class="unknown">Unknown</span><span>Flash</span></h3>
+ <div class="details">
+ <p>The Flash 8 plugin is a minimal requirement for SoundManager 2, but the exact requirement varies based on soundManager.flashVersion. You are currently using <b id="d-flashversion">[unknown]</b>.</p>
+ </div>
+ </li>
+
+ <li id="d-swf" class="default">
+ <h3><span class="yay">OK</span><span class="boo">Error</span><span class="default">N/A</span><span class="unknown">Unknown</span><span>Flash SWF</span></h3>
+ <div class="details">
+ <p>SoundManager 2 must load a flash movie before initialisation can proceed. If you have errors here, check that soundManager.url is correctly defined and that the URL being loaded is correct.</p>
+ <p>If the Flash movie URL is OK, Flash security or flash blockers are the likely cause. Check the section below.</p>
+ </div>
+ </li>
+
+ <li id="d-flashtojs" class="default">
+ <h3><span class="yay">OK</span><span class="boo">Error</span><span class="default">N/A</span><span class="unknown">Unknown</span><span>Flash -> JS</span></h3>
+ <div class="details">
+ <p>Once the flash component of SM2 has loaded, it tries to make a call to Javascript-land. This is a common point of failure, for security reasons:</p>
+ <ul>
+ <li>
+ <p><b>Have a flash blocker?</b> Check that the <a href="#flashdebug">SM2 flash movie</a> (below) is loading and is not being blocked.</p>
+ </li>
+ <li>
+ Is your browser URL at file:// or c:/path/ or otherwise not using HTTP? Flash security "whitelisting" is required to allow Flash + JS to work when offline, placing it in the "LocalTrusted" Flash security sandbox rather than "localWithFile".
+
+ <div id="d-flashtojs-offline" style="padding-bottom:1em">
+ <h4>Offline viewing: Adding a "trusted location" to the Flash Security Settings Panel</h4>
+ <p>The Flash Player Global Security Settings Panel is a web-based control panel which allows you to configure Flash security. You will need to add the path of the SoundManager 2 project in order for it to work "offline" (ie., when viewing via file:// or c:/)</p>
+ <p id="ss"><a href="#screenshots" onclick="document.getElementById('ss-box').style.display = 'block';document.getElementById('ss').style.display='none';return false">Show me how</a>: Adding a "trusted location"</p>
+ <div id="ss-box" style="display:none">
+ <h4>Illustrated guide: Adding a "trusted location" in Flash</h4>
+ <p>Below: Adding a location, and selecting "Browse for folder" (or directory), to whitelist the SoundManager 2 project directory for offline viewing.</p>
+ <p><img src="../../troubleshoot/fpgss-add-location.png" alt="Adding a location: Browse for the file or directory to whitelist" style="width:100%;_width:auto;min-width:72px;max-width:396px" /></p>
+ <p><img src="../../troubleshoot/fpgss-added-location.png" alt="Whitelisted location has now been added, JS + Flash will work under this path" style="width:100%;_width:auto;min-width:72px;max-width:396px" /></p>
+ </div>
+ <p><a href="http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html" target="_blank" class="feature">Launch the Flash Security Settings Panel</a></p>
+ </div>
+
+ </li>
+ <li style="margin-top:0.5em">Flash blockers (FlashBlock, "click to flash" etc.) preventing flash load and start-up - need whitelisting/"allow this domain" to work smoothly. If you suspect blocking is the issue, try the <a href="../demo/flashblock/">SoundManager 2 Flashblock demo</a>.</li>
+ <li style="margin-top:0.5em">Online viewing (HTTP/S): Same-domain security rules apply to HTML + Flash content by default (crossdomain.xml/allowDomain() in .AS source required to override.)</li>
+ </ul>
+ <p>See <a href="#flashdebug" title="SoundManager 2 flash debug output">Flash debug output</a> for more security error details.</p>
+
+ <div id="d-flashtojs-online">
+ <h4>Online viewing: Cross-domain security restrictions</h4>
+ <p>HTML page on domain A loading .SWF from domain B: Flash security prevents JS + Flash when a cross-domain XML permission file is not available on domain B, and/or flash movie was not compiled with allowDomain('domainA') or allowDomain('*') - note that the SWF distributed with SM2 does not use this by default; try using the cross-domain version of the SWF, or compile your own which whitelists your own domain(s).</p>
+
+ <h4>Flash Blockers</h4>
+ <p>Browser extensions/add-ons like "FlashBlock" and "click to flash" can prevent the .SWF from loading, and this will mean SM2 will time-out and fail waiting for a response from Flash. For development, it's best to whitelist the domain(s) or the .SWF for SM2 to allow it to work.</p>
+ <p>Have a flash blocker installed? Want to test it? Try the <a href="../../demo/flashblock">SoundManager 2 Flashblock demo</a>.</p>
+
+ </div>
+
+ </div>
+ </li>
+
+ <li id="d-jstoflash" class="default">
+ <h3><span class="yay">OK</span><span class="boo">Error</span><span class="default">N/A</span><span class="unknown">Unknown</span><span>JS -> Flash</span></h3>
+ <div class="details">
+ <p>At this point, Javascript attempts to respond to Flash's initial outgoing Flash -> JS call, completing the test for JS/flash communication. If SM2 does not receive a response from flash, it will eventually fail.</p>
+ <p>Offline viewing conditions and cross-domain security rules will prevent Flash <-> JS communication. See the details of Flash -> JS for information.</p>
+ </div>
+ </li>
+
+ <li id="d-soundtest" class="default">
+ <h3><span class="yay">OK</span><span class="boo">Error</span><span class="default">N/A</span><span class="unknown">Unknown</span><span>Sound test</span></h3>
+ <div class="details">
+ <p>Here, a simple createSound() call is made to test SM2's actual operation. A sound should load and play provided SM2 was able to start successfully.</p>
+ </div>
+ </li>
+
+ </ul>
+</div>
+
+<div class="block" style="margin-top:1em">
+ <div id="soundmanager-debug" class="code">
+ <!-- live debug goes here -->
+ </div>
+</div>
+
+<div id="flashdebug">
+ <div id="sm2-container">
+ <!-- flash goes here -->
+ </div>
+</div>
+
+<script type="text/javascript">
+sm2DebugInit();
+</script>
+
+</div>
+</body>
+</html> |
