diff options
| author | Jules Laplace <carbon@melanarchy.org> | 2013-08-02 17:19:21 -0500 |
|---|---|---|
| committer | Jules Laplace <carbon@melanarchy.org> | 2013-08-02 17:19:21 -0500 |
| commit | 753f60c7d4769fa72d3b910e491f37db6f130898 (patch) | |
| tree | ea7b7a2cc8775e2d9b8e3375f0da5188ca0298f4 /docs/dymaxion/soundmanagerv297a-20101010/doc | |
| parent | d5e6bf6609012e61f82d812d44bc1ff8104c97fb (diff) | |
dymaxion
Diffstat (limited to 'docs/dymaxion/soundmanagerv297a-20101010/doc')
5 files changed, 3801 insertions, 0 deletions
diff --git a/docs/dymaxion/soundmanagerv297a-20101010/doc/download/index.html b/docs/dymaxion/soundmanagerv297a-20101010/doc/download/index.html new file mode 100755 index 0000000..67a6b14 --- /dev/null +++ b/docs/dymaxion/soundmanagerv297a-20101010/doc/download/index.html @@ -0,0 +1,1041 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+<title>SoundManager 2: Download</title> +<meta name="robots" content="noindex" />
+<meta name="description" content="Get the latest version of SoundManager 2 (BSD licensed.)" />
+<meta name="keywords" content="download, javascript sound, javascript audio api" />
+<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" />
+<script type="text/javascript" src="../../script/soundmanager2.js"></script>
+<script type="text/javascript" src="../../demo/index.js"></script>
+<script type="text/javascript">
+ soundManager.handleFlashBlock = false;
+ soundManager.debugMode = false;
+ soundManager.url = '../../swf/';
+ soundManager.onload = function() {
+ }
+</script>
+</head>
+
+<body>
+
+<div id="content">
+
+ <div id="top">
+
+ <h1>SoundManager 2: Download</h1>
+
+ <div id="nav">
+ <ul>
+
+ <li>
+ <a href="../../">Home</a>
+ </li>
+
+ <li>
+ <a href="#">Demos</a>
+ <ul>
+ <li><a href="../../demo/api/">API Examples</a></li>
+ <li><a href="../../demo/play-mp3-links/" class="exclude">Playable MP3 links</a></li>
+ <li><a href="../../demo/mp3-player-button/" class="exclude">Basic MP3 Play Button</a></li>
+ <li><a href="../../demo/page-player/">Muxtape-style UI</a></li>
+ <li><a href="../../demo/360-player/">360° Player UI</a></li>
+ <li><a href="../../demo/mpc/">Drum Machine (MPC)</a></li>
+ <li><a href="../../demo/animation/">DOM/Animation Demos</a></li>
+ <li><a href="../../demo/flashblock/">FlashBlock Handling</a></li>
+ <li><a href="../../demo/template/">Basic Template</a></li>
+ </ul>
+ </li>
+
+ <li>
+ <a href="../getstarted/">Getting Started</a>
+ <ul>
+ <li><a href="../getstarted/#how-sm2-works">How SoundManager 2 works</a></li>
+ <li><a href="../getstarted/#basic-inclusion">Including SM2 on your site</a></li>
+ <li><a href="../getstarted/#troubleshooting">Troubleshooting</a></li>
+ </ul>
+ </li>
+
+ <li>
+ <a href="..">Documentation</a>
+ <ul>
+ <li><a href="../#sm-config">SoundManager Properties</a></li>
+ <li><a href="../#sound-object-properties">Sound Object Properties</a></li>
+ <li><a href="../#smdefaults">Global Sound Defaults</a></li>
+ <li><a href="../#api">SoundManager Core API</a></li>
+ <li><a href="../#smsoundmethods">Sound Object (SMSound) API</a></li>
+ </ul>
+ </li>
+
+ <li>
+ <strong><a href="#">Download</a></strong>
+ <ul>
+ <li><a href="#latest">Get SoundManager 2</a></li>
+ <li><a href="#revision-history">Revision History</a></li>
+ </ul>
+ </li>
+
+ <li>
+ <a href="../technotes/">Technical Notes</a>
+ <ul>
+ <li><a href="../technotes/#requirements">System Requirements</a></li>
+ <li><a href="../technotes/#debug-output">Debug + Console Output</a></li>
+ </ul>
+ </li>
+
+ <li>
+ <a href="../resources/">Resources</a>
+ <ul>
+ <li><a href="../resources/#licensing">Licensing</a></li>
+ <li><a href="../resources/#related">Related Projects</a></li>
+ <li><a href="http://getsatisfaction.com/schillmania/products/schillmania_soundmanager_2/">SM2 support / discussion</a></li>
+ <li><a href="http://www.schillmania.com/content/react/contact/">Contact Info @ Schillmania.com</a></li>
+ </ul>
+ </li>
+
+ </ul>
+ <div class="clear"></div>
+ </div>
+
+ </div>
+
+ <div id="main" class="triple">
+
+
+ <div id="filter-box" class="columnar">
+
+ <div class="c1">
+ <div id="reset-filter"></div>
+ </div>
+
+ <div class="c2">
+ <div id="search-results"><!-- search results for %s --></div>
+ </div>
+
+ </div>
+
+ <div id="newest" class="columnar">
+
+ <div class="c1">
+ <h2>Get SoundManager 2</h2>
+ <p>Get the latest and greatest.</p>
+ </div>
+
+ <div class="c2">
+ <h3>Download SoundManager 2</h3>
+ <p>Code cleanup (full debug codebase ~5% lighter), HTML5 audio tweaks, merged RTMP fork from GitHub, experimental video feature <i>removed</i>, optional crossdomain.xml feature. See <a href="#history">revision history</a> for details.</p>
+
+ <p style="padding-top:0.5em"><a href="../../download/soundmanagerv297a-20101010.zip" title="Download SoundManager 2" class="norewrite feature">Download SoundManager 2.97a.20101010</a></p>
+ <p style="padding-top:0.5em">Also on Github (dev branches, forks etc.): <a href="http://github.com/scottschiller/SoundManager2">http://github.com/scottschiller/SoundManager2</a></p>
+ <p><b>Performance tip:</b> SM2's code size varies from 90 KB (debug) down to 10 KB (optimized) over HTTP; check the <a href="../getstarted/#basic-inclusion" title="Including SoundManager 2 on your site: Script build options">pre-optimized builds</a> for details.</p>
+ </div>
+
+ </div>
+
+
+ <div id="history" class="columnar">
+
+ <div class="c1">
+ <h2>Revision History</h2>
+ <p>Latest changes and archived notes from bug fixes, API updates, feature development etc.</p>
+ </div>
+
+ <div class="c2">
+
+ <div class="f-block c-revision-history">
+
+ <h3 id="revision-history">Revision History</h3>
+
+ <p>A changelog of sorts.</p>
+
+ <ul id="revision-list" class="standard">
+
+ <li class="in">
+ <h3><b>V2.97a.20101010</b> - Code cleanup, HTML5 audio tweaks, merged RTMP fork, removal of experimental video, optional usePolicyFile crossdomain.xml feature</h3>
+ <p>Shuffling of SoundManager 2 core, approximately 5% shaved off full debug-enabled file size after bug fixes, additional comments, new features and so on. Internal event handling code cleaned up. .SWF builds optimized, Flash 9 non-debug version now under 10 KB. Debug version now flash debugger-enabled. Merged GitHub user kjvarga's RTMP fork including improvements for Red5 + Flash Media Server streaming cases - buffering, event and state handling. Experimental video feature is toast, createVideo() no longer implemented. iPhone + iPad touch events on page player + 360° player UI demos; tap and drag to seek, etc.</p>
+
+ <ul class="double">
+
+ <li class="in">
+ <p class="compact">Bug fixes</p>
+ <ul class="nested compact flat">
+ <li>No HTML5 audio for *any* Safari on OS X Snow Leopard 10.6.[3|4] due to underlying bugs causing intermittent audio playback failure; ongoing Apple issue, on their radar. (See <a href="http://github.com/scottschiller/SoundManager2/commit/707697685408ef4aafd23811eeaa61a2d2ec120a">related GitHub commit</a>)</li>
+ <li>Don't <code>unload()</code> at <code>onfinish()</code> for HTML5 audio (was originally done to be conservative, but results in additional HTTP requests despite caching expectations?)</li>
+ <li><code>onload()</code> for HTML5 now using proper boolean values</li>
+ <li>Fix NetStream-specific <code>autoLoad</code>/<code>autoPlay</code>/<code>volume</code> <code>createSound()</code> call, specific null flash sound object error scenario. (Related <a href="http://github.com/scottschiller/SoundManager2/commit/0867fd641e83fda4e99665567a62f3398651fac4">changes on GitHub</a>.)</li>
+ <li>Fix for "<code>onbufferchange(1)</code> followed immediately by <code>onbufferchange(0)</code>" case when audio was actually still buffering.</li>
+ <li>Removed <code>setPosition()</code> within <code>unload()</code>, cleaner exit when destroying a sound</li>
+ </ul>
+ </li>
+
+ <li class="in">
+ <p class="compact">Merged: RTMP Fork</p>
+ <ul class="nested compact flat">
+ <li>Merged GitHub user kjvarga's <a href="http://github.com/kjvarga/SoundManager2/">RTMP fork of SoundManager 2</a>, including buffering, event and state handling fixes and improvements. For more RTMP documentation/features, see the readme on GitHub, or <a href="../../README.rdoc" class="norewrite">view locally</a>.</li>
+ </ul>
+ </li>
+
+ <li class="in">
+ <p class="compact">API Updates</p>
+ <ul class="nested compact flat">
+ <li><b>Removed</b> experimental video feature (originally added late 2008, never developed further.) <code>createVideo()</code>, <code>allowFullScreen</code> and related video methods are now gone. Other dedicated HTML5/flash video player projects have since solved this problem.</li>
+ <li>New SMSound option: <a href="../#smsound-usepolicyfile" title="SoundManager sound option: usePolicyFile">usePolicyFile</a> - (boolean, default: <code>false</code>) - enables Flash to request /crossdomain.xml file for content on third-party domains, if access to ID3/metadata such as wave/peak/spectrum is needed. Will automagically enable if <code>onid3()</code> or peak/wave/spectrum features are being used.</li>
+ <li><code>console.warn()</code>-style messaging (instead of throwing exceptions) if <code>createSound()</code> etc. are called before SM2 init has fired. Now calls similar warning and exits if called after a failed, unsuccessful startup (ie., timeout or not-supported case.)</li>
+ </ul>
+ </li>
+
+ <li class="in">
+ <p class="compact">Miscellaneous</p>
+ <ul class="nested compact flat">
+ <li>SoundManager 2 core code cleanup, ~5% shaved off soundmanager2.js code size after new features, bug fixes and comments etc. Internal event handling (DOM-related events for init, IE 6 vs. everybody else) improved.</li>
+ <li>Flash builds optimized; Flash 9 SWF build now under 10 KB. Debug-enabled Flash 9 SWF now hooks into Flash debug player/IDE debugging tools (compiled with <code>-debug=true</code>)</li>
+ <li>Attempt to detect RTL documents, position Flash accordingly if so to avoid long horizontal scrollbar issue (<a href="http://getsatisfaction.com/schillmania/topics/rtl_window_scroll_bar_issues_with_container_position" rel="nofollow">related discussion</a>)</li>
+ <li>iPhone + iPad <code>touchmove()</code> and related events added to page player + 360° player UI demos; tap and drag to seek should now work.</li>
+ </ul>
+ </li>
+
+ </ul>
+
+ </li>
+
+
+ <li class="in">
+ <h3><b>V2.96a.20100822</b> - HTML5 audio support no longer alpha, Safari 5.0.1/SL HTML5 audio issues continue, iPad/iPhone "play through", Flash tweak for Android (<a href="../../download/soundmanagerv296a-20100822.zip">Download archived version</a>)</h3>
+ <p><code>useHTML5Audio</code> feature now considered beta-worthy, though disabled by default to be safe (with the exception of iPhone + iPad.) iPhone/iPad will now play a sequence of sounds, user interaction only required to start first one. Flash on-screen positioning tweak for Android devices that run Flash. Safari 5.0.1 on Snow Leopard exhibits same buggy HTML5 audio issue, disabled by default; Apple have been notified. IE 9 "Platform Preview 4" has <code><audio></code> but no <code>Audio()</code> support (yet?) See <a href="https://connect.microsoft.com/IE/feedback/details/586311/audio-but-no-audio-support">bug #586311</a> (may require connect.microsoft.com / Windows Live ID, login first etc.)</p>
+
+ <ul class="double">
+
+ <li class="in">
+ <p class="compact">Bug fixes</p>
+ <ul class="nested compact flat">
+ <li>HTML5 <code>Audio()</code> still broken in Safari 5.0.1 on Snow Leopard (10.6.3, 10.6.4), where sounds intermittently fail to load and play. Apple are aware of the regression. Related bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=32159#c14">#32519</a>. Include <code>sm2-ignorebadua</code> in URL on SM2 pages to ignore this check and verify broken behaviour, etc.</li>
+ <li>Tweaks for experimental RTMP feature re: handling of paused state, tracking of position and <code>onfinish()</code> firing early.</li>
+ <li>Bumped SWF z-index to 5000 for Safari 5, SoundCloud-reported bug-and-fix for Safari 5-specific bad redraw issues, and occasional crash case referencing WebCore::RenderLayer::paintLayer</li>
+ </ul>
+ </li>
+ <li class="in">
+ <p class="compact">API Updates</p>
+ <ul class="nested compact flat">
+ <li>iPhone/iOS 4 and iPad can now play a sequence of sounds (once the user starts sound initially), provided <code>onfinish()</code> is used to create/play the next sound. Example: Muxtape-style UI on homepage will play through list without further interaction once a user plays something in the list.</li>
+ </ul>
+ </li>
+ <li class="in">
+ <p class="compact">Miscellaneous</p>
+ <ul class="nested compact flat">
+ <li>Special case for getting SM2 working more reliably on HTC Android + Flash 10.1, where flash does not load until on-screen (ie., in view.) If off-screen, Flash is repositioned at left/top 0px in order to load (including scroll/resize if needed), then events released and movie is repositioned off-screen. If movie is in the DOM already eg. as in <code>useFlashBlock</code> cases, <code>flashLoadTimeout</code> is set to 0 to allow infinite wait (eg., SM2 will not timeout with an error, and will simply load when the flash is scrolled into view.)</li>
+ <li>Documentation: Clarified <code>createSound()</code> behaviour if an existing sound ID is given (returns sound object "as-is", ignores any options passed.)</li>
+ <li>Page-player demo updated to use <code>canPlayLink()</code> instead of <code>canPlayURL</code>, more flexible link/type handling.</li>
+ <li>Homepage and documentation UI/layout and language tweaks, a few new "as seen on the internets" icons etc.</li>
+ </ul>
+ </li>
+
+ </ul>
+
+ </li>
+
+ <li class="in">
+ <h3><b>V2.96a.20100624</b> - Safari 5/Snow Leopard 10.6.3/10.6.4 HTML5 Audio() issue, X-domain SWF build fixes (<a href="../../download/soundmanagerv296a-20100624.zip">Download archived version</a>)</h3>
+
+ <p>Disabling HTML5 Audio for Safari 5 on Snow Leopard 10.6.3 + 10.6.4 (current release) only, as it is broken similar to Safari 4.x (also on Snow Leopard only.) Related bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=32159#c14">#32519</a>. Also, version info in SWFs and fixed X-domain SWF build.</p>
+
+ <ul class="double">
+
+ <li class="in">
+ <p class="compact">Bug fixes</p>
+ <ul class="nested compact flat">
+ <li>HTML5 Audio() still broken in Safari 5 on Snow Leopard (10.6.3, 10.6.4) - disabling for now, falling back to Flash as with Safari 4.x on Snow Leopard. Include <code>sm2-ignorebadua</code> in URL to ignore this check and verify broken behaviour, etc.</li>
+ <li>Fixed X-domain SWF builds to actually work cross-domain.</li>
+ </ul>
+ </li>
+ <li class="in">
+ <p class="compact">Miscellaneous</p>
+ <ul class="nested compact flat">
+ <li>Added version info string to SWFs in Flash right-click / context menu, helpful when troubleshooting SWFs.</li>
+ </ul>
+ </li>
+
+ </ul>
+
+ </li>
+
+ <li class="in">
+ <h3><b>V2.96a.20100606</b> - RTMP (Flash Media Server) Support, HTML5 Updates (<a href="../../download/soundmanagerv295b-20100606.zip">Download archived version</a>)</h3>
+
+ <p>HTML5 update, new RTMP feature: Experimental Flash Media Server support, <code>onposition()</code> event listener, SMSound <code>type</code> option and code cleanup.</p>
+
+ <ul class="double">
+
+ <li class="in">
+ <p class="compact">API Updates</p>
+ <ul class="nested compact flat">
+ <li>New experimental <a href="../#smsound-serverurl" title="SMSound serverURL property">RTMP support</a> via kjvarga's fork at <a href="http://github.com/kjvarga/SoundManager2/">http://github.com/kjvarga/SoundManager2/</a> while maintaining existing NetStream-based behaviour for non-RTMP MPEG4 audio, etc. Uses new <code>serverURL</code> parameter for FMS (I used Red5 for dev/testing,) eg. <code>soundManager.createSound({id:'rtmpTest',serverURL:'rtmp://localhost/oflaDemo',url:'oh-alberta.mp3'}).play();</code></li>
+ <li>New SMSound option for createSound(), load(), play(): '<a href="../#smsound-type" title="SMSound type option">type</a>', for specifying MIME type alongside URL to help with detecting playability. eg.
+<code>soundManager.createSound({id:'foo', url:'/player.php?stream=1', type:'audio/mp3'}).play();</code> and so on. Hat tip: <a href="http://sylvinus.org">sylvinus.org</a></li>
+ <li>New SMSound event: <a href="../#smsound-onposition" title="SMSound onposition() event">onposition()</a>, for attaching listeners to specific times within a sound.</li>
+ </ul>
+ </li>
+ <li class="in">
+ <p class="compact">Bug fixes</p>
+ <ul class="nested compact flat">
+ <li>Flash sound unload/destroy ActionScript "could not close stream" exception/warning (finally?) fixed.</li>
+ <li>Sound looping updated for Flash 8, working (albeit with a quirk - requires preloading.)</li>
+ </ul>
+ </li>
+ <li class="in">
+ <p class="compact">Miscellaneous</p>
+ <ul class="nested compact flat">
+ <li>Removed Base64 HTML5 Audio() tests, redundant as numerous MIME (audio/mpeg, audio/mp3 etc.) checks seem to cover it.</li>
+ <li>Updated MPC (drum machine) demo from 2006-era design, modernizing the CSS a bit.</li>
+ <li><code>nullURL = 'about:blank'</code> tweak for unloading (flash 8.) May have finally fixed that dumb stream closing error on unload/destroy.</li>
+ <li>set <code>soundManager.didFlashBlock</code> *before* firing <code>onready()</code>/<code>onerror()</code> listeners</li>
+ </ul>
+ </li>
+
+ </ul>
+
+ </li>
+
+ <li class="in">
+ <h3><b>V2.96a.20100520</b> - HTML5 Edition (<a href="../../download/soundmanagerv295b-20100520.zip">Download archived version</a>)</h3>
+
+ <p>Experimental HTML5 support, lots of code shuffling and performance tweaks.</p>
+
+ <ul class="double">
+
+ <li class="in">
+ <p class="compact">API Updates</p>
+ <ul class="nested compact flat">
+ <li>New <a href="../#soundmanager-usehtml5audio" title="SoundManager: useHTML5Audio feature">soundManager.useHTML5Audio</a> (disabled by default except for iPad, Palm Pre) - adds experimental HTML5 Audio support, with Flash fallback for MP3/MP4 formats as needed.</li>
+ <li>Sound looping now works in Flash! eg. <code>mySound.play({loops:3});</code> - for an example + discussion of how to get near-seamless looping, see <a href="http://www.flickr.com/photos/schill/4499319436/" title="SoundManager 2: Seamless Looping MP3s in Flash (Demo)">Seamless Looping MP3s in Flash</a> (demo video) on Flickr.</li>
+ </ul>
+ </li>
+ <li class="in">
+ <p class="compact">Bug fixes</p>
+ <ul class="nested compact flat">
+ <li><code>beginDelayedInit()</code> is always used in lazy loading case (eg. via dynamic script tag/XHR etc.,) as some cases where SM2 won't auto-start eg. document.readyState empty for Firefox 3.5.5 (seen on Win32) with an HTML5 DOCTYPE.</li>
+ <li>SWF is now 8x8 pixels by default, vs. 6x6 pixels (odd fix for HTML5 Doctype on Firefox 3.6/win32)</li>
+ <li>Fixed dumb IE undefined ID bug</li>
+ </ul>
+ </li>
+ <li class="in">
+ <p class="compact">Miscellaneous</p>
+ <ul class="nested compact flat">
+ <li>soundmanager2.swf and soundmanager2_flash9.swf are now "non-debug" versions; with debugMode enabled, soundmanager2_debug.swf and soundmanager2_flash9_debug.swf are loaded instead.</li>
+ <li>New build script for JS + SWFs, see <a href="../getstarted/#basic-inclusion" title="Including SoundManager 2, file size options">file size table</a>. JS compression now done via Google Closure compiler; new soundmanager-jsmin.js build, debug-enabled but compressed, in addition to build-script-optimized, no-debug, compressed JS (~9 KB with gzip vs. ~90 KB for raw, commented, debug-enabled version.)</li>
+ <li>Null check fix for unavailable eq/waveform data</li>
+ <li>Experimental video (flash 9-only) change: Use stage width/height instead of 0/0 when lacking metadata</li>
+ <li>Page player whileloading() calls now being throttled</li>
+ <li>Better page player click handling for IE 7</li>
+ </ul>
+ </li>
+
+ </ul>
+
+ </li>
+
+ <li class="in">
+ <h3><b>V2.95b.20100323</b> (<a href="../../download/soundmanagerv295b-20100323.zip">Download archived version</a>)</h3>
+ <p><code>useFlashBlock</code>, better handling of time-out/errors (CSS-based SWF repositioning options for unblocking on time-out), "play MP3 button" demo, <code>canPlayLink()</code>, <code>canPlayMIME()</code>, <code>eqData</code> + <code>waveformData</code> for AAC/H.264 (movieStar) content, missing documentation and miscellaneous bug fixes.</p>
+
+ <ul class="double">
+
+ <li class="in">
+ <p class="compact">API Updates</p>
+ <ul class="nested compact flat">
+ <li>New <code>soundManager.useFlashBlock</code> (disabled by default) - enables CSS classes assigned to SWF container indicate start-up state (ok/error/blocked), allowing positioning/display of SWF for unblock cases and successful recovery from unblocking. Built into homepage + (most) demos. Updated flashblock demo as well.</li>
+ <li>playableClass attribute eg. <code><a href="foo.php" class="inline-playable"></code>, allowing URLs without .mp3 to be picked up</li>
+ <li>New <code>soundManager.canPlayLink()</code> + <code>canPlayMIME()</code>, ability to check <a href="foo.php" type="audio/mp3"> for example</li>
+ </ul>
+ </li>
+ <li class="in">
+ <p class="compact">Bug fixes</p>
+ <ul class="nested compact flat">
+ <li><code>soundManager.play()</code> type check fix, instanceof Object vs. typeof x === 'Object' (typo)</li>
+ <li><code>computeSpectrum()</code> can access waveform and eq (spectrum) data for movieStar (AAC/MP4, netstream-based) objects, too.</li>
+ </ul>
+ </li>
+ <li class="in">
+ <p class="compact">Miscellaneous</p>
+ <ul class="nested compact flat">
+ <li>Moved old demo code using <code>$()</code> to <code>_id()</code>, <code>_$</code> in <code>soundManager2</code> to <code>_id()</code> to avoid potential jQuery (and other $-based library) collisions</li>
+ <li>Make <code>new SoundManager('/path/to/swfs/');</code> actually work.</li>
+ <li>Flash time-out (flash blockers) vs. security failure detection/other error cases is smarter on the SM2 homepage now</li>
+ <li>New "MP3 player button" demo</li>
+ <li>Removed old IE onclick handler fix in several demos for non-MP3 links</li>
+ <li><code>eqeqeq = true</code> for jslint, why not.</li>
+ </ul>
+ </li>
+
+ </ul>
+ </li>
+
+
+ <li class="in">
+ <h3><b>V2.95b.20100101</b> (<a href="../../download/soundmanagerv295b-20100101.zip">Download archived version</a>)</h3>
+ <p>New features: Flash movie debugging in SWF via <code>debugFlash</code> (default:false), <code>SMSound.eqData = { left:[], right:[] }</code>, code tidying and debug output clean-up</p>
+
+ <ul class="double">
+
+ <li class="in">
+ <p class="compact">API Updates</p>
+ <ul class="nested compact flat">
+ <li>New <code>soundManager.debugFlash</code> property, enables debug messages from within flash (output to flash movie). Useful for troubleshooting start-up, security issues etc. <a href="../getstarted/#flashdebug">Flash debug output example</a></li>
+ <li><code>SMSound.eqData</code> now has left and right channels - e.g. <code>eqData = { left: [], right: [] }</code> - was previously a single array: <code>eqData = [];</code> Backwards-compatibility is maintained for now as <code>eqData[i]</code> still works with the new structure.</li>
+ </ul>
+ <p class="compact">Bug fixes</p>
+ <ul class="nested compact flat">
+ <li><code>stream = true</code> is no longer automatically set when <code>SMSound.play()</code> is called and <code>readyState == 0</code>, as it was breaking the <code>stream:false</code> case where playback should not start until the sound has fully-loaded.</li>
+ <li><code>soundManager.reboot()</code> forces recreation of object/embed rather than old method of node remove/re-append (in case other options changed, eg. debugFlash was false, but assigned to true after an error during start-up.)</li>
+ </ul>
+ <p class="compact">Miscellaneous</p>
+ <ul class="nested compact flat">
+ <li>Review of all SM2 debug output, more concise and informative messaging - especially around start-up troubleshooting/error debugging, security sandbox errors, SWF 404 case etc.</li>
+ <li>Code formatting clean-up (via jsbeautifier.org)
+ soundmanager2.js tested and passes JSLint, Edition 2009-11-22 + options: /*jslint undef: true, bitwise: true, newcap: true, immed: true */</li>
+ <li>Better organization/use of strings for debug output</li>
+ <li>New canvas-based favicon VU meter demo for home page, 360 player and muxtape-style player demos where supported (Firefox and Opera, currently.) Firefox 3.6 is disappearing support for XBM images, which were previously used.</li>
+ </ul>
+ </li>
+
+ </ul>
+ </li>
+
+ <li class="in">
+ <h3><b>V2.95a.20090717</b> (<a href="../../download/soundmanagerv295a-20090717.zip">Download archived version</a>)</h3>
+ <p>New features: onready(), fast polling, flash blocking demos etc.</p>
+
+ <ul class="double">
+
+ <li class="in">
+ <p class="compact">API Updates</p>
+ <ul class="nested compact flat">
+ <li>New <code>soundManager.onready(myFunction[,scope])</code> method, for asynchronous queueing of <code>onload()</code>-style handlers. Fires when SM2 has finished initializing. Accepts an <i>optional</i> scope parameter to apply to handler; if none given, window object is used. A "status" object is passed to your handler (can be ignored) which includes a <code>success</code> boolean indicating whether SM2 loaded OK or not. Handlers added via onready() after successful initialisation will fire immediately.</li>
+ <li>New <code>soundManager.oninitmovie()</code> event callback, single assignment similar to <code>onload()</code>. Fires when the flash movie has first been written to (or read from) the DOM. Used internally for a flashblock-handler-related example, custom timeout condition.</li>
+ <li>New <code>soundManager.useFastPolling</code> property (false by default), enables 1 msec Flash 9+ timer for highest-possible <code>whileplaying()</code> and related JS callback frequency (default is 20 msec.) Use with <code>soundManager.useHighPerformance = true</code> for best performance, frame rates while updating the UI via whileplaying() etc.</li>
+ <li>New sound option (soundManager.defaultOptions): <code>multiShotEvents</code> (default:false) - enable support for multiShot-style events (currently <code>onfinish()</code> only). Eg. When <code>mySound.play()</code> is called three times, <code>onfinish()</code> will subsequently fire three times.</li>
+ </ul>
+ </li>
+
+ <li>
+ <p class="compact">Bug fixes</p>
+ <ul class="nested compact flat">
+ <li><code>createSound</code> now writes a warning to debug output if the sound ID is a number, or is a string starting with a numeric character. Because SMSound objects are stored in <code>soundManager.sounds[]</code>, while not syntactically invalid, numeric IDs will be treated as array indices and are likely to break things.</li>
+ </ul>
+ </li>
+
+ <li>
+ <p class="compact">Miscellaneous</p>
+ <ul class="nested compact flat">
+ <li>New flashblock / "click to flash" demo, example of handling blocked conditions and graceful recovery when flash is initially blocked until user chooses to allow it.</li>
+ <li>Cross-domain-scripting enabled SWF (using <code>allowDomain("*")</code>) included in swf/ directory (in its own .zip file.) Use when you must have domain A loading SM2 .SWF from domain B, or for testing etc and can't compile your own custom x-domain SWF from source.</li>
+ <li>Documentation, layout and menu tweaks</li>
+ </ul>
+ </li>
+
+ </ul>
+ </li>
+
+ <li class="in">
+ <h3><b>V2.95a.20090501</b> (<a href="../../download/soundmanagerv295a-20090501.zip">Download archived version</a>)</h3>
+ <p>Lots of updates.</p>
+
+ <ul class="double">
+
+ <li class="in">
+ <p class="compact">API Updates</p>
+ <ul class="nested compact flat">
+ <li>Added <code class="in">soundManager.allowFullVideo</code> for full-screen video playback, triggered by double-clicking. Also, related <code>soundManager.onfullscreenchange</code> event handler.</li>
+ <li>Updated <code>waveformData</code> to include stereo channels. Now an object literal instead of a single array. New format: <code>SMSound.waveformData = { left: [], right: [] }</code></li>
+ <li>New <code>SMSound.ondataerror()</code> (flash 9+) handler for cases where waveform/eq data is inaccessible due to other flash movies in the current browser which have loaded sound. (Flash must have security permissions to "read" all data currently being output, long story short. Having a YouTube tab open can cause this, for example.)</li>
+ <li>New <code class="in">isBuffering</code> property for MovieStar (MP4 audio/video) content, related <code class="in">onbufferchange()</code> event handler (sound object)</li>
+ <li>New <code>bufferTime</code> property for MovieStream content. Defines seconds of data to buffer before playback begins (null = flash default of 0.1 seconds; if AAC playback is gappy, try up to 3 seconds.)</li>
+ </ul>
+ </li>
+
+ <li>
+ <p class="compact">Bug fixes</p>
+ <ul class="nested compact flat">
+ <li>Off-screen flash with <code class="in">wmode</code> set to non-default value (transparent/opaque) will break SM2 for non-IE on Windows, time-out error style. SM2 will now revert wmode to default for this case (losing transparency/layering of movie) - <i>or</i> set <code>soundManager.flashLoadTimeout</code> to 0 and SM2 will retain wmode, but must now wait potentially infinitely for flash to load (until user scrolls it into view.) <code>soundManager.specialWmodeCase</code> reflects if this fix has been applied after init time. </li>
+ <li>Calling <code>soundObject.load()</code> after directly assigning a value to <code>soundObject.url</code> should now work as expected.</li>
+ </ul>
+ </li>
+
+ <li>
+ <p class="compact">Miscellaneous</p>
+ <ul class="nested compact flat">
+ <li>Shiny new "360° UI" canvas + visualization demos (Warning: Beta-ish code.)</li>
+ <li>Experimental SM2 exception/error handling + stack trace reporting added, an attempt to make custom errors thrown from SM2 more meaningful (ideally showing the user's call to SM2 where things went wrong in the stack.)</li>
+ <li>Calling <code>soundObject.load()</code> after directly assigning a value to <code>soundObject.url</code> should now work as expected.</li>
+ <li><code class="in">soundManager.useHighPerformance</code> update: Now false/disabled by default. Strange bug with JS/flash communication breaking with wmode=opaque on flash, specific (?) to Firefox on windows. SM2 does not normally set wmode. When <code class="in">useHighPerformance = true</code>, wmode=transparent will be used on the flash movie by default.</li>
+ <li>Tweaks related to position, whileplaying(), playState, buffering and state resetting when sound has finished playing (fixes for a few edge cases if replaying or reusing the same sound or video.)</li>
+ <li>Better code/feature separation and clean-up on inline player, Muxtape-style demos</li>
+ </ul>
+ </li>
+
+ </ul>
+ </li>
+
+ <li class="in">
+ <h3><b>V2.94a.20090206</b> (<a href="../../download/soundmanagerv294a-20090206.zip">Download archived version</a>)</h3>
+
+ <ul class="double">
+
+ <li class="in">
+ <p class="compact">API Updates</p>
+ <ul class="nested compact flat">
+ <li>New <code class="in">isBuffering</code> property, related <code class="in">onbufferchange()</code> event handler (sound object)</li>
+ <li>New <code class="in">soundManager.reboot()</code> method (<i>experimental</i>): Shut down and re-initialise SoundManager, remove and recreate flash movie (possibly handy for cases where you want to restart after flashblock-type whitelisting, etc.)</li>
+ <li>New <code class="in">soundManager.flashLoadTimeout</code> property, milliseconds SM2 will wait for flash movie callback before failing and calling soundManager.onerror() during start-up/init. If set to 0, SM2 will wait indefinitely for flash (good for reboot/flashblock-type scenarios.)</li>
+ </ul>
+ </li>
+
+ <li>
+ <p class="compact">Bug fixes</p>
+ <ul class="nested compact flat">
+ <li>Reverted Firebug 1.3 console.log().apply() hack, was breaking console.log() under IE 8 RC1 (as used with debug mode.) Firebug 1.3 seems to have a bug, occasional "console undefined" error.</li>
+ <li>Fixed a dumb flash 9/AS3 bug with setVolume() passing an extra parameter to flash.</li>
+ <li><code class="in">soundManager.useHighPerformance</code> update: Now false/disabled by default. Strange bug with JS/flash communication breaking with wmode=opaque on flash, specific (?) to Firefox on windows. SM2 does not normally set wmode. When <code class="in">useHighPerformance = true</code>, wmode=transparent will be used on the flash movie by default.</li>
+ </ul>
+ </li>
+
+ <li>
+ <p class="compact">Miscellaneous</p>
+ <ul class="nested compact flat">
+ <li>Tweaked project page / documentation UI, nicer code/debug formatting</li>
+ <li>Misc. API documentation fixes, improvements</li>
+ </ul>
+ </li>
+
+ </ul>
+
+ </li>
+
+
+ <li class="in">
+ <h3><b>V2.93a.20090117</b> (<a href="../../download/soundmanagerv293a-20090117.zip">Download archived version</a>)</h3>
+
+ <ul class="double">
+
+ <li class="in">
+ <p class="compact">General Updates</p>
+ <ul class="nested compact flat">
+ <li>New SoundManager 2 start-up debugger / troubleshooting tool, built into project home (see <a href="../getstarted/#troubleshooting" title="SM2 troubleshooting">troubleshooting</a>, and a standalone version - see "<a href="../../troubleshoot/" title="SoundManager 2 standalone troubleshooting tool" class="norewrite">troubleshoot/</a>" directory of download package)</li>
+ <li>New soundManager.getMemoryUse() method (flash 9+.) Returns RAM use for flash plugin (appears to be browser-wide, possibly system-wide by design.) <a href="../../demo/video/" title="SM2 javascript video demo">Video demo</a> includes an example RAM use monitor.</li>
+ <li>highPerformance disabled by default for Firefox on Windows due to reports of bugs preventing SM2 start-up in some cases. To override the disabling safety check, set <code class="in">soundManager.useHighPerformance = 'always';</code></li>
+ <li>Updated API demo testcases (<a href="../../demo/api/">API Demo page</a>)</li>
+ </ul>
+ </li>
+
+ <li>
+ <p class="compact">Bug fixes</p>
+ <ul class="nested compact flat">
+ <li class="in">Fixed Flash 8 bug with <code class="in">autoLoad</code>/<code class="in">autoPlay</code> and <code class="in">playState</code> not being correctly set.</li>
+ <li class="in">Fixed a bug with <code class="in">onfinish()</code> not firing when <code class="in">autoPlay</code> is used.</li>
+ <li class="in">Fixed a bug with pan and volume defaults not being correctly inherited and handled</li>
+ <li class="in">console[method]() now uses apply(), preventing possible Firebug 1.3-related scope issue where this != console</li>
+ <li class="in">IE now appends (vs. destructive .innerHTML write) SWF movie to target element, appends DIV with className "sm2-object-box"</li>
+ </ul>
+ </li>
+
+ </ul>
+
+ </li>
+
+
+ <li class="in">
+ <h3><b>V2.92a.20081224</b> (<a href="../../download/soundmanagerv292a-20081224.zip">Download archived version</a>)</h3>
+
+ <ul class="double">
+
+ <li class="in">
+ <p class="compact">General Updates</p>
+ <ul class="nested compact flat">
+ <li>Note: Flash (SWF) assets moved to swf/ subdirectory, starting with this version.</li>
+ <li>Updated design on API demo page, new <a href="../../demo/api/#looping">looping example</a></li>
+ </ul>
+ </li>
+
+ <li>
+ <p class="compact">Bug fixes</p>
+ <ul class="nested compact flat">
+ <li class="in">Improved regular-expression-based URL detection for <code>canPlayURL()</code>, flash 8/9 and MovieStar (video) formats</li>
+ <li class="in">Improved <code>soundManager.url</code>-related <code>normalizeURL()</code> handling. If GET parameters are in the URL including the SWF, it will be left alone.</li>
+ <li class="in">Fixed out-of-bounds issue with <code>setPosition()</code>.</li>
+ <li class="in">Fixed a <code>setPosition(0)</code> and <i>before</i> <code>onfinish()</code>-related issue, so it is possible to nicely loop sounds from within <code>onfinish()</code> - see <a href="../../demo/api/#looping">looping a sound</a> (API demo)</li>
+ <li class="in">Fixed an error condition where destroying a loading sound would not terminate the HTTP request, relating to error cases involving <code>netStream.close()</code>.</li>
+ </ul>
+ </li>
+
+ </ul>
+
+ </li>
+
+
+ <li class="in">
+ <h3><b>V2.91a.20081205</b> (<a href="../../download/soundmanagerv291a-20081205.zip">Download archived version</a>)</h3>
+
+ <ul class="double">
+
+ <li class="in">
+ <p class="compact">General Updates</p>
+ <ul class="nested compact flat">
+ <li>Completely-redesigned project page, multiple pages/sections, more-legible grid-based documentation layout</li>
+ <li>Code verified with <a href="http://jslint.com">jslint</a>. 0 errors reported with default settings, Edition 2008-11-26</li>
+ </ul>
+ </li>
+
+ <li>
+ <p class="compact">Bug fixes</p>
+ <ul class="nested compact flat">
+ <li class="in">True XHTML DOM compatibility. Rewrote <code>createMovie()</code> to use standard DOM <code>createElement()</code> methods, vs. previous writing to .innerHTML method which caused exceptions with XHTML documents.</li>
+ <li class="in">Special-cased <code>useHighPerformance</code> for Firefox 2 only, disabling it as it seems to be problematic. Further research pending.</li>
+ <li class="in">Removed try .. catch error handling within <code>soundManager.onload()</code>, catching exceptions when calling user-defined onload handler. Errors should now fall through as normally expected.</li>
+ <li class="in">Fixed several <code>setPosition()</code>-related bugs (NaN/undefined error, seeking to invalid position, position inconsistencies with pause/resume)</li>
+ </ul>
+ </li>
+ </ul>
+
+ </li>
+
+ <li class="in">
+ <h3><b>V2.90a.20081028 (Old documentation theme) - <a href="http://schillmania.com/projects/soundmanager2/download/soundmanagerv290a-20081028.zip">Download archived version</a></b></h3>
+
+ <ul class="double">
+ <li class="in">
+ <p class="compact">API: Bug fixes</p>
+ <ul class="nested compact flat">
+ <li>Fixed numerous Flash AS3 exceptions for Flash 10 plugin users of SM2 with Flash 9 .SWF</li>
+ <li class="in">Fixed a <code>setPosition()</code> bug where position > duration would stop sounds playing in other tabs</li>
+ <li class="in">Fixed <code>createSound(); play(); destruct();</code> sequence to correctly stop sound under Flash 9</li>
+ <li class="in">Changed Flash 9 <code>onload()</code> to properly pass boolean "false" on load failure, same as Flash 8</li>
+ <li class="in">Fixed <code>autoLoad</code>=true bug with Flash 9 movieStar (MPEG4) content, now pauses after creating</li>
+ </ul>
+ </li>
+
+ <li class="in">
+ <p class="compact">API: New shiny!</p>
+ <ul class="nested compact flat">
+ <li class="in"><code>soundManager.useHighPerformance</code>: Minimize JS/Flash lag, ~3x <code>whileplaying()</code> frequency! (Most noticeable on Mac OS X, and Safari on Windows? Investigating IE cases.)</li>
+ <li class="in"><code>soundManager.pauseAll()</code> / <code>soundManager.resumeAll()</code>: Global pause/resume</li>
+ <li class="in"><code>soundManager.muteAll()</code> / <code>soundManager.unmuteAll()</code>: Global mute/unmute</li>
+ </ul>
+ </li>
+
+ <li>
+ <p class="compact">MovieStar MPEG4 video support! <em>(experimental)</em></p>
+ <ul class="nested compact flat">
+ <li class="in"><code>soundManager.createVideo()</code> / <code>soundManager.destroyVideo()</code> for MovieStar MPEG4 formats!</li>
+ <li>Uses same SMSound instance object and API methods/options as regular sounds, with a few extra parameters</li>
+ <li class="in"><code>soundManager.useVideo</code> will show video when applicable (false/disabled by default)</li>
+ <li class="in"><code>SMSound.onmetadata</code>: Meta data handler for MPEG4 video files - provides dimensions (w/h)</li>
+ </ul>
+ </li>
+
+ <li class="in">
+ <p class="compact">Miscellaneous</p>
+ <ul class="nested compact flat">
+ <li><b>Removed</b> experimental flashBlock support. Considering eliminating SM2 timeout-based onerror() behaviour in favour of asynchronous loading (eg. user may initially block, notice flash movie and take action to unblock many seconds after loading - thus, flash movie eventually loads and can eventually trigger successful SM2 init.)</li>
+ <li class="in">Modified <code>pause()</code> and <code>resume()</code> to only affect playing sounds (eg. <code>playState != 0</code>).</li>
+ </ul>
+ </li>
+
+ </ul>
+
+ </li>
+
+ <!-- not newest -->
+
+ <li class="in">
+ <h3><b>V2.80a.20081005</b></h3>
+
+ <ul class="double">
+ <li class="in">
+ <p class="compact">API: Bug fixes</p>
+ <ul class="nested compact flat">
+ <li class="in">Changed Flash 8 <code>onload()</code> boolean "loaded" to be based on sound duration being >0, better test of load success.</li>
+ <li class="in">Modified Flash 9 <code>onload()</code> to include boolean result for success/fail, parity with Flash 8</li>
+ </ul>
+ </li>
+
+ <li class="in">
+ <p class="compact">API: New shiny!</p>
+ <ul class="nested compact flat">
+ <li class="in">
+ <p style="font-weight:normal;padding-top:0px">Added <em>experimental</em> Flash 9.0r115+ (flash codename "<a href="http://www.adobe.com/support/documentation/en/flashplayer/9/releasenotes.html#fixes_90115">MovieStar</a>", Flash 9 Update 3) MPEG4 / HE-AAC support (audio only.) A subset of MPEG4 should be supported including FLV, MP4, M4A, MOV, MP4V, 3GP and 3G2 files. Feature is disabled by default.</p>
+ <ul class="nested compact flat">
+ <li class="in">New soundManager <code>useMovieStar</code> property, controls feature availability (currently disabled by default.)</li>
+ <li>New SMSound option, <code>isMovieStar</code>, configures feature behaviour on a per-sound basis. Default (null) is to auto-detect .mp4, .mov etc. in URL and enable if found, but can also be forced on or off (true / false).</li>
+ <li class="in">Video-based formats use the Flash 9 <code>NetStream</code> and <code>NetConnection</code> objects, whose API differs slightly from the Sound object. Seeking is limited to video key frames and is not as smooth as an MP3.</li>
+ <li class="in">Audio playback has been seen to pause during certain events (window scrolling, etc.) while playing MovieStar formats. It doesn't appear to be from CPU overload. More investigation is needed.</li>
+ <li class="in">Basic load, progress, onload, whileplaying API support is provided (page player demo includes MP4 and FLV formats). Not all methods (eg. setVolume) have been tested.</li>
+ <li class="in">.AVI is not included by default, but may work if the format is actually MPEG4-based.</li>
+ <li>Format limitation note: EQ, peak and spectrumData are not available with MovieStar content. This may be a Flash 9/AS3 limitation.</li>
+ </ul>
+ </li>
+ </ul>
+ </li>
+
+ <li class="in">
+ <ul class="double">
+ <li class="in">
+ <p class="compact">Miscellaneous</p>
+ <ul class="nested compact flat">
+ <li>Added CSS checks to page player: "exclude" and "playable" to override default URL matching behaviour.</li>
+ </ul>
+ </li>
+ </ul>
+ </li>
+
+ </ul>
+
+ </li>
+
+ <li class="in">
+ <h3><b>V2.78a.20080920</b></h3>
+
+ <ul class="double">
+ <li class="in">
+ <p class="compact">API: Bug fixes</p>
+ <ul class="nested compact flat">
+ <li class="in">Added <code>SoundLoaderContext</code> parameter to <code>load()</code>, Flash should now check policy-related (crossdomain.xml) files when loading resources from remote domains. Should fix previous security exception warnings when trying to access ID3 and/or waveform/EQ data. See related <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/media/SoundLoaderContext.html">SoundLoaderContext documentation</a> (ActionScript 3)</li>
+ <li class="in">Fixed a bug with <code>load()</code>, was improperly expecting an options object - now works properly.</li>
+ </ul>
+ </li>
+ <li class="in">
+ <p class="compact">API: New shiny!</p>
+ <ul class="nested compact flat">
+ <li class="in">Added <code>soundManager.altURL</code> property (and <code>useAltURL</code> conditional) for convenient offline and other URL switching cases (dev vs. production environments, etc.)</li>
+ </ul>
+ </li>
+ <li class="in">
+ <p class="compact">Miscellaneous</p>
+ <ul class="nested compact flat">
+ <li class="in">Renamed internal soundManager and SMSound <code>self</code> closure references to <code>_s</code> and <code>_t</code>, respectively, to avoid potential conflicts with others' code</li>
+ <li class="in">Moved self-destruct to use <code>window.onunload</code> instead of <code>onbeforeunload</code>, given the latter event can be caught and canceled if desired by the user</li>
+ <li class="in">Inline player demo: Added <code>autoPlay</code> option</li>
+ <li class="in">"Basic" demo directory (demo/basic/) moved to demo/api/, added <code>load()</code>-related testcase</li>
+ </ul>
+ </li>
+ </ul>
+
+ </li>
+
+ <li class="in">
+ <h3><b>V2.78a.20080920</b></h3>
+
+ <ul class="double">
+ <li class="in">
+ <p class="compact">API: Bug fixes</p>
+ <ul class="nested compact flat">
+ <li class="in">Added <code>SoundLoaderContext</code> parameter to <code>load()</code>, Flash should now check policy-related (crossdomain.xml) files when loading resources from remote domains. Should fix previous security exception warnings when trying to access ID3 and/or waveform/EQ data. See related <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/media/SoundLoaderContext.html">SoundLoaderContext documentation</a> (ActionScript 3)</li>
+ <li class="in">Fixed a bug with <code>load()</code>, was improperly expecting an options object - now works properly.</li>
+ </ul>
+ </li>
+ <li class="in">
+ <p class="compact">API: New shiny!</p>
+ <ul class="nested compact flat">
+ <li class="in">Added <code>soundManager.altURL</code> property (and <code>useAltURL</code> conditional) for convenient offline and other URL switching cases (dev vs. production environments, etc.)</li>
+ </ul>
+ </li>
+ <li class="in">
+ <p class="compact">Miscellaneous</p>
+ <ul class="nested compact flat">
+ <li class="in">Renamed internal soundManager and SMSound <code>self</code> closure references to <code>_s</code> and <code>_t</code>, respectively, to avoid potential conflicts with others' code</li>
+ <li class="in">Moved self-destruct to use <code>window.onunload</code> instead of <code>onbeforeunload</code>, given the latter event can be caught and canceled if desired by the user</li>
+ <li class="in">Inline player demo: Added <code>autoPlay</code> option</li>
+ <li class="in">"Basic" demo directory (demo/basic/) moved to demo/api/, added <code>load()</code>-related testcase</li>
+ </ul>
+ </li>
+ </ul>
+
+ </li>
+
+ <li class="old">
+ <h3><b>V2.77a.20080901</b></h3>
+
+ <ul class="double">
+
+ <li class="in">
+ <p class="compact">API: Bug fixes</p>
+ <ul class="nested compact flat">
+ <li class="in">Fixed some <code>mute()</code> / <code>unmute()</code>-related bugs, global muting should now work properly. Added some related demo page examples.</li>
+ <li class="in">Removed comment on flash9Options merging code, was previously new and didn't actually work as it was commented out. Oops. :D</li>
+ <li class="in">Added <i>experimental</i> Flashblock exception handling (mozilla/firefox extension), "notification bar"-style UI which can message and assist users in unblocking SM2 .swf. Configured via <code>soundManager.flashBlockHelper</code> object, currently disabled by default.</li>
+ <li class="in">Modified <code>soundManager.destroySound()</code> and <code>sound.destruct()</code>, fixed a bug with these methods and flash's unloading of sounds which was breaking things. Hopefully fixes destroying sounds within whileplaying() and related event handlers, too.</li>
+ <li class="in">Modified flash 9 "peak data" code to only set the data if the feature is actually enabled.</li>
+ <li class="in">Modified <code>soundManager._debug()</code> to list all sound object details, instead of just ID/URL.</li>
+ </ul>
+ </li>
+
+ </ul>
+
+ </li>
+
+ <li class="old">
+ <h3><b>V2.76a.20080808</b></h3>
+
+ <ul class="double">
+
+ <li class="in">
+ <p class="compact">API: Bug fixes</p>
+ <ul class="nested compact flat">
+ <li class="in">Fixed some memory "leaks" / garbage collection issues. RAM allocated to load sounds previously wasn't freed until page unload; now memory should be garbage collected some time after <code>sound.unload()</code> and/or <code>soundManager.destroySound()</code>/<code>sound.destruct()</code> methods are called. In certain cases, Flash sound objects may be destroyed and re-created (transparent to the JS-side) to release memory. Note that garbage collection is not instantaneous, and is affected by CPU/system load and other variables.</li>
+ <li class="in">Fixed an issue with <code>play()</code> not working on sounds created with <code>autoPlay</code>.</li>
+ <li class="in">Fixed SM2 to work under proper XHTML (served as <code>application/xhtml+xml</code> MIME type). Rewrote object/embed code <em>again</em>, now version-agnostic for IE (no CLSID parameters.)</li>
+ <li class="in">Corrected reported <code>loadFromXML()</code> bug, multiple loadFromXML() calls should work.</li>
+ </ul>
+ </li>
+
+ <li class="in">
+ <p class="compact">API: New shiny!</p>
+ <ul class="nested compact flat">
+ <li class="in">New <code>useWaveformData</code> and <code>useEQData</code> sound options, providing access to raw waveform and sound frequency/EQ spectrum data via sound.waveformData and sound.eqData.</li>
+ <li class="in">Renamed <code>useSpectrumData</code> to <code>useWaveformData</code> - if using waveform stuff currently, make sure you update your code!</li>
+ <li class="in">Added <code>soundManager.features</code> object, which reflects the "support" state for <code>peakData</code>, <code>waveformData</code> and <code>eqData</code>. Handy for current and future version/support branching.</li>
+ </ul>
+ </li>
+
+ <li class="in">
+ <p class="compact">API: Miscellaneous</p>
+ <ul class="nested compact flat">
+ <li class="in">New <code>flash9Options</code> configuration object for logical separation. When Flash 9+ is used, these options are merged into the <code>defaultOptions</code> object.</li>
+ <li class="in">Added <code>allowDomain()</code> stubs and documentation to .as source for allowing .swf on external domains to work (recompile of .swf required)</li>
+ </ul>
+ </li>
+
+ <li class="in">
+ <p class="compact">"Page As Playlist" demo: Updates</p>
+ <ul class="nested compact flat">
+ <li>Added "favicon" VU meter display option (Flash 9+ only, experimental, currently Firefox/Opera only)</li>
+ <li class="in">More-efficient RAM use via <code>unload()</code> and <code>destruct()</code> sound methods, discarding inactive sounds and freeing RAM as appropriate.</li>
+ <li class="in">Added <code>useEQData</code>, showing sound spectrum (frequency range) instead of raw waveform</li>
+ <li class="in">Added <code>fillGraph</code> config option, allowing solid waveform graphs instead of only peak points</li>
+ <li class="in">Fixed <code>playNext</code> bug where same track couldn't be played twice in a row.</li>
+ <li>Fixed duplicate URL bug; items with identical MP3 URLs will now work. (Previously, URL was the ID for items and thus had to be unique. Lookup is now done by object.)</li>
+ <li>Modified MP3 URL search to include URL parameters, characters after ".mp3"</li>
+ </ul>
+ </li>
+
+ <li class="in">
+ <p class="compact">Other updates</p>
+ <ul class="nested compact flat">
+ <li>Demo code clean-up, externalised CSS, prettier demo layout and code color highlighting</li>
+ </ul>
+ </li>
+
+ </ul>
+ </li>
+
+ <li class="old">
+ <h3><b>V2.75a.20080707</b></h3>
+ <ul class="nested">
+ <li class="in">Flash 9 support! (soundmanager2_flash9.swf) - <code>multiShot</code> now actually works (layering/"chorus" effects on sounds), new <code>spectrumData</code> and <code>peakData</code> API features. All existing API features should have parity.</li>
+ <li class="in">Added <code>soundManager.flashVersion</code> property. Flash 8 is the supplied default.</li>
+ <li class="in">Modified <code>soundManager.url</code> to require only a path, eg. <code>/path/to/soundmanager-swfs/</code> to allow loading of varying .SWF versions.</li>
+ <li class="in">Basic (API) demo: Updated multiShot/Flash 9 behaviour documentation</li>
+ <li class="in">Page player demo: Added optional spectrum and VU (spectrumData/peakData) features</li>
+ <li class="in">MPC + animation demos: Modified to use Flash 9 (demo improved multiShot feature)</li>
+ <li>Flash 9 behaviour differences:
+ <ul>
+ <li class="in"><code>multiShot</code> properly allows <code>play()</code> to be called multiple times on a sound object, creating desired "chorus" effect. Will call <code>onfinish()</code> multiple times, but <code>whileplaying()</code> etc. are called only for the first "play instance" to avoid complications.</li>
+ <li class="in">New <code>soundSpectrum</code> and <code>peakData</code> sound features (spectrum graph / "VU" meter-style data) available</li>
+ <li>Sounds can be actually unloaded ("null" MP3 no longer needed to cancel loading of an MP3), but URL cannot be changed without destroying and recreating the related Flash sound object. The Flash 9 version does this to maintain API consistency.</li>
+ </ul>
+ </li>
+ <li>New + improved documentation/project page, updated 2-column layout with content filters, "Get Satisfaction" integration and self-update checks (and a light-switch-related easter egg.)</li>
+ </ul>
+ </li>
+
+ <li class="old">
+ <h3>V2.5b.20080525</h3>
+ <ul class="nested">
+ <li class="in">Added <code>waitForWindowLoad</code> for delayed init</li>
+ <li class="in">Added <code>onpause()</code> and <code>onresume()</code> event handlers</li>
+ <li class="in">Added <code>mute()</code> and <code>unmute()</code></li>
+ <li class="in">Updated demos, revised documentation</li>
+ </ul>
+ </li>
+
+ <li class="old">
+ <h3>V2.5b.20080505</h3>
+ <ul class="nested">
+ <li class="in">To improve startup time, <code>soundManager.go()</code> (<code>createMovie()</code> alias) now fires at <code>onDOMContentLoaded()</code> by default if supported. (Otherwise, falls back to <code>window.onload()</code>.)</li>
+ <li class="in">Improved initialisation routine - <code>soundManager.onerror()</code> is called when the Flash init "times out." Specifically, <code>onerror()</code> is called when Flash fails to make an ExternalInterface (Flash-> JS) call to SM2 within 1 second of <code>window.onload()</code> firing.</li>
+ <li>Added logic to handle special Safari delayed init case (Flash not loading when in a new, unfocused tab until focused) as a exception to the above.</li>
+ <li>Added better exception handling + debug messaging for initialisation failure cases (Flash security restrictions due to loading from local file system, no flash support, no ExternalInterface support etc.)</li>
+ <li class="in">Updated .swf appendChild() target to use best-to-worst options: <code>(document.body || document.documentElement || document.getElementsByTagName('div')[0])</code></li>
+ <li>Safari console[log|warn|error]-style messages are now properly formatted.</li>
+ <li class="in">Added tons of semicolons to closing braces, eg. <code>};</code></li>
+ <li>"No-debug", minified version of SM2 included: <a href="script/soundmanager2-nodebug-jsmin.js" title="No-debug, minified version of SoundManager 2 script">soundmanager2-nodebug-jsmin.js</a> (17.4 KB, down from full size of 35 KB.) With Gzip compression, file size is ~6 KB. (Commented, debug-enabled version compresses to 10 KB with Gzip.)</li>
+ </ul>
+ </li>
+
+ <li class="old">
+
+ <h3>V2.5b.20080501</h3>
+ <p class="compact"><b>Warning:</b> A little experimental too, read details below.</p>
+ <p><em>Changelog</em>:</p>
+ <ul class="nested">
+ <li class="in">Rewrote SoundManager initialisation: "Way faster." Communication now initiated from Flash, verification callback then performed by JS; far faster, hopefully more-reliable (TBD.) Init time drastically reduced from seconds to milliseconds in most cases, dependent primarily on Flash movie load rather than <code>window.onload()</code>.</li>
+ <li>Above change also fixes Safari "loading SM2 in background tab" issue, where Safari does not init Flash until background tab comes into focus (when a link is opened in a new, non-focused tab.)</li>
+ <li class="in">Current drawback: Difficult to determine, save for falling back to <code>window.onload()</code> plus focus methods due to above issue, whether SM2 is actually available or not (ie., <code>soundManager.onerror()</code> will not likely be called as in past.) However, the <code>supported()</code> method will correctly reflect if SM2 has successfully initialised, for example.</li>
+ <li class="in">Added sandbox/security model code; SM2 can now tell if it is restricted to either local or internet access only, for example. Helpful in potential debugging errors, plus viewing demos off the local filesystem should no longer throw init errors requiring whitelisting (seemingly due to the new initialisation method.) Win!</li>
+ <li class="in">Opera 9.27 has been noted to have some bugs relating to ExternalInterface, seems to be unable to make calls from ActionScript-level methods using <code>setTimeout()</code> or <code>setInterval()</code>. As a reulst, SoundManager 2 events like <code>onfinish()</code>, <code>whileplaying()</code> and <code>onfinish()</code> can be sporadically called or missed altogether. No known workaround at this time, but Opera 9.5 (beta 2) does not have this issue. Popular MP3 "mix tape" site muxtape.com uses similar techniques for JS-Flash communication and appears to suffer from the same problem.</li>
+ <li class="in"><strong>Warning</strong>: Random crash issue noticed when using IE 6 + 7 and this demo page, calling <code>createSound()</code> when <code>soundManager.defaultOptions.autoLoad = true;</code> from within <code>soundManager.onload()</code>, for creating + preloading the tab/theme switch sounds. Removing autoLoad=true (leaving the default of false) fixed the crash. Exact reason not determined, perhaps recursive calls or pre-onload issue (?), seems to be isolated to the home page. MPC demo uses autoLoad also, but did not crash. Mentioning just in case.</li>
+ <li>Updated Muxtape-style demo: More themes, load/security debugging info etc.</li>
+ </ul>
+ </li>
+
+ <li class="old">
+
+ <h3>V2.2.20080420</h3>
+ <p><em>Changelog</em>:</p>
+ <ul class="nested">
+ <li>More demos! "<a href="../demo/page-player/" title="Muxtape.com-style playable page of MP3 links">Page as a playlist</a>" (muxtape.com-style) example, "<a href="../demo/play-mp3-links/" title="Play MP3 links in a web page using SoundManager 2">Make MP3 links playable inline</a>" demo</li>
+ <li class="in">Corrected <code>onStop()</code> handler inheritance/overriding behaviour (was incorrectly checking defaultOptions)</li>
+ <li class="in">Added debug output of options object for <code>createSound()</code> calls. Full options (result of merging global default + sound-instance-specific options) displayed, helpful in troubleshooting. Event handler function code is intelligently (hopefully) displayed, truncated at 64 characters of first block or end of line, whichever comes first.</li>
+ <li class="in">Removed most HTML markup from non-HTML (eg. console) <code>_writeDebug()</code> calls</li>
+ <li class="in"><code>soundManager.destruct()</code> writes to console, to be consistent</li>
+ </ul>
+
+ </li>
+
+ <li class="old">
+
+ <h3>V2.1.20080331</h3>
+ <p><em>Changelog</em>:</p>
+ <ul class="nested">
+ <li class="in">Modified <code>createSound()</code> to return a sound object if successful (more logical)</li>
+ <li class="in">Updated <code>setPosition()</code> method and added <code>position</code> option parameter, documentation + demo (bugfix)</li>
+ <li class="in">Corrected <code>createSound()</code> and <code>play()</code> sound option inheritance/overriding behaviour (eg. <code>position</code>) to work as expected (most to least important: Method call options -> sound object instance options -> SM2 global options)</li>
+ <li class="in">Updated <code>deleteSound()</code> so Array.splice() is used instead of delete, the latter doesn't cause Array.length to update (bugfix)</li>
+ <li>Modified debug=alert to only work when debug mode is enabled (potential annoyance aversion)</li>
+ <li class="in">Modified <code>togglePause()</code> to use <code>position</code> option parameter rather than undocumented <code>offset</code> (oops :D)</li>
+ <li class="in">Added <code>supported()</code> convenience method (indicates pass/fail after SM2 has initialised.)</li>
+ <li>Added disabling debug calls from Flash (performance)</li>
+ <li>Added URL hash updating/bookmarking and page title updating to jsAMP demo app</li>
+ <li>Updated project page layout</li>
+ </ul>
+
+ </li>
+
+ <li class="old">
+
+ <h3>V2.0b.20070415</h3>
+ <p><em>Changelog</em>:</p>
+ <ul class="nested">
+ <li class="in">Added <code>destroySound()</code> method</li>
+ <li>Made debug output slightly less-verbose (commented out)</li>
+ <li>Safety tweak for position-related Flash bug when loading new sounds</li>
+ <li class="in">Highly-expanded documentation (<code>SMSound</code> events + properties, examples, caveats, FAQs etc.)</li>
+ <li>Added time-sensitive light/dark theme for documentation</li>
+ </ul>
+
+ </li>
+
+ <li class="old">
+
+ <h3>V2.0b.20070201</h3>
+ <p class="compact">Second beta?</p>
+ <p><em>Changelog</em>:</p>
+ <ul class="nested">
+ <li>Fixed stopAll() bug (previously broken)</li>
+ <li>Added <code class="in">nullURL</code> parameter</li>
+ <li>Updated documentation</li>
+ </ul>
+ <h3>V2.0b.20070123</h3>
+ <h3>V2.0b.20070118</h3>
+ <h3>V2.0b.20070115</h3>
+ </li>
+
+ <li class="old">
+ <h3>V2.0b.20070107</h3>
+ <p class="compact">First beta</p>
+ </li>
+
+ <li class="old">
+ <h3>V2.0a.20060904</h3>
+ <p class="compact">Prerelease alpha</p>
+ </li>
+
+ </ul>
+
+ <!-- <script type="text/javascript">document.getElementById('revision-list').className += ' hide-old';</script> -->
+
+ </div>
+
+ </div>
+
+ </div>
+
+
+ <div id="col3" class="c3">
+
+
+ <div id="get-satisfaction" class="box">
+ <div id="gsfn_list_widget">
+ <h2><a href="http://getsatisfaction.com/schillmania/products/schillmania_soundmanager_2/" title="User discussion, FAQs and support for SoundManager 2" rel="nofollow">Discussion / Support</a><span class="l"></span><span class="r"></span></h2>
+ <div id="gsfn_content"></div>
+ <div class="powered_by"><a href="http://getsatisfaction.com/">Get Satisfaction support network</a></div>
+ </div>
+ <!-- /.box -->
+
+ </div>
+
+ <div id="shortcuts">
+
+<!--
+ <div class="box">
+
+ <h2>Shortcuts<span class="l"></span><span class="r"></span></h2>
+
+ <ul class="first">
+ <li onclick="setFilter(event,'c-')" class="ignore">
+
+ <ul>
+
+ <li>Demos</li>
+ <li>Getting Started</li>
+ <li>Basic Use</li>
+ <li>Download</li>
+ <li>Requirements</li>
+ <li>Limitations</li>
+
+ <li>Debug Output</li>
+ <li>Revision History</li>
+ <li>About</li>
+ </ul>
+
+ </li>
+ </ul>
+
+ </div>
+-->
+
+ </div>
+
+
+
+ </div>
+
+ <div class="clear"></div>
+
+ <!-- /main -->
+ </div>
+
+ <!-- /content -->
+ </div>
+
+<script type="text/javascript">
+init();
+</script>
+
+</body>
+
+</html>
diff --git a/docs/dymaxion/soundmanagerv297a-20101010/doc/getstarted/index.html b/docs/dymaxion/soundmanagerv297a-20101010/doc/getstarted/index.html new file mode 100755 index 0000000..9f096af --- /dev/null +++ b/docs/dymaxion/soundmanagerv297a-20101010/doc/getstarted/index.html @@ -0,0 +1,549 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+<title>SoundManager 2 Tutorial: Getting Started</title> +<meta name="robots" content="noindex" />
+<meta name="description" content="SoundManager 2 tutorial, example code, how to get started guide including and configuring SoundManager 2 for playing MP3 audio via Javascript." />
+<meta name="keywords" content="soundmanager2 tutorial, javascript sound, javascript audio, javascript play mp3, javascript sound control, 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" />
+<link rel="stylesheet" type="text/css" media="screen" href="../../troubleshoot/debug.css" />
+<script type="text/javascript" src="../../script/soundmanager2.js"></script>
+<script type="text/javascript" src="../../demo/index.js"></script>
+<script type="text/javascript">
+ soundManager.useFlashBlock = true;
+ soundManager.debugMode = true;
+ soundManager.debugFlash = true; // enable flash debug output for this page
+ soundManager.url = '../../swf/';
+ soundManager.onload = function() {
+ }
+</script>
+<script type="text/javascript" src="../../troubleshoot/debug.js"></script>
+</head>
+
+<body>
+
+<div id="content">
+
+ <div id="top">
+
+ <h1>SoundManager 2: Getting Started</h1>
+
+ <div id="nav">
+ <ul>
+
+ <li>
+ <a href="../../">Home</a>
+ </li>
+
+ <li>
+ <a href="#">Demos</a>
+ <ul>
+ <li><a href="../../demo/api/">API Examples</a></li>
+ <li><a href="../../demo/play-mp3-links/" class="exclude">Playable MP3 links</a></li>
+ <li><a href="../../demo/mp3-player-button/" class="exclude">Basic MP3 Play Button</a></li>
+ <li><a href="../../demo/page-player/">Muxtape-style UI</a></li>
+ <li><a href="../../demo/360-player/">360° Player UI</a></li>
+ <li><a href="../../demo/mpc/">Drum Machine (MPC)</a></li>
+ <li><a href="../../demo/animation/">DOM/Animation Demos</a></li>
+ <li><a href="../../demo/flashblock/">FlashBlock Handling</a></li>
+ <li><a href="../../demo/template/">Basic Template</a></li>
+ </ul>
+ </li>
+
+ <li>
+ <strong><a href="../getstarted/">Getting Started</a></strong>
+ <ul>
+ <li><a href="../getstarted/#how-sm2-works">How SoundManager 2 works</a></li>
+ <li><a href="../getstarted/#basic-inclusion">Including SM2 on your site</a></li>
+ <li><a href="../getstarted/#troubleshooting">Troubleshooting</a></li>
+ </ul>
+ </li>
+
+ <li>
+ <a href="..">Documentation</a>
+ <ul>
+ <li><a href="../#sm-config">SoundManager Properties</a></li>
+ <li><a href="../#sound-object-properties">Sound Object Properties</a></li>
+ <li><a href="../#smdefaults">Global Sound Defaults</a></li>
+ <li><a href="../#api">SoundManager Core API</a></li>
+ <li><a href="../#smsoundmethods">Sound Object (SMSound) API</a></li>
+ </ul>
+ </li>
+
+ <li>
+ <a href="../download/">Download</a>
+ <ul>
+ <li><a href="../download/#latest">Get SoundManager 2</a></li>
+ <li><a href="../download/#revision-history">Revision History</a></li>
+ </ul>
+ </li>
+
+ <li>
+ <a href="../technotes/">Technical Notes</a>
+ <ul>
+ <li><a href="../technotes/#requirements">System Requirements</a></li>
+ <li><a href="../technotes/#debug-output">Debug + Console Output</a></li>
+ </ul>
+ </li>
+
+ <li>
+ <a href="../resources/">Resources</a>
+ <ul>
+ <li><a href="../resources/#licensing">Licensing</a></li>
+ <li><a href="../resources/#related">Related Projects</a></li>
+ <li><a href="http://getsatisfaction.com/schillmania/products/schillmania_soundmanager_2/">SM2 support / discussion</a></li>
+ <li><a href="http://www.schillmania.com/content/react/contact/">Contact Info @ Schillmania.com</a></li>
+ </ul>
+ </li>
+
+ </ul>
+ <div class="clear"></div>
+ </div>
+
+ </div>
+
+ <div id="main" class="triple">
+
+ <div class="columnar">
+ <div class="c1">
+ <h2>How SoundManager Works</h2>
+ <p>It starts out easy, but you can go down the rabbit hole if you want.</p>
+ </div>
+
+ <div class="c2">
+
+ <div class="f-block">
+
+ <!--
+ <p style="margin-top:1px"><strong><strong>SoundManager 2 makes it easier to play MP3 audio cross browser / platform, using Javascript.</strong></strong></p>
+ -->
+
+ <h3>SoundManager 2 Tutorial: What, Why, How</h3>
+
+ <p><strong>Problem:</strong> Browsers lack good, consistent native audio support. (HTML 5's <code>Audio()</code> is the future, but does not have majority support yet.)</p>
+ <p><strong>Solution:</strong> Javascript API via Flash + ExternalInterface, works almost everywhere. If HTML5 audio support is enabled, flash fallback used for browsers that don't support "non-free" MP3 + MP4 formats.</p>
+ <p>SoundManager 2 wraps and extends both the Flash and HTML Audio Sound APIs, providing a single, unified sound API to Javascript; the API is the same, whether HTML or Flash is ultimately used to play sound. (The flash portion is hidden, transparent to both developers and end users.)</p>
+
+ </div>
+
+ <div class="f-block c-basic-use">
+
+
+ <h4 id="basic-inclusion">Including SoundManager</h4>
+
+ <p>The soundmanager2.js core can get down to 10 KB over the wire, depending on what version you use. A few versions of the SM2 script are available, balancing code size between commented, debug-enabled and production-optimized builds.</p>
+ <p>Regardless of which build you use, take advantage of <a href="http://developer.yahoo.com/performance/rules.html#gzip" title="Best Practices for Speeding Up Your Web Site (Yahoo Developer Network)">gzip compression</a> on your server for big savings. As shown below, SoundManager 2 compresses quite well with gzip; the full debug-enabled version served <i>with</i> gzip is smaller than even the minified, no-debug version served without it.</p>
+
+ <table id="sm2-filesizes" cellpadding="0" cellspacing="0">
+
+ <tr>
+ <th>Build version</th>
+ <th>Recommended use</th>
+ <th class="nw">File size</th>
+ <th class="nw">+ <a href="http://www.sergeychernyshev.com/blog/speed-up-your-site-drop-in-htaccess-file/" title="Friends don't let friends run websites without gzip!">gzip</a></th>
+ </tr>
+
+ <tr>
+ <td>
+ <p>Original, formatted debug-enabled version with comments. Passes <a href="http://jslint.com" title="jslint, the JavaScript code quality tool.">jslint</a>.</p>
+ <pre><script src="<span>soundmanager2.js</span>"></script></pre>
+ </td>
+ <td>Development, testing, debugging</td>
+ <td class="nw">90 KB</td>
+ <td class="nw">~25 KB</td>
+ </tr>
+
+ <tr>
+ <td>
+ <p>Minified (Google Closure Compiler-munged, no comments or whitespace), debug-enabled version</p>
+ <pre><script src="<span>soundmanager2-jsmin.js</span>"></script></pre>
+ </td>
+ <td>Production, with debug code</td>
+ <td class="nw">42 KB</td>
+ <td class="nw">~14 KB</td>
+ </tr>
+
+ <tr>
+ <td>
+ <p>Build-script optimized, minified, no-debug version</p>
+ <pre><script src="<span>soundmanager2-nodebug-jsmin.js</span>"></script></pre>
+ </td>
+ <td>Production-optimized, debug code removed</td>
+ <td class="nw">30 KB</td>
+ <td class="nw booyaa" title="Best-case scenario for load time/performance">~9.5 KB!</td>
+ </tr>
+
+ </table>
+
+ <p>You then need to tell SM2 where to find the flash .SWF it will need (if no HTML5 support), and optionally what version of Flash (~3 KB for flash 8, ~10 KB for flash 9) depending on what API features you want, as well as other features:</p>
+
+<pre>
+<script>
+soundManager.url = '<span>/path/to/swf-files/</span>';
+soundManager.flashVersion = 9; <span><span>// optional: shiny features (default = 8)</span></span>
+soundManager.useFlashBlock = false; <span><span>// optionally, enable when you're ready to <a href="../../demo/flashblock/" title="SoundManager 2 flash block handling demo">dive in</a></span></span>
+<span><span>// enable <a href="../#soundmanager-usehtml5audio">HTML5 audio support</a>, if you're feeling adventurous. iPad/iPhone will always get this.</span></span>
+<span><span>// soundManager.useHTML5Audio = true;</span></span>
+</script></pre>
+
+<p>If you plan to eventually use the flash block handling feature (disabled in this example), you'll want to look at the <a href="../../demo/flashblock/" title="SoundManager 2 flash block handling demo">flash block demo</a> and include the relevant CSS it uses.</p>
+
+
+
+ <h4 id="basic-template">Basic SoundManager Template</h4>
+
+ <p>For a live example of a page including SoundManager 2, check the <a href="../../demo/template/" title="SoundManager 2 template example" onclick="checkDomain(this)">bare-bones template</a>.</p>
+
+ <h4 id="file-structure">SoundManager File Structure</h4>
+ <p>Or, "What you get when you download SM2."</p>
+ <p>The core audio API bits require <code>script/soundmanager2.js</code> and the SWF files <code>swf/soundmanager2.swf</code> and <code>swf/soundmanager2_flash9.swf</code>, as well as the <code>_debug</code> versions of the SWFs. The flash 9 SWF enables some extra API features, and is only used if you set <code>soundManager.flashVersion = 9</code> (the default is 8.)</p>
+
+ <ul class="file-structure">
+ <li>
+ soundmanager2/
+ <ul>
+ <li>
+ demo/ <span>- Examples, MP3 player UIs etc.</span>
+ </li>
+ <li>
+ doc/ <span>- API method documentation, notes, troubleshooting</span>
+ </li>
+ <li class="core">
+ script/ <span>- API core, soundmanager2.js</span>
+ </li>
+ <li>
+ src/ <span>- AS2/AS3 Flash source used to build SWFs (for flash development)</span>
+ </li>
+ <li class="core">
+ swf/ <span>- API core, SoundManager 2 .SWF files</span>
+ </li>
+ <li>
+ troubleshoot/ <span>- Tool for finding/fixing startup issues</span>
+ </li>
+ </ul>
+ </li>
+ </ul>
+
+<h4 id="tech-architecture">How SoundManager 2 Really Works</h4>
+
+<p>SoundManager 2 is the result of Javascript talking to a hidden Flash movie. The Flash layer is not something you have to work with directly, but it is the component which makes audio control possible behind the scenes.</p>
+
+<div class="figure">
+
+ <div class="code">
+ <span>soundmanager2.js</span> <span class="mid"><-flash externalinterface magic-></span> <span>soundmanager2.swf</span> <span class="mid"><- HTTP -></span> <span>.mp3/.mp4</span>
+ </div>
+
+</div>
+
+<p>Flash can expose methods to Javascript via ExternalInterface, allowing bi-directional calls to be made and thus providing additional functionality to Javascript.</p>
+
+<p>For the real gory details on the behind-the-scenes action of JS + Flash, see <a href="http://www.schillmania.com/content/entries/2010/how-soundmanager2-works/" title="How SoundManager 2 works (JS + ExternalInterface + Flash)">How SoundManager 2 Works</a> on schillmania.com.</p>
+
+
+ </div>
+
+ <div class="f-block f-onload">
+
+ <h4>Startup / Initialization</h4>
+
+ <p>In brief, here is now SM2 starts up:</p>
+ <ul>
+ <li>soundmanager2.js loads</li>
+ <li>new SoundManager() constructor call, event listeners attached for dom ready/init</li>
+ <li>document.createElement('embed') (or 'object' for IE), append Flash .SWF to document</li>
+ <li>SWF loads, Flash makes call to JS function: "Hi, JS!"</li>
+ <li>JS -> Flash test (JS calls Flash function): "Hello, Flash!"</li>
+ <li>-- startup is complete, soundManager.onready() fires --</li>
+ </ul>
+
+ <p class="in">A single Javascript include will link in all of the required code for the library, which will automatically begin loading either at <code>onDOMContentLoaded()</code> if supported, or alternately, after <code>window.onload()</code> (eg., IE 6 and others.) The default behaviour is to start "as soon as possible", but the library can be configured to wait for <code>window.onload()</code> in all cases as well. Loading and initialisation are separate events.</p>
+
+ <p class="in">Once initialised, SM2 will call event handlers/listeners registered via <code>soundManager.onready()</code>. There are also "old-skool" onload()/onerror() event handlers which you can define just as you would with <code>window.onload()</code>.</p>
+
+ <p>If you want to lazy-load or defer SM2, see <a href="#lazy-loading" title="Lazy-loading SM2 and SM2_DEFER object">Lazy-loading and SM2_DEFER</a>.</p>
+
+ <h4>SoundManager onready/onload/onerror Event Handlers</h4>
+
+ <p><code>onready()</code> is the most flexible and can be used to queue numerous listeners for SM2's start-up. It is a single handler for completion of start-up. Simply pass a callback function, and check <code>soundManager.supported()</code> to know whether sound is available or not:</p>
+
+<pre class="block"><code>soundManager.onready(function() {
+ if (soundManager.supported()) {
+ <span><span>// SM2 is ready to go!</span></span>
+ makeSomeNoise(); <span><span>// soundManager.createSound(), etc.</span></span>
+ } else {
+ <span><span>// unsupported/error case</span></span>
+ }
+});</code></pre>
+
+ <p>The above example is simplified, slightly; <code>onready()</code> also passes an object literal parameter to your handler that indicates success/fail, so you can check state without having to use <code>soundManager.supported()</code>. For more examples and detail, see <a href="../#soundmanager-onready">soundManager.onready()</a>.</p>
+
+ <h4>SoundManager onload() + onerror()</h4>
+
+<p>A more traditional, less-flexible style of event handling is to assign single onload() / onerror() handlers. You should use <code>onready()</code> as it can be assigned at any time once soundManager has been defined, and is more robust.</p>
+
+<pre class="block"><code>soundManager.onload = function() {
+ <span><span>// SM2 is ready to go!</span></span>
+ makeSomeNoise(); <span><span>// soundManager.createSound(), etc.</span></span>
+}
+
+soundManager.onerror = function() {
+ <span><span>// SM2 could not start, no sound support, something broke etc. Handle gracefully.</span></span>
+ disableSoundInMyApp(); <span><span>// for example</span></span>
+}</code></pre>
+
+ <h4 id="lazy-loading">Lazy-loading SM2 (deferred start-up): SM2_DEFER</h4>
+
+ <p>Let's say you wanted to load and start SM2 after your page has loaded, using Javascript to insert a script node etc., or otherwise only start SM2 conditionally. You can edit soundmanager2.js and take out the SoundManager() constructor call at the bottom, <i>or</i> set the global variable SM2_DEFER = true which will have the same effect.</p>
+ <p>Example:</p>
+
+<pre class="block"><code>function lazy_load_sm2() {
+ window.SM2_DEFER = true;
+ <span><span>// -- load soundmanager2.js via <script>, createElement('script') or XHR etc. --
+ // imaginary load_script() function ..</span></span>
+ load_script('<span>/path/to/soundmanager2.js</span>', function() {
+ <span><span>// once soundmanager2.js has loaded and has parsed, construct + init.</span></span>
+ window.soundManager = new SoundManager(); <span><span>// Flash expects window.soundManager.</span></span>
+ soundManager.beginDelayedInit(); <span><span>// start SM2 init.</span></span>
+ });
+}</code></pre>
+
+ <p>For a live demo, check out the <a href="../../demo/template/deferred-example.html" title="SoundManager 2 deferred loading example">deferred loading example</a>.</p>
+
+ </div>
+
+
+ </div>
+
+ </div>
+
+ <div class="columnar">
+
+ <div class="c1">
+ <h2>Sound Options Object Format</h2>
+ <p>Object Literal, JSON-style data passed to <code>createSound()</code> and <code>play()</code></p>
+ </div>
+
+ <div class="c2">
+
+ <div class="f-block s-onload"> <!-- f-createsound s-sid s-url s-autoload s-autoplay s-onload -->
+
+ <h3 id="object-literal-format">Object Literal Format</h3>
+
+ <p>Sounds can be created with instance-specific parameters in an object literal (JSON-style) format, where omitted parameters inherit default values as defined in soundManager.</p>
+
+<pre class="block"><code>soundManager.createSound({
+ id: '<span>mySound</span>',
+ url: '<span>/path/to/some.mp3</span>',
+ autoLoad: <span>true</span>,
+ autoPlay: <span>false</span>,
+ onload: <span>function() {
+ alert('<span>The sound </span>'+<span>this.sID</span>+'<span> loaded!</span>');
+ }</span>,
+ volume: <span>50</span>
+</span>});</code></pre>
+
+ <p>This object can also be passed as an optional argument to the <code class="in">play</code> method, overriding options set at creation time.</p>
+
+ <p>For a full list of available options, see <a href="../#sound-properties" title="SoundManager 2 API info: Sound Properties" onclick="resetFilter()">Sound Properties Object</a></p>
+
+ </div>
+
+
+ </div>
+
+ </div>
+
+ <div class="columnar">
+ <div class="c1">
+ <h2>"Use Responsibly"</h2>
+ <p>Only you can prevent audio pollution?</p>
+ </div>
+
+ <div class="c2">
+
+ <div class="f-block">
+
+ <h3>A Word Of Vice</h3>
+ <p>Not every button, link, element or paragraph on the web needs to zoom, move, change colour <em>and</em> be noisy, repetitive and annoying all at the same time. Use your own discretion!</p>
+ <p>Sites which automatically start playing background sound, and/or don't have volume or mute controls are the kind of things you should avoid building. As a developer, gentle reader, you may eventually find yourself in such a situation. Please do your part in enhancing the web with sound if you use SM2, while at the same time keeping it audibly usable. :)</p>
+
+ </div>
+
+ </div>
+
+ </div>
+
+ <div id="troubleshooting" class="columnar">
+
+ <div id="troubleshooting-flash8" class="c1">
+ <h2 id="troubleshooting-flash9">Troubleshooting</h2>
+ <p>Console-style messaging, useful for troubleshooting start-up and runtime issues.</p>
+ </div>
+
+ <div id="troubleshooting-flash9-highperformance" class="c2">
+
+ <h3>SoundManager 2 Start-up and Debug Tools</h3>
+ <p>This troubleshooting tool can come in handy for debugging SM2 start-up problems.</p>
+
+ <p class="note">Flash options: <a href="#troubleshooting-flash8" onclick="window.location.replace(this.href);window.location.reload()">Flash 8</a> (default), <a href="#troubleshooting-flash9" onclick="window.location.replace(this.href);window.location.reload()">Flash 9</a> (normal) or <a href="#troubleshooting-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>
+ First time opening SM2 after downloading it? 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>
+
+ <p>Flash detection code from <a href="http://www.featureblend.com/javascript-flash-detection-library.html" title="Javascript flash detection library">Flash Detect</a> (featureblend.com)</p>
+
+ <h3 id="flashdebug">Flash Movie Debug Output</h3>
+ <p>When <code>soundManager.debugFlash = true</code>, Flash will write debug info as text to the flash movie. This can be helpful for troubleshooting Flash/JS issues when timeouts or security errors are involved which prevent Flash from talking to Javascript, potentially hiding useful debug information. A CSS class of <code>flash_debug</code> will also be appended to the Flash <code>#sm2-container</code> DIV element when enabled, if you wish to style it differently.</p>
+ <p>You can also specify ?debug=1 in the URL to the SWF, and it will write debug output. Try <a href="../../swf/soundmanager2_debug.swf?debug=1" title="Test debug output" class="norewrite">soundmanager2_debug.swf?debug=1</a>, or <a href="../../swf/soundmanager2_flash9_debug.swf?debug=1" title="Test debug output, Flash 9" class="norewrite">soundmanager2_flash9_debug.swf?debug=1</a>.
+
+ <div id="sm2-container">
+ <!-- flash movie with debug output goes here -->
+ </div>
+
+ <h3>Live Debug Output</h3>
+ <p>SoundManager 2 relies on Javascript and Flash communicating via ExternalInterface, and this is subject to a number of timing, loading and browser security conditions. Because of this complexity, debug information is essential for troubleshooting start-up, loading, initialization and error conditions between Flash and Javascript.</p>
+ <p class="in">With debug mode enabled via <code>soundManager.debugMode = true</code>, SM2 can write helpful troubleshooting information to javascript <code>console.log()</code>-style interfaces. Additionally, output can be written to an optional DIV element with the ID of "<code>soundmanager-debug</code>".</p>
+ <p>If loading from the local filesystem (offline eg. file://, not over HTTP), Flash security is likely preventing SM2 from talking to Javascript. You will need to add this project's directory to the trusted locations in the <a href="http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html">Flash global security settings panel</a>, or simply view this page over HTTP.</p>
+ <p>Below is a live example of debug output.</p>
+ <div id="live-debug" class="block">
+ <div id="soundmanager-debug" class="code">
+ <!-- live debug goes here -->
+ </div>
+ </div>
+ <p>For more examples of live debug output, see the <a href="../../demo/template/" title="Basic SoundManager 2 template">Basic Template</a>, <a href="../../demo/api/" title="API demo">API demo</a> and other demos in the top navigation.</p>
+
+ <h3>Standalone version of troubleshooting tool</h3>
+ <p class="in">For debugging your development/production environment with this widget, see the <a href="../../troubleshoot/" title="SoundManager 2: Standalone debug widget">troubleshooting</a> subdirectory of the SoundManager 2 package.</p>
+
+ </div>
+
+ </div>
+
+ <div id="col3" class="c3">
+
+
+ <div id="get-satisfaction" class="box">
+ <div id="gsfn_list_widget">
+ <h2><a href="http://getsatisfaction.com/schillmania/products/schillmania_soundmanager_2/" title="User discussion, FAQs and support for SoundManager 2" rel="nofollow">Discussion / Support</a><span class="l"></span><span class="r"></span></h2>
+ <div id="gsfn_content"></div>
+ <div class="powered_by"><a href="http://getsatisfaction.com/">Get Satisfaction support network</a></div>
+ </div>
+ <!-- /.box -->
+
+ </div>
+
+ <div id="shortcuts">
+
+ </div>
+
+
+
+ </div>
+
+ <div class="clear"></div>
+
+ <!-- /main -->
+ </div>
+
+ <!-- /content -->
+ </div>
+
+<script type="text/javascript">
+init();
+sm2DebugInit();
+</script>
+
+</body>
+
+</html>
diff --git a/docs/dymaxion/soundmanagerv297a-20101010/doc/index.html b/docs/dymaxion/soundmanagerv297a-20101010/doc/index.html new file mode 100755 index 0000000..9411539 --- /dev/null +++ b/docs/dymaxion/soundmanagerv297a-20101010/doc/index.html @@ -0,0 +1,1667 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+<title>SoundManager 2: Documentation</title> +<meta name="robots" content="noindex" />
+<meta name="description" content="API documentation for SoundManager 2, a JavaScript-based MP3 and MP4 audio API. BSD licensed." />
+<meta name="keywords" content="javascript sound, javascript audio, documentation, api documentation, soundmanager 2" />
+<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" />
+<link rel="stylesheet" type="text/css" media="screen" href="../demo/flashblock/flashblock.css" />
+<script type="text/javascript" src="../script/soundmanager2.js"></script>
+<script type="text/javascript" src="../demo/index.js"></script>
+<script type="text/javascript">
+ soundManager.useFlashBlock = false;
+ soundManager.debugMode = false;
+ soundManager.url = '../swf/';
+ soundManager.onload = function() {
+ }
+</script>
+</head>
+
+<body id="doc">
+
+<div id="content">
+
+ <div id="top">
+
+ <h1>SoundManager 2: Documentation</h1>
+
+ <div id="nav">
+ <ul>
+
+ <li>
+ <a href="..">Home</a>
+ </li>
+
+ <li>
+ <a href="#">Demos</a>
+ <ul>
+ <li><a href="../demo/api/">API Examples</a></li>
+ <li><a href="../demo/play-mp3-links/" class="exclude">Playable MP3 links</a></li>
+ <li><a href="../demo/mp3-player-button/" class="exclude">Basic MP3 Play Button</a></li>
+ <li><a href="../demo/page-player/">Muxtape-style UI</a></li>
+ <li><a href="../demo/360-player/">360° Player UI</a></li>
+ <li><a href="../demo/mpc/">Drum Machine (MPC)</a></li>
+ <li><a href="../demo/animation/">DOM/Animation Demos</a></li>
+ <li><a href="../demo/flashblock/">FlashBlock Handling</a></li>
+ <li><a href="../demo/template/">Basic Template</a></li>
+ </ul>
+ </li>
+
+ <li>
+ <a href="getstarted/">Getting Started</a>
+ <ul>
+ <li><a href="getstarted/#how-sm2-works">How SoundManager 2 works</a></li>
+ <li><a href="getstarted/#basic-inclusion">Including SM2 on your site</a></li>
+ <li><a href="getstarted/#troubleshooting">Troubleshooting</a></li>
+ </ul>
+ </li>
+
+ <li>
+ <strong><a href="#">Documentation</a></strong>
+ <ul>
+ <li><a href="#sm-config">SoundManager Properties</a></li>
+ <li><a href="#sound-object-properties">Sound Object Properties</a></li>
+ <li><a href="#smdefaults">Global Sound Defaults</a></li>
+ <li><a href="#api">SoundManager Core API</a></li>
+ <li><a href="#smsoundmethods">Sound Object (SMSound) API</a></li>
+ </ul>
+ </li>
+
+ <li>
+ <a href="download/">Download</a>
+ <ul>
+ <li><a href="download/#latest">Get SoundManager 2</a></li>
+ <li><a href="download/#revision-history">Revision History</a></li>
+ </ul>
+ </li>
+
+ <li>
+ <a href="technotes/">Technical Notes</a>
+ <ul>
+ <li><a href="technotes/#requirements">System Requirements</a></li>
+ <li><a href="technotes/#debug-output">Debug + Console Output</a></li>
+ </ul>
+ </li>
+
+ <li>
+ <a href="resources/">Resources</a>
+ <ul>
+ <li><a href="resources/#licensing">Licensing</a></li>
+ <li><a href="resources/#related">Related Projects</a></li>
+ <li><a href="http://getsatisfaction.com/schillmania/products/schillmania_soundmanager_2/">SM2 support / discussion</a></li>
+ <li><a href="http://www.schillmania.com/content/react/contact/">Contact Info @ Schillmania.com</a></li>
+ </ul>
+ </li>
+
+ </ul>
+ <div class="clear"></div>
+ </div>
+
+ </div>
+
+ <div id="main" class="triple">
+
+
+ <div id="filter-box" class="columnar">
+
+ <div class="c1">
+ <div id="reset-filter"></div>
+ </div>
+
+ <div class="c2">
+ <div id="search-results"><!-- search results for %s --></div>
+ </div>
+
+ </div>
+
+ <div id="soundmanager-properties" class="columnar">
+ <div class="c1">
+ <h2>SoundManager Configuration</h2>
+ <p>Flash URLs, version + performance options</p>
+ </div>
+ <div class="c2">
+
+ <h3>SoundManager Properties</h3>
+
+ <div class="f-block f-useconsole f-consoleonly f-waitforwindowload f-allowpolling f-nullurl f-usemoviestar f-allowscriptaccess">
+
+ <p class="in">SoundManager has properties which configure debug mode, flash movie path and other behaviours. At minimum, the <code>soundManager.url</code> property must be assigned a path used to look for the necessary flash movie.</p>
+
+<pre class="small block specialcommentblock"><code><span>allowPolling = true; <span>// enable flash status updates. Required for whileloading/whileplaying.</span>
+consoleOnly = false; <span>// if console is being used, do not create/write to #soundmanager-debug</span>
+debugMode = true; <span>// enable debugging output (div#soundmanager-debug, OR console..)</span>
+debugFlash = false; <span>// enable debugging output inside SWF, troubleshoot Flash/browser issues</span>
+flashLoadTimeout = 1000; <span>// ms to wait for flash movie to load before failing (0 = infinity)</span>
+flashVersion = 8; <span>// version of flash to require, either 8 or 9. Some features require 9.</span>
+nullURL = 'about:blank'; <span>// (Flash 8 only): URL of silent/blank MP3 for unloading/stop request.</span>
+url = '/path/to/swfs/'; <span>// path (directory) where SM2 .SWF files will be found.</span>
+useConsole = true; <span>// use firebug/safari console.log()-type debug console if available</span>
+useMovieStar = true; <span>// enable <a href="http://www.adobe.com/support/documentation/en/flashplayer/9/releasenotes.html#fixes_90115">Flash 9.0r115+</a> MPEG4 audio support</span>
+useFastPolling = false; <span>// fast timer=higher callback frequency, combine w/useHighPerformance</span>
+useHighPerformance = false;<span>// position:fixed flash movie for faster JS/flash callbacks</span>
+waitForWindowLoad = false; <span>// always delay soundManager.onload() until after window.onload()</span>
+wmode = 'transparent'; <span>// null, transparent, opaque (last two allow HTML on top of flash)</span>
+allowScriptAccess = 'always'; <span>// for scripting SWF (object/embed prop.), 'always' or 'sameDomain'</span>
+useFlashBlock = true; <span>// better handling of SWF if load fails, let user unblock. See <a href="../demo/flashblock/" title="SoundManager 2 flash block demo">demo</a>.</span>
+useHTML5Audio = false; <span>// <a href="#soundmanager-usehtml5audio">beta feature</a>: Use HTML5 Audio() where supported.</span>
+</span></code></pre>
+ <p>To modify global SoundManager default parameters for SM2 itself or for all sound objects, edit the main soundmanager2.js file (look for above section in code) or assign new values in your own application script before either <code class="in">onDOMContentLoaded()</code> or <code class="in">window.onload()</code> fire. (Specifically, both external and inline script blocks which immediately execute are OK.)</p>
+ <p>Example per-application override:</p>
+<pre class="block"><code><span>soundManager.debugMode = false; <span>// disable debug mode</span>
+soundManager.defaultOptions.volume = 33; <span>// set global default volume for all sound objects</span>
+</span></code></pre>
+
+ </div>
+
+ <div class="f-block f-debugmode">
+ <h4 id="soundmanager-debugmode">soundManager.debugMode</h4>
+ <p class="in"><code>soundManager.debugMode</code> configures SM2's debug behaviour, enabled (true) by default. When enabled, SoundManager 2 will write console-like output to <code>console.log()</code>-style javascript interfaces, and/or an HTML element with the ID <code>soundmanager-debug</code> (will be created if not found in the DOM at runtime.)</p>
+ <p>For a live example of debug output, see <a href="technotes/#debug-output" title="SoundManager 2 debug output demo">Debug + Console Output</a>.</p>
+ </div>
+
+ <div class="f-block f-debugflash">
+ <h4 id="soundmanager-debugflash">soundManager.debugFlash</h4>
+ <p class="in"><code>soundManager.debugFlash</code> configures SM2's flash debugging output, disabled (false) by default. When enabled, the Flash portion of SM2 will write debug statements within the Flash movie. This can be useful for troubleshooting Flash/JS/browser (ExternalInterface) issues and so on.</p>
+ <p>A CSS class of <code>flash_debug</code> will also be appended to the Flash <code>#sm2-container</code> DIV element when enabled, if you wish to style it differently.</p>
+ <p>For a live example, see <a href="getstarted/#flashdebug" title="SoundManager 2 flash debug output demo">Flash Movie Debug Output</a> in the Troubleshooting section.</p>
+ </div>
+
+ <div class="f-block f-url">
+ <h4 id="soundmanager-url">soundManager.url</h4>
+ <p class="in"><code>soundManager.url</code> specifies the "online", generally HTTP-based path which SM2 will load .SWF movies from. The "local" (current) directory will be used by default. The appropriate .SWF required (depending on the desired Flash version) will be appended to the URL.</p>
+ <p class="in">Example: <code>soundManager.url = '/path/to/swfs/';</code> (Note trailing slash)</p>
+ <p class="in">For cases where SM2 is being used "offline" in non-HTTP cases (eg., development environments), see <code>altURL</code>.</p>
+ </div>
+
+ <div class="f-block f-alturl">
+ <h4 id="soundmanager-alturl">soundManager.altURL</h4>
+ <p class="in"><code>soundManager.altURL</code> specifies an alternate path to <code>soundManager.url</code> which SM2 can load its SWF from. It is a simple convenience for when you may need to load SWFs from different paths depending on your hosting environment (eg., offline development vs. production.)</p>
+ <p class="in">Example: <code>soundManager.altURL = '../';</code> (Load from parent directory - note trailing slash)</p>
+ <p class="in">For altURL to be used, it must be defined and an "alternate environment" condition must be met:</p>
+ <p class="in"><code>soundManager.useAltURL = (!document.location.protocol.match(/http/i));</code></p>
+ <p>By default and as shown above, SM2 will use this property when the hosting page is not being served over HTTP, and thus is assumed to being served "offline" - for example, when loading via file://, from the local file system.</p>
+ <p>This can easily be adapted to taste, eg., checking the domain matching yourdomain.com vs. localhost:</p>
+ <p class="in"><code>soundManager.useAltURL = (!document.location.match(/mydomain.com/i));</code></p>
+ <p class="in">If <code>soundManager.altURL</code> is null (the default), <code>soundManager.url</code> will be used for all cases.</p>
+ </div>
+
+ <div class="f-block f-flashversion">
+
+ <h4 id="soundmanager-flashversion">soundManager.flashVersion</h4>
+
+ <p class="in">SoundManager 2 started with a Flash 8 base requirement, but can also now use Flash 9 and take advantages of some new features Flash 9 offers. By default Flash 8 will be used, but the version can be easily changed by setting <code>flashVersion</code> appropriately.</p>
+
+ <p class="in">Example: <code>soundManager.flashVersion = 9;</code></p>
+
+ <p class="in">The Flash 8 version is <code>soundmanager2.swf</code>, and the flash 9 version is <code>soundmanager2_flash9.swf</code>, accordingly. Note that only Flash 8 and Flash 9 are supported at this time; other values will result in errors.</p>
+
+ </div>
+
+
+ <div class="f-block f-flashversion">
+
+ <p>New Flash 9-only features:</p>
+
+ <ul>
+ <li class="in">MPEG-4 (HE-AAC/H.264) audio support</li>
+ <li class="in">True "multi-shot" sound behaviour. <code>play()</code> can be called multiple times, giving a layered, "chorus" effect. Sound will also fire <code>onfinish()</code> multiple times. (Previous behaviour did not layer sounds, but would re-play a single instance.)</li>
+ <li class="in"><code>waveformData</code> array: 256 waveform data values available while playing sound</li>
+ <li class="in"><code>eqData</code> array: 256 EQ spectrum data values available while playing sound</li>
+ <li class="in"><code>peakData</code> object: Left and right channel peak/volume data available while playing sound</li>
+ </ul>
+
+ </div>
+
+
+ <div class="f-block f-flashloadtimeout">
+ <h4 id="soundmanager-flashloadtimeout">soundManager.flashLoadTimeout</h4>
+ <p class="in">After initializing the flash component during start-up, SM2 will wait for a defined period of time before timing out and calling <code>soundManager.onerror()</code>.</p>
+ <p>The default value is 1000 (msec.) Setting a value of 0 disables the timeout and makes SM2 wait indefinitely for a call from the flash component. If you want to handle flash block-type situations, see <a href="#soundmanager-useflashblock" onclick="resetFilter()">soundManager.useFlashBlock</a>.</p>
+ <p>Setting this parameter to 0 may be useful when attempting to gracefully recover from a flashBlock situation, where the user has whitelisted the movie after it was blocked etc.</p>
+ <p>Note that when the timeout is disabled, soundManager will not fire its onerror() handler if there is an error at the flash loading stage.</p>
+ </div>
+
+ <div class="f-block f-usefastpolling f-usehighperformance">
+ <h4 id="soundmanager-usefastpolling">soundManager.useFastPolling</h4>
+ <p>By default <code>useFastPolling = false</code>, and thus SoundManager uses a 20-milisecond timer inside Flash when polling for updated sound properties such as <code>bytesLoaded</code> and data and event callbacks eg. <code>whileloading()</code>, <code>whileplaying()</code> and so on. With <code>useFastPolling = true</code>, a 1-msec timer is used and callback frequency may noticeably increase. This is best combined with <code>useHighPerformance</code> for optimal results.</p>
+ </div>
+
+ <div class="f-block f-usehighperformance f-usefastpolling">
+ <h4 id="soundmanager-highperformance">soundManager.useHighPerformance</h4>
+ <p>Perhaps intuitively, Flash is given higher priority when positioned within the viewable area of the browser, at least 6px in height (oddly), fully-opaque, visible and displayed on the screen. By default, <code class="in">soundManager.useHighPerformance</code> is enabled and should noticeably reduce JS/flash lag and increase the frequency of callbacks such as <code class="in">whileplaying()</code> in some circumstances.</p>
+ <p><code class="in">soundManager.useHighPerformance = true;</code></p>
+ <p>This has made a noticeable impact in responsiveness on Mac OS X, and Safari on Windows; animation lag is practically non-existent (see <a href="../demo/animation-2b/" title="SoundManager JS + DOM + sound demo 2b" style="display:inline" onclick="checkDomain(this)">demo</a>). Because setting wmode=transparent and fixed position has been reported to cause some issues, the feature is disabled by default.</p>
+ <p>To be least-obtrusive, SM2 attempts to set position:fixed, and uses bottom/left:0px to stay within view (though using wmode=transparent where possible, to be hidden from view.) It occupies an 8x8px square. If you wish to position the movie yourself or show it inline, have a DIV element with the ID of <code class="in">sm2-container</code> present in the DOM for SM2 to reference and it will write the movie there without positioning.</p>
+ </div>
+
+ <div class="f-block f-useflashblock">
+ <h4 id="soundmanager-useflashblock" title="Recently-added feature" class="recent">soundManager.useFlashBlock</h4>
+ <p>Flash blockers (eg. FlashBlock, "Click To Flash") can prevent the flash portion of SM2 from loading, which will cause a start-up error with a time-out.</p>
+ <p>SM2 historically has kept the flash movie off-screen and out of view, and thus the user could not click on and unblock it. Now with <code>useFlashBlock = true</code>, the movie positioning can be handled by CSS. The initial state is still off-screen by default, but will change to be in view when a blocking (time-out) situation may be encountered. You can also edit the CSS to taste, of course.</p>
+ <p>When starting up, CSS classes are appended to the <code>#sm2-container</code> DIV (which you can provide, or SM2 will create and append to the document.) The CSS classes change with the state of SM2's start-up, eg. <code>#sm2-container.swf_timedout { border:1px solid red; }</code> could be used to highlight the movie to the user for unblocking and so on.</p>
+ <p>Setting <code>useFlashBlock = true</code> will cause SM2 to wait infinitely for the Flash content to load after an initial (non-fatal) timeout, having already waited for <code>flashLoadTimeout</code> to pass. If <code>flashLoadTimeout = 0</code>, SM2 will immediately go into "flash block mode" on start-up.</p>
+ <p>The relevant CSS is as follows:</p>
+<pre class="block"><code>#sm2-container {
+ <span><span>/* Initial state: position:absolute/off-screen, or left/top:0 */</span></span>
+}
+#sm2-container.swf_timedout {
+ <span><span>/* Didn't load before time-out, show to user.
+ Maybe highlight on-screen, red border, etc..? */</span></span>
+}
+#sm2-container.swf_unblocked {
+ <span><span>/* Applied if movie loads successfully
+ (flash started, so move off-screen etc.) */</span></span>
+}
+#sm2-container.swf_error {
+ <span><span>/* "Fatal" error case: SWF loaded,
+ but SM2 was unable to start for some reason.
+ (Flash security or other error case.) */</span></span>
+}
+#sm2-container.high_performance {
+ <span><span>/* Additional modifier for "high performance" mode
+ should apply position:fixed and left/bottom 0 to stay on-screen
+ at all times (better flash performance) */</span></span>
+}
+#sm2-container.flash_debug {
+ <span><span>/* Additional modifier for flash debug output mode
+ should use width/height 100% so you can read debug messages */</span></span>
+}</code></pre>
+
+ <p>For a live example, see the <a href="../demo/flashblock/">FlashBlock Demo</a>.</p>
+ </div>
+
+ <div class="f-block f-usehtml5audio">
+
+ <h4 id="soundmanager-usehtml5audio">soundManager.useHTML5Audio</h4>
+
+ <p><em><b style="color:#993333">Warning: Beta-ish, in-progress feature</b>; subject to bugs, API changes etc. By default, special check to enable feature for the Apple iPad 3.2+ (which does not support Flash) and Palm Pre, otherwise currently disabled by default. Works on iPhone OS 4.0 / iOS 4.0+.</em></p>
+ <p>Determines whether HTML5 <code>Audio()</code> support is used to play sound, if available, with Flash as the fallback for playing MP3/MP4 (AAC) formats. Browser support for HTML5 Audio varies, and format support (eg. MP3, MP4/AAC, OGG, WAV) can vary by browser/platform.</p>
+ <p>The SM2 API is effectively transparent, consistent whether using Flash or HTML5 <code>Audio()</code> for sound playback behind the scenes. The HTML5 Audio API is roughly equivalent to the Flash 8 feature set, minus ID3 tag support and a few other items. (Flash 9 features like waveform data etc. are not available.)</p>
+
+ <h5>SoundManager 2 + useHTML5Audio: Init Process</h5>
+
+ <p>At DOM ready (if useHTML5Audio = true), a test for <code>Audio()</code> is done followed by a series of <code>canPlayType()</code> tests to see if MP3, MP4, WAV and OGG formats are supported. If none of the "required" formats (MP3 + MP4, by default) are supported natively, then Flash is also added as a requirement for SM2 to start.</p>
+ <p><code>soundManager.audioFormats</code> currently defines the list of formats to check (MP3, MP4 and so on), their possible <code>canPlayType()</code> strings (long story short, it's complicated) and whether or not they are "required" - that is, whether Flash should be loaded if they don't work under HTML5. (Again, only MP3 + MP4 are supported by Flash.) If you had a page solely using OGG, you could make MP3/MP4 non-required, but many browsers would not play them inline.</p>
+ <p>SM2 will indicate its state (HTML 5 support or not, using Flash or not) in <code>console.log()</code>-style debug output messages when <code>debugMode = true</code>.</p>
+
+ <h5>"My browser does HTML5, why not MP3"?</h5>
+
+ <p>Despite best efforts, some browsers eg. Chrome on Windows may only return "maybe" for <code>Audio().canPlayType('audio/mpeg; codecs=mp3')</code> and variants; by default, SoundManager 2 will only assume a format is supported if a "probably" response is given. You can modify <code>soundManager.html5Test</code> to something like <code>/(probably|maybe)/i</code> if you want to be a bit riskier, but you should consider potential false positives.</p>
+
+ <p>At this time, only Safari and Chrome (excluding Chromium?) support MP3 and MP4 formats. Other browsers have excluded them because MP3 and MP4 are not "free" formats. For these cases, Flash is used as the fallback support for MP3/MP4 as needed.</p>
+
+ <h5>Bonus HTML5 formats: OGG, WAV</h5>
+
+ <p>WAVe (an old standard) and OGG (a MP3-like codec, except free) are both supported in a majority of browsers via HTML5, so SoundManager 2 will also test for support for these formats. A Flash fallback for these formats has not been implemented.</p>
+
+ <h5>Testing audio format support</h5>
+
+ <p>Once <code>soundManager.onready()</code> has fired and SM2 has started, you can check for support via a number of methods. Namely, <a href="#soundmanager-canplaylink">soundManager.canPlayLink()</a> will take an <code><a></code> element and check its <code>href</code> and <code>type</code> attributes, if available, for hints as to its format or type. You can also pass arbitrary URLs to <a href="#soundmanager-canplayurl">soundManager.canPlayURL()</a>, which will make a "best guess" based on the extension it finds. In any event, SM2 will return a true/false value from canPlay methods based on HTML and/or flash capabilities.</p>
+
+ <p>To see what formats are supported by HTML5, watch SM2's debug/console output when debug is enabled, or dump the contents of <code>soundManager.html5</code> to the console; it will show the results of tests for simple items like "mp3", as well as <code>canPlayType()</code> strings such as 'mpeg; codecs=mp3'
+
+ <h5>Apple iPad, iPhone, Palm Pre: Special Cases</h5>
+ <p>The "Big iPhone" doesn't do Flash, and does support HTML5 <code>Audio()</code> pretty decently - so SM2 makes a special exception to enable <code>useHTML5Audio</code> when it detects an iPad, iPhone or Palm Pre user agent string by default. Feel free to disable this if you wish.</p>
+ <p>iPad and iPhone require user interaction to start a sound, eg. the createSound() and play() call should happen within an onclick() handler on a link, etc. The "security" model here seems to be implemented similarly to the way pop-up blockers work. You may "chain" sounds (eg. create and play a new one) provided it is done via the onfinish() event of a sound initiated by a user, however. The Muxtape-style demo on the SM2 homepage uses this, and will advance the playlist on the iPad/iPhone if allowed.</p>
+ <p>iPad 3.2 gets hung up on the "BC quail" HE-AAC example sound for some reason, and endlessly loops it rather than finishing and moving on to the next item. May be an iPad playback bug, as other formats are fine. iPhone OS 4 (iOS 4) does not show this issue.</p>
+ <p>iPhone OS version < 3.1 doesn't work, but 3.1 (and possibly earlier versions, not verified) have a native <code>Audio()</code> object. However, they seem to simply not play sound when <code>play()</code> is called, so SM2 looks for and ignores the iPhone with these OS revisions.</p>
+ <p>The Palm Pre <a href="http://developer.palm.com/index.php?option=com_content&view=article&id=1741&Itemid=265#using_html_5_audio_objects" title="Palm Developer Center: Audio">supports</a> a number of MP3, MP4 and WAV formats (WebOS 1.4.1 was tested; it didn't seem to like MP3s at 192kbps, but 128kbps was fine.)</p>
+
+ <h5>Known HTML5 Audio bugs/limitations/annoyances</h5>
+
+ <p>As of the October, 2010 release of SM2 (V2.97a.20101010):</p>
+ <ul>
+ <li>HTML5 audio is disabled for all versions of Safari (4 and 5) on Snow Leopard (OS X 10.6.3 and 10.6.4) until Apple fixes issues with audio loading and playback due to bugs in "underlying frameworks." See <a href="https://bugs.webkit.org/show_bug.cgi?id=32159#c9" title="Safari Snow Leopard HTML5 Audio Bug">Webkit #32159</a>.</li>
+ </ul>
+
+ <p>As of the August, 2010 release of SM2 (V2.96a.20100822):</p>
+ <ul>
+ <li>Safari 5.0.1 (533.17.18) on Snow Leopard (10.6.x) continues to show buggy HTML5 audio load/playback behaviour. Apple are aware of the regression, which began with Safari 4.0 on Snow Leopard (perhaps with the new QuickTime.) See <a href="https://bugs.webkit.org/show_bug.cgi?id=32159#c9" title="Safari Snow Leopard HTML5 Audio Bug">Webkit #32159</a>.</li>
+ <li>iPad/iPhone iOS4 will now play a sequence of sounds if using <code>onfinish()</code> to create/start the next (eg., the Muxtape-style playlist on the SM2 homepage will play through once the user starts it.) In any event, user interaction is always required to start the first sound.</li>
+ </ul>
+
+ <p>As of the June, 2010 release of SM2 (V2.96a.20100624):</p>
+ <ul>
+ <li>Safari 5.0 (533.16) on OS X Snow Leopard (10.6.x) continues to show buggy HTML5 audio load/playback behaviour, same as with Safari 4.0.5 on Snow Leopard only - may be related to underlying QuickTime implementation (a guess, at this point.) SM2 will disable HTML5 audio support by default for this specific browser + OS combo. See <a href="https://bugs.webkit.org/show_bug.cgi?id=32159#c9" title="Safari Snow Leopard HTML5 Audio Bug">Webkit #32159</a> for discussion + testcases.</li>
+ </ul>
+
+ <p>As of the May, 2010 release of SM2 (V2.96a.20100520):</p>
+ <ul>
+ <li>Safari 4.0.5 on OS X Snow Leopard (10.6.x) appears to have an annoying bug where audio inconsistently fails to load / play; SM2 will currently disable or ignore the HTML5 feature on this exact browser + OS version. See <a href="https://bugs.webkit.org/show_bug.cgi?id=32159#c9" title="Safari Snow Leopard HTML5 Audio Bug">Webkit #32159</a> for discussion + testcases. Note that Safari on OS X 10.5 "Leopard" and on Windows <i>do not</i> appear to have this bug; it seems to be limited to Snow Leopard, seen on OS X 10.6.3.</li>
+ <li>Some browsers (and iPad 3.2?) do not fire <code>progress</code> events, and/or do not implement bytesLoaded/bytesTotal-style attributes.</li>
+ <li>iPad 3.2 appears to be able to only play one sound at a time, and will terminate other sounds.</li>
+ <li>iPad 3.2 may also loop AAC+ (HE-AAC) and WAV sounds, perhaps not firing onfinish() and resetting the position to 0 each time, but is fine with MP3s. This has been observed, but not fully-tested.</li>
+ <li>Looping in HTML5 is either "infinite" or "none". A wrapper may be created for SM2 so that a number of loops can be specified, as with Flash. This is not yet implemented.</li>
+ <li>Panning (left/right channel balance) does not appear to be in HTML5.</li>
+ <li>Flash-only features such as ID3 tag reading, waveform and spectrum data will simply be ignored, and their related events will not fire on SMSound objects which are using HTML5.</li>
+ </ul>
+
+ <h5>General Disclaimer</h5>
+ <p>HTML5 audio support may still be in flux, and may not be fully-supported or implemented consistently in modern browsers. Be careful out there.</p>
+ </div>
+
+ <div class="f-block f-wmode">
+ <h4 id="soundmanager-wmode">soundManager.wmode</h4>
+ <p>The <code>wmode</code> property is applied directly to the flash movie, and can be either <code>null</code>, <code>'window'</code>, <code>'transparent'</code> or <code>'opaque'</code>. By default if <code>useHighPerformance</code> is enabled, transparency will be attempted by SM2 unless there are known issues with the rendering mode.</p>
+ <p>It appears that non-IE browsers on Windows will not load SWF content "below the fold" (out of scrollable view) when wmode is set to anything other than null (window). This will break SM2 as it expects Flash to load within a reasonably short amount of time - so SM2 by default will reset wmode for this case. If you wish to force retention of your <code>wmode</code>, set <code>soundManager.flashTimeout = 0</code> which will ensure that if the content is below the fold, SM2 will not time out waiting for it to load.</p>
+ <p>Additionally, <code>soundManager.specialWmodeCase</code> will be set to <code>true</code> if wmode has been reset due to this special condition.</p>
+ </div>
+
+ </div>
+
+
+ </div>
+
+ <div id="api" class="columnar">
+
+ <div class="c1">
+ <h2>SoundManager Core API</h2>
+ <p>Methods for the soundManager object.</p>
+ </div>
+
+ <div class="c2">
+
+ <div class="f-block">
+
+ <h3>SoundManager Global Object</h3>
+
+ <p>This is a collection of methods, collections, properties and event handlers available via the <span class="code">soundManager</span> Javascript object. Sound properties and methods can be set on a global (inherited) default, or per-sound basis.</p>
+
+ </div>
+
+ <dl id="soundmanager-canplaylink" class="f-block f-canplaylink" style="margin-top:2em">
+ <dt><span>canPlay:boolean</span> canPlayLink(<span><a>:DOM element</span>)</dt>
+ <dd>Normalized method which checks <code>canPlayMIME()</code> and <code>canPlayURL()</code> as needed to estimate the playability of an HTML link; this means both the <code>href</code> and <code>type</code> attributes, if provided, are checked for matching file extension and/or MIME type patterns.</dd>
+ <dd>Example:
+<pre class="block"><code><span><span>/* example links:
+ <a id="song1" href="/music/player.php?songID=1" type="audio/mp3">play song 1</a> <span>// type match</span>
+ <a id="song2" href="song2.mp3">play song 2</a> <span>// URL match</span>
+*/</span></span>
+var aLink = document.getElementById('<span>mySong</span>');
+if (soundManager.canPlayLink(aLink)) {
+ soundManager.play('<span>mySongSound</span>',aLink.href);
+}</code></pre></dd>
+ </dl>
+
+ <dl id="soundmanager-canplaymime" class="f-block f-canplaymime">
+ <dt><span>canPlay:boolean</span> canPlayMIME(<span>MIMEtype:string</span>)</dt>
+ <dd>Returns a boolean indicating whether soundManager can play the given MIME type - eg., <code>audio/mp3</code>. The types supported vary based on Flash version and MPEG4 (MovieStar mode) options.</dd>
+ <dd>
+ MIME type patterns are as follows:
+ <ul>
+ <li>Defaults: <code>/^audio\/(?:x-)?(?:mp(?:eg|3))\s*;?/i;</code> - eg. <code>audio/mp3</code> or <code>audio/mpeg</code></li>
+ <li>MovieStar-only formats: <code>/^audio\/(?:x-)?(?:mp(?:eg|3)|mp4a-latm|aac|speex)\s*;?/i; </code> - eg. <code>audio/m4a or audio/aac</code></li>
+ </ul>
+ </dd>
+ <dd>Example:
+<pre class="block"><code><span><span>// link example: <a id="song1" href="foo.php?songID=1" type="audio/mp3">play song 1</a></span></span>
+var aLink = document.getElementById('<span>song1</span>');
+if (soundManager.canPlayLink(aLink)) {
+ soundManager.play('<span>song1Sound</span>',aLink.href);
+}</code></pre></dd>
+ <dd>If no <code>type</code> attribute is found, this method will return <code>null</code> instead of <code>false</code>.</dd>
+ </dl>
+
+ <dl id="soundmanager-canplayurl" class="f-block f-canplayurl">
+ <dt><span>canplay:boolean</span> canPlayURL(<span>mediaURL:string</span>)</dt>
+ <dd>Returns a boolean indicating whether soundManager can play the given URL. Playability is determined by a matching URL pattern set at runtime, based on Flash version and MPEG4 (MovieStar mode) support.</dd>
+ <dd>Example:
+<pre class="block"><code>var sURL = '<span>/path/to/some.mp3</span>';
+if (soundManager.canPlayURL(sURL)) {
+ soundManager.createSound('<span>fooSound</span>',sURL);
+}</code></pre></dd>
+ <dd>If no <code>href</code> attribute is found, this method will return <code>null</code> instead of <code>false</code>.</dd>
+ </dl>
+
+ <dl id="soundmanager-createsound" class="f-block f-createsound s-autoplay">
+
+ <dt style="margin-top:2em"><span>object:SMSound </span>createSound(<span>object:options</span>)</dt>
+ <dd title="object:options">Creates a sound with an arbitrary number of optional arguments. Returns a <code>SMSound</code> object instance. Requires <code>id</code> and <code>url</code> at a minimum.</dd>
+ <dd>
+ Example:
+<pre class="block"><code>soundManager.createSound({<span>
+ id: 'mySound', <span>// required</span>
+ url: '/audio/mysoundfile.mp3', <span>// required</span>
+ <span>// optional sound parameters here, see <a href="#sound-properties" title="SoundManager 2 API Info: Sound Properties Object" onclick="resetFilter()">Sound Properties</a> for full list</span>
+ volume: 50,
+ autoPlay: true,
+ whileloading: soundIsLoading
+</span>});</code></pre>
+ <p>Each <code>createSound()</code> call results in the creation of a <code>SMSound</code> object which stores all properties, methods and events relevant to that particular sound instance.</p>
+ <p>Individual sound objects can also easily be referenced as returned from <code>createSound()</code>:</p>
+<pre class="block"><code>var mySoundObject = soundManager.createSound({<span>
+ id: 'mySound',
+ url: '/audio/mysoundfile.mp3'
+</span>});
+mySoundObject.play(); <span><span>// SMSound object reference, same as soundManager.getSoundById('mySound')</span></span></code></pre>
+
+ <p>(Note: Code formatting is stylistic, not necessarily recommended.) See <a href="#object-literal-format" title="SoundManager 2 API Info: Sound Properties Object" onclick="resetFilter()">Object Literal Format</a>.</p>
+ </dd>
+ <dd>If <code>createSound</code> is called with the ID of an existing sound, that sound object will be returned "as-is". Any other <code>createSound</code> options passed (eg., <code>url</code> or <code>volume</code>, etc.) will be ignored.</dd>
+
+ </dl>
+
+ <dl id="soundmanager-createsound-overloaded" class="f-block f-createsound">
+ <dt><span>object:SMSound </span>createSound(<span>id:string,url:string</span>) - overloaded method</dt>
+ <dd title="id:string,url:string">Creates a sound with the specified ID and URL (simple two-parameter method.)</dd>
+ <dd>Example: <code>soundManager.createSound('<span>mySound</span>','<span>/audio/mysoundfile.mp3</span>');</code></dd>
+ </dl>
+
+ <dl id="soundmanager-destroysound" class="f-block f-destroysound">
+ <dt>destroySound(<span>id:string</span>)</dt>
+ <dd title="id:string">Stops, unloads and destroys a sound specified by ID.</dd>
+ <dd>Example: <code>soundManager.destroySound('<span>mySound</span>');</code></dd>
+ <dd>SMSound equivalent example: <code>mySound.destruct();</code></dd>
+ </dl>
+
+ <dl id="soundmanager-mute" class="f-block f-mute">
+ <dt><span>object:SMSound </span>mute(<span>[id:string]</span>)</dt>
+ <dd title="id:string">Mutes the sound specified by ID and returns that sound object. If no ID specified, all sounds will be muted and null is returned. Affects <span>muted</span> property (boolean.)</dd>
+ <dd>Example: <code>soundManager.mute('<span>mySound</span>');</code></dd>
+ </dl>
+
+ <dl id="soundmanager-onready" class="f-block f-onready">
+ <dt>onready(<span>callback:function(status),[scope]</span>)</dt>
+ <dd title="callback:function">Queue <code>onload()</code>-style event listener(s) processed at (or immediately, if added after) SM2 initialization, just before <code>soundManager.onload()</code> or <code>onerror()</code> are called. More flexible than single <code>soundManager.onload()</code> event, allows separate scripts to add listeners etc. An optional scope parameter can be specified; if none, the callback is scoped to the window.</dd>
+ <dd>Example: <code>soundManager.onready(<span>myOnReadyHandler</span>); soundManager.onready(<span>myOtherHandler</span>);</code></dd>
+ <dd>A "status" object is also passed to the callback, which can be safely ignored. It includes a "success" parameter, indicating the state of <code>soundManager.supported()</code>.</dd>
+ <dd>Example:
+<pre class="block"><code>soundManager.onready(<span>function(oStatus) {
+ if (oStatus.success) {
+ alert('Yay, SM2 loaded OK!');
+ } else {
+ alert('Oh snap, SM2 could not start.');
+ }
+}</span>);</code></pre>
+ <p>You may also check <code>soundManager.supported()</code> instead.</p>
+<pre class="block"><code>soundManager.onready(<span>function() {
+ if (soundManager.supported()) {
+ alert('Yay, SM2 loaded OK!');
+ } else {
+ alert('Oh snap, SM2 could not start.');
+ }
+}</span>);</code></pre>
+ </dd>
+ <dd>The same listener may be added multiple times; there is no duplicate checking. Queue is processed in order of addition.</dd>
+ <dd>If <code>soundManager.reboot()</code> is called, all listeners' "fired" flags will be reset and they will be eligible to fire again when SM2 starts up.</dd>
+ </dl>
+
+ <dl id="soundmanager-play" class="f-block f-play">
+ <dt><span>object:SMSound</span> play(<span>id:string,[options object]</span>)</dt>
+ <dd title="soundID:string">Starts playing the sound specified by ID. (Will start loading if applicable, and will play ASAP.)</dd>
+ <dd>Returns an <code>SMSound</code> (sound object) instance.</dd>
+ <dd>Example: <code>soundManager.play('<span>mySound</span>');</code></dd>
+ <dd>Note that the second parameter, <code>options object</code>, is not required and can take almost any argument from the object literal format (eg. volume.) It is convenient when you wish to override the sound defaults for a single instance.</dd>
+ <dd>Example: <code>soundManager.play('<span>mySound</span>',{<span>volume:50,onfinish:playNextSound</span>});</code></dd>
+ </dl>
+
+ <dl id="soundmanager-pause" class="f-block f-pause">
+ <dt><span>object:SMSound</span> pause(<span>id:string</span>)</dt>
+ <dd title="soundID:string">Pauses the sound specified by ID. Does not toggle. Affects <span>paused</span> property (boolean.) Returns the given sound object.</dd>
+ <dd>Example: <code>soundManager.pause('<span>mySound</span>');</code></dd>
+ </dl>
+
+ <dl id="soundmanager-pauseall" class="f-block f-pauseall">
+ <dt>pauseAll()</dt>
+ <dd>Pauses all sounds whose playState is >0. Affects <span>paused</span> property (boolean.)</dd>
+ <dd>Example: <code>soundManager.pauseAll();</code></dd>
+ </dl>
+
+ <dl id="soundmanager-reboot" class="f-block f-reboot">
+ <dt>reboot()</dt>
+ <dd title="soundID:string">Destroys any created SMSound objects, unloads the flash movie (removing it from the DOM) and restarts the SM2 init process, retaining all currently-set properties.</dd>
+ <dd>Example:
+<pre class="block"><code>soundManager.onerror = function() {<span>
+ <span>// Something went wrong during init - in this example, we *assume* flashblock etc.</span>
+ soundManager.flashLoadTimeout = 0; <span>// When restarting, wait indefinitely for flash</span>
+ soundManager.onerror = {}; <span>// Prevent an infinite loop, in case it's not flashblock</span>
+ soundManager.reboot(); <span>// and, go!</span>
+}</span></code></pre>
+ </dd>
+ <dd>This method may be helpful when trying to gracefully recover from FlashBlock-type situations where the user has prevented the SWF from loading, but is able to whitelist it. For more ideas, see <a href="../demo/flashblock/">Flashblock demo</a>.</dd>
+ <dd>When using this method also consider <a href="#flashloadtimeout" onclick="resetFilter()">flashLoadTimeout</a>, which can have SM2 wait indefinitely for the flash to load if desired.</dd>
+ </dl>
+
+ <dl id="soundmanager-resume" class="f-block f-resume">
+ <dt><span>object:SMSound</span> resume(<span>id:string</span>)</dt>
+ <dd title="soundID:string">Resumes and returns the currently-paused sound specified by ID.</dd>
+ <dd>Example: <code>soundManager.resume('<span>mySound</span>');</code></dd>
+ </dl>
+
+ <dl id="soundmanager-resumeall" class="f-block f-resumeall">
+ <dt>resumeAll()</dt>
+ <dd title="soundID:string">Resumes all currently-paused sounds.</dd>
+ <dd>Example: <code>soundManager.resumeAll();</code></dd>
+ </dl>
+
+ <dl id="soundmanager-setpan" class="f-block f-setpan">
+ <dt><span>object:SMSound</span> setPan(<span>id:string,volume:integer</span>)</dt>
+ <dd title="id:string,volume:integer">Sets the stereo pan (left/right bias) of the sound specified by ID, and returns the related sound object. Accepted values: -100 to 100 (L/R, 0 = center.) Affects <span>pan</span> property.</dd>
+ <dd>Example: <code>soundManager.setPan('<span>mySound</span>',<span>-80</span>);</code></dd>
+ </dl>
+
+ <dl id="soundmanager-setposition" class="f-block f-setposition">
+ <dt><span>object:SMSound</span> setPosition(<span>id:string,msecOffset:integer</span>)</dt>
+ <dd title="id:string,msecOffset:integer">Seeeks to a given position within a sound, specified by miliseconds (1000 msec = 1 second) and returns the related sound object. Affects <span>position</span> property.</dd>
+ <dd>Example: <code>soundManager.setPosition('<span>mySound</span>',<span>2500</span>);</code></dd>
+ <dd>Can only seek within loaded sound data, as defined by the <span>duration</span> property.</dd>
+ </dl>
+
+ <dl id="soundmanager-setvolume" class="f-block f-setvolume">
+ <dt><span>object:SMSound</span> setVolume(<span>id:string,volume:integer</span>)</dt>
+ <dd title="id:string,volume:integer">Sets the volume of the sound specified by ID and returns the related sound object. Accepted values: 0-100. Affects <span>volume</span> property.</dd>
+ <dd>Example: <code>soundManager.setVolume('<span>mySound</span>',<span>50</span>);</code></dd>
+ </dl>
+
+ <dl id="soundmanager-stop" class="f-block f-stop">
+ <dt><span>object:SMSound</span> stop(<span>id:string</span>)</dt>
+ <dd title="soundID:string">Stops playing the sound specified by ID. Returns the related sound object.</dd>
+ <dd>Example: <code>soundManager.stop('<span>mySound</span>');</code></dd>
+ </dl>
+
+ <dl id="soundmanager-stopall" class="f-block f-stopall">
+ <dt>stopAll()</dt>
+ <dd>Stops any currently-playing sounds.</dd>
+ <dd>Example: <code>soundManager.stopAll();</code></dd>
+ </dl>
+
+ <dl id="soundmanager-togglemute" class="f-block f-togglemute">
+ <dt><span>object:SMSound</span> toggleMute(<span>id:string</span>)</dt>
+ <dd title="soundID:string">Mutes/unmutes the sound specified by ID. Returns the related sound object.</dd>
+ <dd>Example: <code>soundManager.toggleMute('<span>mySound</span>');</code></dd>
+ </dl>
+
+ <dl id="soundmanager-togglepause" class="f-block f-togglepause">
+ <dt><span>object:SMSound</span> togglePause(<span>id:string</span>)</dt>
+ <dd title="soundID:string">Pauses/resumes play on the sound specified by ID. Returns the related sound object.</dd>
+ <dd>Example: <code>soundManager.togglePause('<span>mySound</span>');</code></dd>
+ </dl>
+
+ <dl id="soundmanager-unload" class="f-block f-unload">
+ <dt><span>object:SMSound</span> unload(<span>id:string</span>)</dt>
+ <dd title="soundID:string">Stops loading the sound specified by ID, canceling any current HTTP request. Returns the related sound object.</dd>
+ <dd>Example: <code>soundManager.unload('<span>mySound</span>');</code></dd>
+ <dd>Note that for Flash 8, SoundManager does this by loading a new, tiny "stub" MP3 file, <code class="in">./null.mp3</code>, which replaces the current one from loading. This is defined in the SM2 global object as <code class="in">nullURL</code>, and can be edited.</dd>
+ </dl>
+
+ <dl id="soundmanager-unmute" class="f-block f-unmute">
+ <dt><span>object:SMSound</span> unmute(<span>[id:string]</span>)</dt>
+ <dd title="id:string">Unmutes the sound specified by ID. If no ID specified, all sounds will be unmuted. Affects <span>muted</span> property (boolean.) Returns the related sound object.</dd>
+ <dd>Example: <code>soundManager.unmute('<span>mySound</span>');</code></dd>
+ </dl>
+
+ <dl id="soundmanager-load" class="f-block f-load">
+ <dt><span>object:SMSound</span> load(<span>id:string,[options object]</span>)</dt>
+ <dd title="soundID:string">Starts loading the sound specified by ID, with options if specified. Returns the related sound object.</dd>
+ <dd>Example: <code>soundManager.load('<span>mySound</span>');</code></dd>
+ <dd>Example 2: <code>soundManager.load('<span>mySound</span>',{<span>volume:50,onfinish:playNextSound</span>});</code></dd>
+ </dl>
+
+ <dl id="soundmanager-getsoundbyid" class="f-block f-getsoundbyid">
+ <dt><span>object:SMSound </span>getSoundById(<span>id:string</span>)</dt>
+ <dd title="id:string">Returns an <code>SMSound</code> object specified by ID, or null if a sound with that ID is not found.</dd>
+ <dd>Example: <code>var mySMSound = soundManager.getSoundById('<span>mySound</span>');</code></dd>
+ </dl>
+
+ <dl id="soundmanager-getmemoryuse" class="f-block f-getmemoryuse">
+ <dt class="flash9" title="Requires Flash 9.0+"><span>number:bytesUsed </span>getMemoryUse()</dt>
+ <dd>Returns the total number of bytes allocated to the Adobe Flash player or Adobe AIR, or 0 if unsupported (Flash 9+ only.) This number may include memory use across all tabs, browsers etc. See <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/system/System.html#totalMemory" title="System.totalMemory property documentation">system.totalMemory</a> (livedocs.adobe.com)</dd>
+ <dd>Example: <code>var mbUsed = (soundManager.getMemoryUse()/1024/1024).toFixed(2); <span><span>// eg. 12.05 MB</span></span></code></dd>
+ </dl>
+
+ <dl id="soundmanager-loadfromxml" class="f-block f-loadfromxml">
+ <dt>loadFromXML(<span>xmlURL:string</span>)</dt>
+ <dd>Loads and creates sounds as defined in a <a href="http://www.schillmania.com/projects/soundmanager/" title="SoundManager v1 project page">SoundManager v1</a> XML file (legacy)</dd>
+ <dd>Note that per-sound options are not supported with this method, and sound objects will be created immediately upon loading and parsing of the XML. The sounds will inherit the <code>defaultOptions</code> settings, with the exception of the <code>stream</code> attribute as set in the XML (true if defined, defaultOption applied if omitted.)</dd>
+ <dd>Example: <code>soundManager.loadFromXML('<span>/path/to/some.xml</span>');</code></dd>
+ <dd>XML format example: <a href="../demo/mpc/acoustic-drumkit.xml">MPC drumkit XML file</a></dd>
+ </dl>
+
+ <dl id="soundmanager-supported" class="f-block f-supported">
+ <dt><span>isSupported:boolean</span> supported()</dt>
+ <dd>Returns a boolean indicating whether soundManager has attempted to and succeeded in initialising. This function will return false if called before initialisation has occurred.</dd>
+ <dd>Example: <code>var isSupported = soundManager.supported();</code></dd>
+ </dl>
+
+ </div>
+
+ </div>
+
+ <div id="smsoundmethods" class="columnar">
+
+ <div class="c1">
+ <h2>SMSound (Sound Object) API</h2>
+ <p class="in">Each <code>createSound()</code> call generates a matching <code>SMSound</code> (sound instance) object, which lasts for the life of the page or until explicitly destroyed. Each instance stores stateful information (eg. <code>playState</code>) and provides event handlers for state changes (eg. <code>onload()</code>.)</p>
+ <p>SoundManager is a convenient wrapper for most sound object methods: It will check for and gracefully exit if a sound object (specified by ID) does not exist, and provides convenient global functionality, eg. muting or pausing of all sounds.</p>
+ <p class="in">Nonetheless, each <code>SMSound</code> object can have its methods called directly. eg. <code>mySound.mute()</code> instead of <code>soundManager.mute('mySound')</code>, and so on.</p>
+ <p class="in">Note that for code examples, <code>mySound</code> is assumed to be a valid SMSound instance object - eg.,<br /><code>var mySound = soundManager.createSound();</code> or<br /> <code>var mySound = soundManager.getSoundById();</code></p>
+ </div>
+
+ <div class="c2">
+
+ <div>
+
+ <h3>Sound Object Methods</h3>
+
+ <p class="in">Each sound under SoundManager 2 is given a <code>SMSound</code> object instance which includes the following events, methods and properties. Note that most methods will return the sound object instance, allowing for method chaining if desired.</p>
+
+ <dl id="smsound-destruct" class="f-block s-destruct">
+ <dt>destruct()</dt>
+ <dd>Stops, unloads and destroys a sound, freeing resources etc.</dd>
+ <dd>Example: <code>mySound.destruct();</code></dd>
+ </dl>
+
+ <dl id="smsound-load" class="f-block s-load">
+ <dt><span>object:SMSound</span> load(<span>[options object]</span>)</dt>
+ <dd title="soundID:string">Starts loading the given sound, with options if specified.</dd>
+ <dd>Example: <code>mySound.load();</code></dd>
+ <dd>Example 2: <code>mySound.load({<span>volume:50,onfinish:playNextSound</span>});</code></dd>
+ </dl>
+
+ <dl id="smsound-mute" class="f-block s-mute">
+ <dt><span>object:SMSound</span> mute()</dt>
+ <dd>Mutes the given sound. Affects <span>muted</span> property.</dd>
+ <dd>Example: <code>mySound.mute();</code></dd>
+ </dl>
+
+ <dl id="smsound-onposition" class="f-block s-onposition">
+ <dt><span>object:SMSound</span> onposition(<span>msecOffset:integer, callback:function, [scope]</span>)</dt>
+ <dd>Registers an event listener, fired when a sound reaches or passes a certain position while playing. Position being "listened" for is passed back to event handler. Will also fire if a sound is "rewound" (eg. via <code>setPosition()</code> to an earlier point) and the given position is reached again. Listeners will be removed if a sound is unloaded. An optional scope can be passed as well.</dd>
+ <dd>Note that for <code>multiShot</code> cases, only the first play instance's <code>position</code> is tracked in Flash; therefore, subsequent "shots" will not have onposition() events being fired.</dd>
+ <dd>Example: <code>mySound.onposition(3000, function(eventPosition){<span>console.log(this.sID+' reached '+eventPosition</span>});</code></dd>
+ </dl>
+
+ <dl id="smsound-pause" class="f-block s-pause s-paused">
+ <dt><span>object:SMSound</span> pause()</dt>
+ <dd>Pauses the given sound. (Does not toggle.) Affects <span>paused</span> property (boolean.)</dd>
+ <dd>Example: <code>mySound.pause();</code></dd>
+ </dl>
+
+ <dl id="smsound-play" class="f-block s-play">
+ <dt><span>object:SMSound</span> play(<span>[options object]</span>)</dt>
+ <dd>Starts playing the given sound, with an optional options object. (Will start loading if applicable, and will play ASAP.)</dd>
+ <dd>Note that the <code>options object</code> parameter is not required and can take almost any argument from the object literal format (eg. volume.)</dd>
+ <dd>Example: <code>mySound.play('<span>mySound</span>',{<span>volume:50,onfinish:playNextSound</span>});</code></dd>
+ </dl>
+
+ <dl id="smsound-setposition" class="f-block s-setposition">
+ <dt><span>object:SMSound</span> setPosition(<span>msecOffset:integer</span>)</dt>
+ <dd title="msecOffset:integer">Seeks to a given position within a sound, specified by miliseconds (1000 msec = 1 second.) Affects <span>position</span> property.</dd>
+ <dd>Example: <code>mySound.setPosition(<span>2500</span>);</code></dd>
+ <dd>Can only seek within loaded sound data, as defined by the <span>duration</span> property.</dd>
+ </dl>
+
+ <dl id="smsound-resume" class="f-block s-resume">
+ <dt><span>object:SMSound</span> resume()</dt>
+ <dd>Resumes the currently-paused sound. Does not affect currently-playing sounds.</dd>
+ <dd>Example: <code>mySound.resume();</code></dd>
+ </dl>
+
+ <dl id="smsound-setpan" class="f-block s-setpan">
+ <dt><span>object:SMSound</span> setPan(<span>volume:integer</span>)</dt>
+ <dd title="volume:integer">Sets the stereo pan (left/right bias) of the given sound. Accepted values: -100 to 100 (L/R, 0 = center.) Affects <span>pan</span> property.</dd>
+ <dd>Example: <code>mySound.setPan(<span>-80</span>);</code></dd>
+ </dl>
+
+ <dl id="smsound-setvolume" class="f-block s-setvolume">
+ <dt><span>object:SMSound</span> setVolume(<span>volume:integer</span>)</dt>
+ <dd title="volume:integer">Sets the volume of the given sound. Accepted values: 0-100. Affects <span>volume</span> property.</dd>
+ <dd>Example: <code>mySound.setVolume(<span>50</span>);</code></dd>
+ </dl>
+
+ <dl id="smsound-togglemute" class="f-block s-togglemute">
+ <dt><span>object:SMSound</span> toggleMute()</dt>
+ <dd>Mutes/unmutes the given sound. Affected <span>muted</span> property (boolean.)</dd>
+ <dd>Example: <code>mySound.toggleMute();</code></dd>
+ </dl>
+
+ <dl id="smsound-togglepause" class="f-block s-togglepause">
+ <dt><span>object:SMSound</span> togglePause()</dt>
+ <dd>Pauses/resumes play of the given sound. Will also start a sound if it is has not yet been played.</dd>
+ <dd>Example: <code>mySound.togglePause();</code></dd>
+ </dl>
+
+ <dl id="smsound-stop" class="f-block s-stop">
+ <dt><span>object:SMSound</span> stop()</dt>
+ <dd>Stops playing the given sound.</dd>
+ <dd>Example: <code>mySound.stop();</code></dd>
+ </dl>
+
+ <dl id="smsound-unload" class="f-block s-unload">
+ <dt><span>object:SMSound</span> unload()</dt>
+ <dd>Stops loading the given sound, canceling any current HTTP request.</dd>
+ <dd>Example: <code>mySound.unload();</code></dd>
+ <dd>Note that for Flash 8, SoundManager does this by loading a new, tiny "stub" MP3 file, <code class="in">./null.mp3</code>, which replaces the current one from loading. This is defined in the SM2 global object as <code class="in">nullURL</code>, and can be edited.</dd>
+ </dl>
+
+ <dl id="smsound-unmute" class="f-block s-unmute">
+ <dt><span>object:SMSound</span> unmute()</dt>
+ <dd>Unmutes the given sound. Affects <span>muted</span> property.</dd>
+ <dd>Example: <code>mySound.unmute();</code></dd>
+ </dl>
+
+ </div>
+
+ </div>
+
+
+</div>
+
+ <div id="smsoundevents" class="columnar">
+
+ <div class="c1">
+ <h2 id="soundmanager-sound-events">SMSound Events</h2>
+ <p>Event handlers for SMSound objects.</p>
+ </div>
+
+ <div class="c2">
+
+ <div>
+
+ <h3>Sound Object Events</h3>
+
+ <p class="in">Like native javascript objects, each SoundManager <code>SMSound</code> (sound instance) object can fire a number of <code>onload</code>-like events. Handlers cannot be "directly" assigned (eg. someSound.onload), but can be passed as option parameters to several sound methods.</p>
+ <div>
+<pre class="block"><code>soundManager.play('<span>mySound</span>',{
+ onfinish: function() {
+ alert('<span>The sound </span>'+this.sID+' <span>finished playing.</span>');
+ }
+});</code></pre>
+ </div>
+ <p>Event handlers are scoped to the relevant sound object, so the <code>this</code> keyword will point to the sound object on which the event fired such that its properties can easily be accessed - eg. within an <code>SMSound</code> event handler, <code>this.sID</code> will give the sound ID.</p>
+
+ </div>
+
+ <div style="margin-top:2em">
+
+ <dl id="smsound-onbufferchange" class="f-block s-onbufferchange">
+ <dt class="flash9">onbufferchange()</dt>
+ <dd>Fires when a sound's reported buffering state has changed while playing and/or loading. The current state is reflected in the boolean <code>isBuffering</code> property.</dd>
+ <dd>Flash 9+ only. Related information on Adobe, <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/media/Sound.html#isBuffering">Sound.isBuffering</a>.</dd>
+ </dl>
+
+ <dl id="smsound-ondataerror" class="f-block s-ondataerror s-waveformdata s-eqdata">
+ <dt title="Flash 9+ only" class="flash9">ondataerror()</dt>
+ <dd>Fires at least once per sound play instance when Flash encounters a security error when trying to call computeSpectrum() internally. This typically happens when sounds are 'inaccessible' due to another Flash movie (eg. YouTube) in another tab which has loaded, and may (or may not be) playing sound. Flash attempts to read the "combined" output to the sound card, and must have security permissions for all sounds as a result. See <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/media/SoundMixer.html#areSoundsInaccessible()">areSoundsInaccessible()</a> on Adobe for more info.</dd>
+ <dd>If the offending resource causing the security error is closed or becomes inactive(?), the data will become available again. Intermittent availability will result in intermittent calls to <code>ondataerror()</code>.</dd>
+ </dl>
+
+ <dl id="smsound-onbeforefinishcomplete" class="f-block s-onbeforefinishcomplete">
+ <dt>onbeforefinishcomplete()</dt>
+ <dd>Fires when a sound has finished, <code>onfinish()</code> has been called, but before the sound play state and other meta data (position, etc.) are reset.</dd>
+ </dl>
+
+ <dl id="smsound-onbeforefinish" class="f-block s-onbeforefinish">
+ <dt>onbeforefinish()</dt>
+ <dd>Fires when a playing, fully-loaded sound has reached <code>onbeforefinishtime</code> (eg. 5000 msec) from its end.</dd>
+ </dl>
+
+ <dl id="smsound-onconnect" class="f-block s-onconnect flash9">
+ <dt>onconnect()</dt>
+ <dd>Fires when a sound using an RTMP <code>serverURL</code> property has attempted to connect, and has either succeeded or failed. Affects <code>connected</code> property. Once connected, a stream can be requested from the RTMP server.</dd>
+ <dd>Example:
+<pre class="block"><code>var s = soundManager.createSound({<span>
+ id: 'rtmpTest',
+ serverURL: 'rtmp://localhost/test/',
+ url: 'song.mp3',
+ onconnect: function(bConnect) {
+ <span><span>// <b>this.connected</b> can also be used</span></span>
+ soundManager._writeDebug(this.sID+' connected: '+(bConnect?'true':'false'));
+ }
+</span>}).play();<span><span> // will result in connection being made</span></span></code></pre>
+ </dl>
+
+ <dl id="smsound-onfinish" class="f-block s-onfinish">
+ <dt>onfinish()</dt>
+ <dd>Fires when a playing sound has reached its end. By this point, relevant properties like <code>playState</code> will have been reset to non-playing status.</dd>
+ </dl>
+
+ <dl id="smsound-onid3" class="f-block s-onid3">
+ <dt id="onid3">onid3()</dt>
+ <dd>Fires when ID3 data has been received. Relevant property is <code>id3</code>, which is an object literal (JSON)-style object. Only fields with data will be populated.</dd>
+ <dd>Note that ID3V2 data is located at the beginning (header) of an MP3 file and will load almost immediately, whereas ID3V1 data is at the end and will not be received until the MP3 has fully loaded.</dd>
+ <dd>
+ Example handler code:
+ <div>
+<pre class="block"><code>soundManager._writeDebug(<span>'sound '+this.sID+' ID3 data received'</span>);
+var prop = null;
+var data = '';
+for (prop in this.id3) {
+ data += prop+': '+this.id3[prop]+','; <span><span>// eg. title: Loser, artist: Beck</span></span>
+}</code></pre>
+ </div>
+ </dd>
+ <dd>Refer to the <a href="http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00002676.html" title="Flash 8 Sound.id3 property documentation">Flash 8 Sound.id3</a> documentation for a list of ID3 properties.</dd>
+ <dd>When parsing ID3 data, it is best to check for the existance of ID3V1 data first, and apply ID3V2 if no matching ID3V1 data is defined. (V1 should "inherit" from V2, ideally, if available.)</dd>
+ <dd>Note that Flash's cross-domain security restrictions may prevent access to ID3 information, even though the MP3 itself can be loaded. (crossdomain.xml files on the remote host can grant Flash permission to access this.)</dd>
+ <dd>Also note some <a href="#id3-parsing" onclick="resetFilter()">issues with parsing ID3 from iTunes</a>.</dd>
+ </dl>
+
+
+ <dl id="smsound-onjustbeforefinish" class="f-block s-onjustbeforefinish">
+ <dt>onjustbeforefinish()</dt>
+ <dd>Fires approximately <code>justbeforefinishtime</code> before the end of a fully-loaded, playing sound.</dd>
+ <dd>This is based on a polling approach given SM2 must track the sound's position, and is approximated (eg. a 200 msec value may fire at 187 msec before the end of the sound.)</dd>
+ </dl>
+
+ <dl id="smsound-onload" class="f-block s-onload">
+ <dt>onload(<span>boolean:success</span>)</dt>
+ <dd>Fires on sound load. Boolean reflects successful load (true), or fail/load from cache (false).</dd>
+ <dd>False value should seemingly only be for failure, but appears to be returned for load from cache as well. This strange behaviour comes from Flash. More detail may be available from the Flash 8 sound object documentation.</dd>
+ <dd>Failure can occur if the Flash sandbox (security) model is preventing access, for example loading SoundManager 2 on the local file system and trying to access an MP3 on a network (or internet) URL. (Security can be configured in the Flash security panel, [<a href="#fpgss" title="Configure your Flash player security settings" onclick="resetFilter()">see here</a>].)</dd>
+ <!-- <dd>Example: <code>soundManager.createSound('<span>mySound</span>','<span>/audio/mysoundfile.mp3</span>');</code></dd> -->
+ </dl>
+
+ <dl id="smsound-onpause" class="f-block s-onpause">
+ <dt>onpause()</dt>
+ <dd>Fires when a sound pauses, eg. via <code>sound.pause()</code>.</dd>
+ <dd>Example: <code>soundManager.pause('<span>mySound</span>');</code></dd>
+ </dl>
+
+ <dl id="smsound-onplay" class="f-block s-onplay">
+ <dt>onplay()</dt>
+ <dd>Fires when <code>sound.play()</code> is called.</dd>
+ </dl>
+
+ <dl id="smsound-onresume" class="f-block s-onresume">
+ <dt>onresume()</dt>
+ <dd>Fires when a sound resumes playing, eg. via <code>sound.resume()</code>.</dd>
+ <dd>Example: <code>soundManager.resume('<span>mySound</span>');</code></dd>
+ </dl>
+
+ <dl id="smsound-onstop" class="f-block s-onstop">
+ <dt>onstop()</dt>
+ <dd>Fires when <code>sound.stop()</code> is explicitly called. For natural "sound finished" <code>onfinish()</code> case, see below.</dd>
+ </dl>
+
+ <dl id="smsound-whileloading" class="f-block s-whileloading s-bytesloaded s-bytestotal">
+ <dt>whileloading()</dt>
+ <dd>Fires at a regular interval when a sound is loading and new data has been received. The relevant, updated property is <code>bytesLoaded</code>.</dd>
+ <dd>Example handler code: <code>soundManager._writeDebug(<span>'sound '+this.sID+' loading, '+this.bytesLoaded+' of '+this.bytesTotal</span>);</code></dd>
+ <dd>Note that the <code>duration</code> property starts from 0 and is updated during <code>whileloading()</code> to reflect the duration of currently-loaded sound data (ie. when a 4:00 MP3 has loaded 50%, the duration will be reported as 2:00 in milliseconds.) However, an estimate of final duration can be calculated using <code>bytesLoaded</code>, <code>bytesTotal</code> and <code>duration</code> while loading. Once fully-loaded, <code>duration</code> will reflect the true and accurate value.</dd>
+ </dl>
+
+ <dl id="smsound-whileplaying" class="f-block s-whileplaying">
+ <dt>whileplaying()</dt>
+ <dd>Fires at a regular interval when a sound is playing, and a position (time) change is detected. The relevant, updated property is <code>position</code>.</dd>
+ <dd>Example handler code: <code>soundManager._writeDebug(<span>'sound '+this.sID+' playing, '+this.position+' of '+this.duration</span>);</code></dd>
+ </dl>
+
+
+ </div>
+
+ </div>
+
+ </div>
+
+
+ <div id="sound-object-properties" class="columnar">
+
+ <div class="c1">
+ <h2>SMSound Properties</h2>
+ <p>Instance Option properties (parameters) can be used with <code>createSound()</code> and <code>play()</code>.</p>
+ <p style="margin-bottom:0px">Example:</p>
+<pre class="block"><code>soundManager.createSound({
+ id: 'foo',
+ url: '/path/to/an.mp3'
+});</code></pre>
+ <p>Dynamic Properties can be read to monitor the state of a sound object.</p>
+ <p style="margin-bottom:0px">Example:</p>
+<pre class="block"><code>alert(mySound.playState);</code></pre>
+
+
+ </div>
+
+ <div class="c2">
+
+ <div class="f-block">
+
+ <h3 id="soundmanager-sound-properties">Sound Object Properties</h3>
+ <p>Each sound object inherits these properties from soundManager.defaultOptions. They can be set individually or at once when enclosed in object literal form to either <code>createSound()</code> or <code>play()</code>.</p>
+
+ </div>
+
+ <div style="margin-top:2em">
+
+ <dl id="smsound-sid" class="f-block s-sid">
+ <dt>sID</dt>
+ <dd>Sound ID string as provided from the <code>id</code> parameter via <code>createSound()</code> or <code>play()</code>. Can be referenced as <code>this.sID</code> from within sound object event handlers such as <code>onload()</code>, <code>whileloading()</code> or <code>whileplaying()</code>, etc.</dd>
+ <dd>If an ID is known, the related SMSound object can be retrieved via <code>getSoundById</code> or directly referencing <code>sounds[sID]</code> on the SoundManager global object.</dd>
+ </dl>
+
+ <dl id="smsound-url" class="f-block s-url">
+ <dt>url</dt>
+ <dd>The specified URL from which the sound is loaded, typically over HTTP. Can be referenced as <code>this.url</code> from within sound object event handlers such as <code>onload()</code> or <code>whileplaying()</code>, etc.</dd>
+ </dl>
+
+ <dl id="smsound-serverurl" class="f-block s-serverurl">
+ <dt>serverURL</dt>
+ <dd><b>Note: <em>Experimental feature.</em></b> Only for use with RTMP streaming, ie., Flash Media Server and similar servers.</dd>
+ <dd>The RTMP server address which Flash will connect to using a <a href="http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/net/NetStream.html" title="NetStream documentation">NetStream</a> object. Only the server address is specified here, when RTMP is in use; the <code>url</code> property is used to point to a specific resource on the server.</dd>
+ <dd>Example:
+<pre class="block"><code>soundManager.createSound({<span>
+ id: 'mySound',
+ serverURL: 'rtmp://localhost/rtmpDemo/', <span><span>// RTMP server</span></span>
+ url: 'mysong.mp3' <span><span>// path to stream</span></span>
+}</span>).play();</code></pre></dd>
+ </dl>
+
+ <dl id="smsound-usepolicyfile" class="f-block s-usepolicyfile">
+ <dt>usePolicyFile</dt>
+ <dd>Boolean value (default: <code>false</code>) which instructs Flash, when loading MP3/MP4 content from remote/third party domains, to request example.com/crossdomain.xml first in order to determine permissions for access to metadata such as ID3 info, waveform, peak and/or spectrum data.</dd>
+ <dd><code>usePolicyFile</code> will be automagically set to <code>true</code> if your sound options have an <code>onid3()</code> event handler, or uses sound data (peak/wave/spectrum) features. By default, Flash will not have access to this metadata on remote domains unless granted cross-domain security permissions via the crossdomain.xml file.</dd>
+ <dd>Consider additional HTTP traffic (albeit, perhaps with caching-like behaviour for subsequent checks?) and silent 404s in most cases given few hosts use crossdomain.xml files.</dd>
+ <dd>See Adobe's knowledge base for <a href="http://kb2.adobe.com/cps/963/50c96388.html" title="Adobe KB: ID3 does not load on cross-domain MP3s">related ID3 + crossdomain.xml</a> documentation.</dd>
+ </dl>
+
+ </div>
+
+ <div style="margin-top:2em">
+
+ <div class="f-block">
+
+ <h3 id="soundmanager-sound-dynamic-properties">Sound Object Dynamic Properties</h3>
+ <p>Each sound includes a number of properties that are updated throughout the life of a sound - while loading or playing, for example. Many of these properties have related events that fire when they are updated, and should be treated as read-only.</p>
+
+ </div>
+
+
+ <dl id="smsound-bytesloaded" class="f-block s-bytesloaded">
+ <dt>bytesLoaded</dt>
+ <dd>The number of bytes currently received while loading a sound.</dd>
+ </dl>
+
+ <dl id="smsound-bytestotal" class="f-block s-bytestotal">
+ <dt>bytesTotal</dt>
+ <dd>The total number of bytes to be downloaded, while loading a sound.</dd>
+ </dl>
+
+ <dl id="smsound-didbeforefinish" class="f-block s-didbeforefinish">
+ <dt>didBeforeFinish</dt>
+ <dd>Boolean indicating whether <code>beforeFinish()</code> condition was reached.</dd>
+ </dl>
+
+ <dl id="smsound-didjustbeforefinish" class="f-block s-didjustbeforefinish">
+ <dt>didJustBeforeFinish</dt>
+ <dd>Boolean indicating whether <code>justBeforeFinish()</code> condition was reached.</dd>
+ </dl>
+
+ <dl id="smsound-duration" class="f-block s-duration">
+ <dt>duration</dt>
+ <dd>The current length of the sound, specified in milliseconds.</dd>
+ <dd>Note that during loading, this property reflects the length of downloaded data, not the full length, until completely loaded (see <a href="#smsound-whileloading" onclick="resetFilter()">whileloading()</a>.) For an approximate "full duration" value while loading, see <code>durationEstimate</code>.</dd>
+ </dl>
+
+ <dl id="smsound-durationestimate" class="f-block s-durationestimate">
+ <dt>durationEstimate</dt>
+ <dd>The estimated duration of the sound, specified in milliseconds.</dd>
+ <dd>Due to the dynamic nature of <code>duration</code> while loading, this attempts to provide the full duration by calculating <code>parseInt((self.bytesTotal/self.bytesLoaded)*self.duration)</code> and is updated with each <code>whileloading()</code> interval.</dd>
+ <dd>Once the sound has fully loaded, <code>duration</code> should be referenced as it will contain the final and accurate value.</dd>
+ <dd>Note that this method works only with Constant Bitrate (CBR)-encoded MP3s due to the consistent data/time assumption. VBR-encoded MP3s will give inaccurate results.</dd>
+ </dl>
+
+ <dl id="smsound-eqdata" class="f-block s-eqdata">
+ <dt title="Flash 9+ only" class="flash9">eqData = {<span>left:[], right: []</span>}</dt>
+ <dd>Object containing two arrays of 256 floating-point (three decimal place) values from 0 to 1, the result of an FFT on the waveform data. Can be used to draw a spectrum (frequency range) graph while playing a sound. See <a href="../demo/page-player/#debug=1" title="Muxtape.com-style page-as-playlist, with debug output" onclick="checkDomain(this,true)">Page-as-playlist demo</a> for example implementation. Requires Flash 9+.</dd>
+ <dd>A spectrum frequency graph reflects the level of frequencies being played, from left to right, low to high (i.e., 0 to 20,000 Hz.)</dd>
+ <dd><code>eqData</code> is set and updated during <code>whileplaying()</code>. A simple graph could be drawn by looping through the values and multiplying by a vertical scale value (eg. 32, thus a graph with peaks of 32 pixels.)</dd>
+ <dd>Example code:
+<pre class="block"><code>someSoundObject.whileplaying = function() {<span>
+ <span>// Move 256 absolutely-positioned 1x1-pixel DIVs, for example (ugly, but works)</span>
+ var gPixels = document.getElementById('graphPixels').getElementsByTagName('div');
+ var gScale = 32; <span>// draw 0 to 32px from bottom</span>
+ for (var i=0; i<256; i++) {
+ graphPixels[i].style.top = (32-(gScale+Math.ceil(this.waveformData.left[i]*gScale)))+'px';
+ }
+</span>}</code></pre>
+ </dd>
+ <dd>Related Adobe technical documentation (Flash 9/AS3 Sound() object): <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/media/SoundMixer.html#computeSpectrum()" title="Adobe Flash 9, sound object documentation">computeSpectrum()</a></dd>
+ <dd><strong>Note</strong>: Flash security measures may deny access to waveformData when loading MP3s from remote domains.</dd>
+ <dd><strong>Warning:</strong> This feature can eat up a lot of CPU in some cases. The amount of data passed from Flash to JS is not terribly large, but the JS-DOM updates and browser reflow can be expensive. Use with caution.</dd>
+ <dd><strong>Backward compatibility note:</strong> Up to SoundManager 2.95a.20090717, eqData was a single array containing one channel of data. In newer versions this is unchanged, except the array now has .left[] and .right[] objects attached to it. To ensure future compatibility, use eqData.left[0] instead of eqData[0] and so on.</dd>
+ </dl>
+
+ <dl id="smsound-id3" class="f-block s-id3">
+ <dt>id3</dt>
+ <dd>An object literal populated, if applicable, when ID3 data is received (related handler: <code>onid3()</code>)</dd>
+ <dd>For property details, see <a href="#onid3" title="onid3() documentation" onclick="resetFilter()">onid3()</a>.</dd>
+ </dl>
+
+ <dl id="smsound-isbuffering" class="f-block s-isbuffering">
+ <dt class="flash9">isBuffering</dt>
+ <dd>Boolean value reflecting the buffering state of a playing or loading object. To be notified when this property changes, see <a href="#smsound-onbufferchange" onclick="resetFilter()">onbufferchange()</a>.</dd>
+ <dd>Flash 9+ only. Related information on Adobe, <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/media/Sound.html#isBuffering">Sound.isBuffering</a>.</dd>
+ </dl>
+
+ <dl id="smsound-connected" class="f-block s-connected">
+ <dt class="flash9">connected</dt>
+ <dd>Boolean value reflecting the state of an RTMP server connection (when <code>serverURL</code> is used to connect to a Flash Media Server or similar RTMP service.) Calls to <code>load</code> or <code>play</code> will result in a connection attempt being made, and <code>onconnect()</code> ultimately being called.</dd>
+ <dd>For example code using <code>connected</code>, see <a href="#smsound-onconnect" onclick="resetFilter()">onconnect()</a>.</dd>
+ </dl>
+
+ <dl id="smsound-loaded" class="f-block s-loaded">
+ <dt>loaded</dt>
+ <dd>Boolean value indicating load success as returned from Flash. True indicates success, False is a failure.</dd>
+ <dd>Because of the potential for false positives, <code>duration</code> and other properties could be checked as a test of whether sound data actually loaded. For more granular state information, see <a href="#readystate" title="SMSound readyState documentation" onclick="resetFilter()">readyState</a>.</dd>
+ </dl>
+
+ <dl id="smsound-muted" class="f-block s-muted">
+ <dt>muted</dt>
+ <dd>Boolean indicating muted status. True/False.</dd>
+ <dd>Treat as read-only; use <code>mute()</code>, <code>unmute()</code> and <code>toggleMute()</code> methods to affect state.</dd>
+ </dl>
+
+ <dl id="smsound-paused" class="f-block s-paused">
+ <dt>paused</dt>
+ <dd>Boolean indicating pause status. True/False.</dd>
+ <dd>Treat as read-only; use <code>pause()</code>, <code>resume()</code> and <code>togglePause()</code> methods to affect state.</dd>
+ </dl>
+
+ <dl id="smsound-peakdata" class="f-block s-peakdata">
+ <dt title="Flash 9+ only" class="flash9">peakData = {<span>left:0.0, right:0.0</span>}</dt>
+ <dd>Object literal format including <code>left</code> and <code>right</code> properties with floating-point values ranging from 0 to 1, indicating "peak" (volume) level. Updated during <code>whileplaying()</code>. See <a href="../demo/page-player/#debug=1" title="Muxtape.com-style page-as-playlist, with debug output" onclick="checkDomain(this,true)">Page-as-playlist demo</a> as one example. Requires Flash 9+.</dd>
+ <dd>Example (within relevant sound object handler):
+<pre class="block"><code>someSoundObject.whileplaying = function() {<span>
+ soundManager._writeDebug('Peaks, L/R: '+this.peakData.left+'/'+this.peakData.right);
+</span>}</code></pre></dd>
+ </dl>
+
+ <dl id="smsound-playstate" class="f-block s-playstate">
+ <dt>playState</dt>
+ <dd>Numeric value indicating the current playing state of the sound.</dd>
+ <dd>0 = stopped/uninitialised</dd>
+ <dd>1 = playing <em>or</em> buffering sound (play has been called, waiting for data etc.)</dd>
+ <dd>Note that a 1 may not always guarantee that sound is being heard, given buffering and autoPlay status.</dd>
+ </dl>
+
+
+ <dl id="smsound-position" class="f-block s-position">
+ <dt>position</dt>
+ <dd>The current location of the "play head" within the sound, specified in milliseconds (1 sec = 1000 msec).</dd>
+ </dl>
+
+ <dl id="smsound-readystate" class="f-block s-readystate s-onload">
+ <dt id="readystate">readyState</dt>
+ <dd>Numeric value indicating a sound's current load status</dd>
+ <dd>0 = uninitialised</dd>
+ <dd>1 = loading</dd>
+ <dd>2 = failed/error</dd>
+ <dd>3 = loaded/success</dd>
+ </dl>
+
+ <dl id="smsound-type" class="f-block s-type">
+ <dt>type</dt>
+ <dd>A MIME type-like string eg. <code>audio/mp3</code>, used as a hint for SM2 to determine playability of a link with methods like <code>canPlayURL()</code>.</dd>
+ <dd>This can be helpful when you have a sound URL that does not have an .mp3 extension, but serves MP3 data (eg., a PHP or other CGI script.)</dd>
+ <dd>Example:
+<pre class="block"><code>var s = soundManager.createSound({<span>
+ id: 'aSound',
+ url: '/path/to/some.php?songID=123',
+ type: 'audio/mp3' <span><span>// indicates an MP3 link, so SM2 can handle it appropriately</span></span>
+</span>});</code></pre></dd>
+ </dl>
+
+
+ <dl id="smsound-waveformdata" class="f-block s-waveformdata">
+ <dt title="Flash 9+ only" class="flash9">waveformData = {<span>left:[], right:[]</span>}</dt>
+ <dd>Array of 256 floating-point (three decimal place) values from -1 to 1, can be used to draw a waveform while playing a sound. See <a href="../demo/page-player/#debug=1" title="Muxtape.com-style page-as-playlist, with debug output" onclick="checkDomain(this,true)">Page-as-playlist demo</a> for example implementation. Requires Flash 9+.</dd>
+ <dd><code>waveformData</code> is set and updated during <code>whileplaying()</code>. A simple graph could be drawn by looping through the values and multiplying by a vertical scale value (eg. 32, which would make a graph with peaks of -32 and +32 pixels.)</dd>
+ <dd>Example code:
+ <pre class="block"><code>someSoundObject.whileplaying = function() {<span>
+ <span>// Move 256 absolutely-positioned 1x1-pixel DIVs, for example (ugly, but works)</span>
+ var gPixels = document.getElementById('graphPixels').getElementsByTagName('div');
+ var gScale = 32; <span>// draw -32 to +32px from "zero" (i.e., center Y-axis point)</span>
+ for (var i=0; i<256; i++) {
+ graphPixels[i].style.top = (gScale+Math.ceil(this.waveformData.left[i]*-gScale))+'px';
+ }
+</span>}</code></pre>
+ </dd>
+ <dd><strong>SM2 implementation note</strong>: <code>waveformData</code> contains both left and right channels, and the data represents a raw sound wave rather than a frequency spectrum.</dd>
+ <dd>Related Adobe technical documentation (Flash 9/AS3 Sound() object): <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/media/SoundMixer.html#computeSpectrum()" title="Adobe Flash 9, sound object documentation">computeSpectrum()</a></dd>
+ <dd><strong>Note</strong>: Flash security measures may deny access to waveformData when loading MP3s from remote domains.</dd>
+ <dd><strong>Warning:</strong> This feature can eat up a lot of CPU in some cases. The amount of data passed from Flash to JS is not terribly large, but the JS-DOM updates and browser reflow can be expensive. Use with caution.</dd>
+ </dl>
+
+ </div>
+
+ </div>
+
+ </div>
+
+ <div id="smsound-methods" class="columnar">
+ <div class="c1">
+ <h2>SMSound Methods</h2>
+ <p>Functions which may be called directly on sound objects.</p>
+ </div>
+ <div class="c2">
+
+ <div class="f-block">
+ <h3>SMSound Object Methods</h3>
+ <p class="in">SoundManager provides wrappers for most SMSound methods - eg. <code>soundManager.play('<span>mySound</span>')</code> checks for a valid sound object, and then calls <code>soundManager.sounds['<span>mySound</span>'].play()</code> on that particular object; thus, it is the same as <code>var sound = soundManager.getSoundById('mySound'); mySound.play();</code></p>
+ <p>The following methods can be called directly on a SMSound instance. The method calls are the same as the SoundManager global methods documented above for existing sound objects, minus the sound ID parameter.</p>
+ </div>
+
+ <div class="f-block s-play s-setposition s-pause s-resume s-togglepause s-mute s-setvolume s-setpan s-stop s-unload s-destruct">
+
+ <dl class="tight">
+
+ <dt>destruct() <span class="archive">(also called via <a href="#soundmanager-destroysound" onclick="resetFilter()">soundManager.destroySound()</a>.)</span></dt>
+ <dt><a href="#smsound-load" onclick="resetFilter()">load()</a></dt>
+ <dt><a href="#smsound-mute" onclick="resetFilter()">mute()</a></dt>
+ <dt><a href="#smsound-pause" onclick="resetFilter()">pause()</a></dt>
+ <dt><a href="#smsound-play" onclick="resetFilter()">play(<span>[options object]</span>)</a></dt>
+ <dt><a href="#smsound-resume" onclick="resetFilter()">resume()</a></dt>
+ <dt><a href="#smsound-setposition" onclick="resetFilter()">setPosition(<span>msecOffset:integer</span>)</a></dt>
+ <dt><a href="#smsound-togglepause" onclick="resetFilter()">togglePause()</a></dt>
+ <dt><a href="#smsound-setvolume" onclick="resetFilter()">setVolume(<span>volume:integer</span>)</a></dt>
+ <dt><a href="#smsound-setpan" onclick="resetFilter()">setPan(<span>pan:integer</span>)</a></dt>
+ <dt><a href="#smsound-stop" onclick="resetFilter()">stop()</a></dt>
+ <dt><a href="#smsound-unload" onclick="resetFilter()">unload()</a></dt>
+ <dt><a href="#smsound-unmute" onclick="resetFilter()">unmute()</a></dt>
+
+ </dl>
+
+ </div>
+
+ </div>
+ </div>
+
+
+ <!-- options -->
+ <div id="smdefaults" class="columnar">
+
+ <div class="c1">
+ <h2>SoundManager Default Options</h2>
+ <p>An optional object specifying event handlers etc., passed to <code>createSound()</code> and <code>play()</code>.</p>
+ </div>
+
+ <div class="c2">
+
+ <div class="f-block f-defaultoptions s-autoload s-loops s-stream s-onbeforefinish s-onbeforefinishtime s-onjustbeforefinishtime s-multishot s-multishotevents s-pan s-volume s-ismoviestar s-flash9options s-moviestaroptions s-buffertime s-serverurl s-onconnect">
+
+ <h3 id="sound-properties">SoundManager Global Sound Object Defaults</h3>
+
+ <p>The <code class="in">soundManager.defaultOptions</code> object contains default parameters inherited by sound objects made via <code class="in">createSound()</code>. They can be overridden on a per-sound basis at create time, or changed dynamically in some cases. Note that none of these options are required when calling <code class="in">createSound()</code> except for <code>id</code> and <code>url</code>; the others will inherit the default values if unspecified.</p>
+ <p><code class="in">soundManager.defaultOptions</code> apply the properties and event handlers as specified above. Defaults are shown below as an example.</p>
+
+<pre class="small block"><code>soundManager.defaultOptions = {<span>
+ autoLoad: false, <span>// enable automatic loading (otherwise .load() will call with .play())</span>
+ autoPlay: false, <span>// enable playing of file ASAP (much faster if "stream" is true)</span>
+ loops: 1, <span>// number of times to play the sound. Related: <a href="demo/api/#looping">looping</a> (API demo)</span>
+ multiShot: true, <span>// let sounds "restart" or "chorus" when played multiple times..</span>
+ multiShotEvents: false,<span>// allow events (onfinish()) to fire for each shot, if supported.</span>
+ onid3: null, <span>// callback function for "ID3 data is added/available"</span>
+ onload: null, <span>// callback function for "load finished"</span>
+ onstop: null, <span>// callback for "user stop"</span>
+ onfinish: null, <span>// callback function for "sound finished playing"</span>
+ onbeforefinish: null, <span>// callback for "before sound finished playing (at [time])"</span>
+ onbeforefinishtime: 5000, <span>// offset (milliseconds) from sound end, call beforefinish..</span>
+ onbeforefinishcomplete: null,<span>// function to call when said sound finishes playing</span>
+ onjustbeforefinish: null, <span>// callback for [n] msec before end of current sound</span>
+ onjustbeforefinishtime: 200, <span>// if unused, set to 0 (or null handler), event will not fire.</span>
+ onpause: null, <span>// callback for "pause"</span>
+ onplay: null, <span>// callback for "play" start</span>
+ onresume: null, <span>// callback for "resume" (pause toggle)</span>
+ position: null, <span>// offset (milliseconds) to seek to within downloaded sound.</span>
+ pan: 0, <span>// "pan" settings, left-to-right, -100 to 100</span>
+ stream: true, <span>// allows playing before entire file has loaded (recommended)</span>
+ type: null, <span>// MIME-like hint for file pattern / canPlay() tests, eg. audio/mp3</span>
+ usePolicyFile: false, <span>// enable crossdomain.xml request for audio on remote domains (for ID3/waveform access)</span>
+ volume: 100, <span>// self-explanatory. 0-100, the latter being the max.</span>
+ whileloading: null, <span>// callback function for updating progress (X of Y bytes received)</span>
+ whileplaying: null, <span>// callback during play (position update)</span>
+
+ <span>// *** merged soundManager.flash9Options, as applicable ***</span>
+ isMovieStar: null, <span>// "MovieStar" MPEG4 audio mode. Null (default) = auto detect MP4, AAC etc. based on URL. true = force on, ignore URL</span>
+ usePeakData: false, <span>// enable left/right channel peak (level) data</span>
+ useWaveformData:false,<span>// enable sound spectrum (raw waveform data) - Note: May be CPU-intensive, UI redraw/layout etc.</span>
+ useEQData: false, <span>// enable sound EQ (frequency spectrum data) - Note: CPU potential also.</span>
+ onbufferchange: null, <span>// callback for "isBuffering" property change</span>
+ ondataerror: null <span>// callback for waveform/eq data access error (flash playing audio in other tabs/domains)</span>
+
+ <span>// *** merged soundManager.movieStarOptions, as applicable ***</span>
+ bufferTime: null, <span>// seconds of data to buffer (null = flash default of 0.1 - if AAC gappy, try up to 3 seconds)</span>
+ serverURL: null, <span>// rtmp: flash media server to connect to, required for RTMP</span>
+ onconnect: null <span>// rtmp: callback for connection to flash media server</span>
+
+</span>}
+</code></pre>
+
+ <p class="in">As a simple example, the following code would override the default <code>autoPlay</code>, <code>pan</code> and <code>volume</code> options for a given sound:</p>
+
+<pre class="block"><code>soundManager.createSound({
+ <span>id: 'mySound',
+ url: '/path/to/some.mp3',
+ autoPlay: true,
+ pan: -75,
+ volume: 50</span>
+});</code></pre>
+
+ <p class="alternate"><em>Note</em>: For live examples, see the code behind the "<a href="../demo/page-player/" title="muxtape-style page as playlist demo" onclick="checkDomain(this)">page as playlist</a>" demo which uses much of this functionality.</p>
+
+ </div>
+
+ <div class="f-block f-defaultoptions f-flash9options f-moviestaroptions s-ismoviestar s-usepeakdata s-usewaveformdata s-useeqdata">
+
+ <h3 id="sound-properties-flash9" title="Flash 9-only" class="flash9">Sound Properties Object: Version-specific Options (Merging)</h3>
+
+ <p>Some sound properties object items (eg. <code class="in">usePeakData</code>) are flash version-specific, non-default and are intentionally separated from <code class="in">soundManager.defaultOptions</code>. Flash 9-specific options fall under this category.</p>
+
+ <p><code class="in">soundManager.flash9Options</code> and <code class="in">soundManager.movieStarOptions</code> are both defined as separate objects, and if supported according to <code class="in">flashVersion</code> and <code class="in">defaultOptions</code> parameters, are merged "without nesting" into <code class="in">soundManager.defaultOptions</code>.</p>
+
+<pre class="small block"><code>soundManager.flash9Options = {<span>
+ isMovieStar: null, <span>// "MovieStar" MPEG4 audio mode. Null (default) = auto detect MP4, AAC etc. based on URL. true = force on, ignore URL</span>
+ usePeakData: false, <span>// enable left/right channel peak (level) data</span>
+ useWaveformData: false, <span>// enable sound spectrum (raw waveform data) - WARNING: May set CPUs on fire.</span>
+ useEQData: false, <span>// enable sound EQ (frequency spectrum data) - WARNING: Also CPU-intensive.</span>
+ onbufferchange: null, <span>// callback for "isBuffering" property change</span>
+ ondataerror: null <span>// callback for waveform/eq data access error (flash playing audio in other tabs/domains)</span>
+</span>}
+soundManager.movieStarOptions = {<span>
+ bufferTime: null <span>// seconds of data to buffer (null = flash default of 0.1 - if AAC gappy, try up to 3 seconds)</span>
+</span>}
+<span><span>// if applicable, these options are merged into soundManager.defaultOptions at SM2 init.
+// soundManager.flash9Options.isMovieStar -> soundManager.defaultOptions.isMovieStar, etc.</span></span>
+</code></pre>
+
+ <h4 id="when-to-modify-version-specific" class="flash9" title="Flash 9+ only">defaultOptions.peakData vs. flash9Options.usePeakData</h4>
+
+ <p>Note that <code class="in">soundManager.defaultOptions.peakData</code> will be undefined until SoundManager 2 has self-initialized, at which point it determines the flash version to use and creates the .SWF, etc. Only then will defaultOptions be populated with optional option parameters, if applicable.</p>
+
+ <p class="in">Once SM2 has written out the .SWF, it is safe to modify <code>soundManager.defaultOptions.usePeakData</code> directly, for example - but if making changes <em>before</em> initialization, eg., at the time when you are setting <code>soundManager.flashVersion</code>, it is best to modify the source objects as they haven't yet been merged. ie., <code>soundManager.flash9Options.usePeakData = true;</code></p>
+
+
+ </div>
+
+ </div>
+
+ </div>
+
+ <div id="soundmanager2-dynamic-properties" class="columnar">
+ <div class="c1">
+ <h2>SoundManager Runtime Properties</h2>
+ <p>Elements of SoundManager which are set at runtime, intended as read-only.</p>
+ </div>
+
+ <div class="c2">
+
+ <div class="f-block f-features f-supported f-waveformdata f-peakdata">
+
+ <h3 id="soundmanager-dynamic">SoundManager Dynamic (Runtime) Properties</h3>
+
+ <p class="in">Some properties are dynamic, determined at initialisation or later during runtime, and should be treated as read-only. Currently, <code><a href="#soundmanager-supported" onclick="resetFilter()">supported()</a></code> and <code>features</code> are the only properties that fall in this category.</p>
+
+ <h4 id="soundmanager-features">soundManager.features Object</h4>
+
+ <p class="in">As certain sound functionality is only available beginning with Flash 9, <code>soundManager.features</code> can provide a consistent way of checking for feature support.</p>
+
+ <p>The structure (intended as read-only) is currently as follows:</p>
+
+<pre class="block"><code>soundManager.features = {<span>
+ buffering: <span>[boolean]</span>,
+ peakData: <span>[boolean]</span>,
+ waveformData: <span>[boolean]</span>,
+ eqData: <span>[boolean]</span>,
+ movieStar: <span>[boolean]</span>
+</span>}</code></pre>
+
+ <p class="in">Example (checking for <code>peakData</code> support):</p>
+<pre class="block"><code>if (<span>soundManager.features.peakData</span>) {<span>
+ <span>// do peak data-related things here</span>
+</span>}</code></pre>
+
+ <p class="in">The features object is populated at initialisation time; the current feature support tests simply check the value of <code>soundManager.flashVersion</code> being >= 9. This object has been added in anticipation of additional features with future versions of Flash.</p>
+
+ </div>
+
+ </div>
+ </div>
+
+ <div id="soundmanager-events" class="columnar">
+ <div class="c1">
+ <h2>SoundManager Core Events</h2>
+ <p>Events fired by SoundManager at start-up</p>
+ </div>
+ <div class="c2">
+
+ <div class="f-block f-onload f-onerror f-oninitmovie">
+
+ <p class="in">The following events are attached to the <code>soundManager</code> global object and are useful for detecting the success/failure of the API's initialisation.</p>
+ <p>Keep in mind that these core events are effectively asynchronous (ie., they may fire long before or after <code class="in">window.onload()</code>) and therefore should not be relied on as the "ready" event for starting your application. Use the standard "DOM content loaded" or window load events for your own initialization routines.</p>
+ <p>For a more flexible queue-based, addListener-style approach to the onload event, see <code><a href="#soundmanager-onready" title="soundManager.onready() event queueing" onclick="resetFilter()">soundManager.onready()</a></code>.</p>
+
+ <dl>
+
+
+ <dt id="soundmanager-onerror" title="object:function">onerror()</dt>
+ <dd>Function called when SoundManager fails to successfully initialise after Flash attempts an init call via ExternalInterface.</dd>
+ <dd>Example: <code>soundManager.onerror = <span>function() { alert('SoundManager failed to load'); }</span></code></dd>
+ <dd>This handler should be called if there is an ExternalInterface problem or other exceptions that fire when the initialisation function is called.</dd>
+ <dd>If you want multiple listeners for this event, see <a href="#soundmanager-onready" onclick="resetFilter()">soundManager.onready()</a>.</dd>
+
+ <dt id="soundmanager-oninitmovie" title="object:function">oninitmovie()</dt>
+ <dd>Function called immediately after the SWF is either written to (or retrieved from) the DOM as part of the start-up process. This event can be useful if you wish to implement your own start-up time-out, eg. for handling flash blockers, start-up failures or other custom messaging.</dd>
+ <dd>Example: <code>soundManager.oninitmovie = <span>function(){ alert('SWF init.'); }</span></code></dd>
+
+ <dt id="soundmanager-onload" title="object:function">onload()</dt>
+ <dd>Function called when SoundManager has successfully loaded.</dd>
+ <dd>Example: <code>soundManager.onload = <span>function() { alert('SoundManager ready to use'); }</span></code></dd>
+ <dd>Once this function has been called, all core methods will be available to use.</dd>
+ <dd>Note that <code>onload()</code> is not called when SoundManager fails to load; instead, <code>onerror()</code> is called.</dd>
+ <dd>If you want multiple listeners for this event, see <a href="#soundmanager-onready" onclick="resetFilter()">soundManager.onready()</a>.</dd>
+
+ <dt title="method(object:function)">onready(<span>callback:function(status),[scope]</span>)</dt>
+ <dd title="callback:function">Queue <code>onload()</code>-style event listener(s), triggered when soundManager has either started or failed.</dd>
+ <dd>Example: <code>soundManager.onready(<span>myOnReadyHandler</span>); soundManager.onready(<span>myOtherHandler</span>);</code></dd>
+ <dd>For more detail and examples, see <a href="#soundmanager-onready" onclick="resetFilter()">soundManager.onready()</a>.</dd>
+
+ </dl>
+
+ </div>
+
+
+ </div>
+ </div>
+
+ <div class="columnar">
+ <div class="c1">
+ <h2>SoundManager Collections</h2>
+ <p>Object collections which SoundManager maintains during runtime.</p>
+ </div>
+ <div class="c2">
+
+ <div class="f-block">
+
+ <h3>SoundManager Object Collections</h3>
+
+ <dl>
+ <dt title="object:array">soundIDs[]</dt>
+ <dd>An array of sound ID strings, ordered by creation. Can be used to iterate through <code>sounds{}</code> by ID.</dd>
+ <dt title="object:array">sounds{}</dt>
+ <dd>An object literal/JSON-style instance of <code>SMSound</code> objects indexed by sound ID (as in <code>sounds['mySound']</code> or <code>sounds.mySound</code>), used internally by SoundManager. <code>soundManager.getSoundById()</code> may be used as an alternate to directly accessing this object.</dd>
+ </dl>
+
+ </div>
+
+ </div>
+ </div>
+
+ <div id="sound-options-object" class="columnar">
+
+ <div class="c1">
+ <h2>Sound Options Object Format</h2>
+ <p>Object Literal, JSON-style form passed to <code>createSound()</code> and <code>play()</code></p>
+ </div>
+
+ <div class="c2">
+
+ <div class="f-block s-onload"> <!-- f-createsound s-sid s-url s-autoload s-autoplay s-onload -->
+
+ <h3 id="object-literal-format">Object Literal Format</h3>
+
+ <p>Sounds can be created with instance-specific parameters in an object literal (JSON) format, where omitted parameters inherit default values as defined in soundManager.</p>
+
+<pre class="block"><code>soundManager.createSound({<span>
+ id: 'mySound',
+ url: '/path/to/some.mp3',
+ autoLoad: true,
+ autoPlay: false,
+ onload: function() {
+ alert('The sound '+this.sID+' loaded!');
+ },
+ volume: 50
+</span>});</code></pre>
+
+ <p>This object can also be passed as an optional argument to the <code class="in">play</code> method, overriding options set at creation time.</p>
+
+ <p>For a full list of available options, see <a href="#sound-properties" title="SoundManager 2 API info: Sound Properties" onclick="resetFilter()">Sound Properties Object</a></p>
+
+ </div>
+
+
+ </div>
+
+ </div>
+
+ <div id="col3" class="c3">
+
+
+ <!--
+ <div id="get-satisfaction" class="box">
+ <div id="gsfn_list_widget">
+ <h2><a href="http://getsatisfaction.com/schillmania/products/schillmania_soundmanager_2/" title="User discussion, FAQs and support for SoundManager 2" rel="nofollow">Discussion / Support</a><span class="l"></span><span class="r"></span></h2>
+ <div id="gsfn_content"></div>
+ <div class="powered_by"><a href="http://getsatisfaction.com/">Get Satisfaction support network</a></div>
+ </div>
+ </div>
+ -->
+
+ <div id="shortcuts">
+
+<!--
+ <div class="box">
+
+ <h2>Shortcuts<span class="l"></span><span class="r"></span></h2>
+
+ <ul class="first">
+ <li onclick="setFilter(event,'c-')" class="ignore">
+
+ <ul>
+
+ <li>Demos</li>
+ <li>Getting Started</li>
+ <li>Basic Use</li>
+ <li>Download</li>
+ <li>Requirements</li>
+ <li>Limitations</li>
+
+ <li>Debug Output</li>
+ <li>Revision History</li>
+ <li>About</li>
+ </ul>
+
+ </li>
+ </ul>
+
+ </div>
+-->
+
+ <div class="box">
+
+ <h2>API Elements<span class="l"></span><span class="r"></span></h2>
+
+ <p>SoundManager and SMSound API</p>
+
+ <ul id="shortcuts-list" class="first">
+ <li onclick="return setFilter(event,'f-')" class="ignore">
+
+ <h3 class="wedge">SoundManager<span class="l"></span><span class="r"></span></h3>
+
+ <h4>Properties</h4>
+ <ul>
+
+ <li>allowPolling</li>
+ <li>allowScriptAccess</li>
+ <li><a href="#soundmanager-alturl">altURL</a></li>
+ <li>consoleOnly</li>
+ <li><a href="#soundmanager-debugflash">debugFlash</a></li>
+ <li><a href="#soundmanager-debugmode">debugMode</a></li>
+ <li><a href="#smdefaults">defaultOptions</a></li>
+ <li class="flash9" title="Flash 9-only"><a href="#sound-properties-flash9">flash9Options</a></li>
+ <li><a href="#soundmanager-features">features</a></li>
+ <li><a href="#soundmanager-flashloadtimeout">flashLoadTimeout</a></li>
+ <li><a href="#soundmanager-flashversion">flashVersion</a></li>
+ <li class="flash9" title="Flash 9.0r115+ only"><a href="#sound-properties-flash9">movieStarOptions</a></li>
+ <li>nullURL</li>
+ <li><a href="#soundmanager-url">url</a></li>
+ <li>useConsole</li>
+ <li class="flash9" title="Flash 9+ only"><a href="#soundmanager-usefastpolling">useFastPolling</a></li>
+ <li><a href="#soundmanager-useflashblock">useFlashBlock</a></li>
+ <li><a href="#soundmanager-highperformance">useHighPerformance</a></li>
+ <li class="recent" title="Recently-added, beta feature">useHTML5Audio</li>
+ <li class="flash9" title="Flash 9.0r115+ only">useMovieStar</li>
+ <li class="flash9" title="Flash 9.0r115+ only"><a href="#soundmanager-wmode">wmode</a></li>
+ <li>waitForWindowLoad</li>
+ </ul>
+
+ <h4>Methods</h4>
+
+ <ul>
+ <li class="recent"><a href="#soundmanager-canplaylink" title="Recently-added feature">canPlayLink()</a></li>
+ <li class="recent"><a href="#soundmanager-canplaymime" title="Recently-added feature">canPlayMIME()</a></li>
+ <li><a href="#soundmanager-canplayurl">canPlayURL()</a></li>
+ <li><a href="#soundmanager-createsound">createSound()</a></li>
+ <li><a href="#soundmanager-destroysound">destroySound()</a></li>
+ <li class="flash9" title="Flash 9.0+ only"><a href="#soundmanager-getmemoryuse">getMemoryUse()</a></li>
+ <li><a href="#soundmanager-getsoundbyid">getSoundById()</a></li>
+ <li><a href="#soundmanager-load">load()</a></li>
+ <li><a href="#soundmanager-loadfromxml">loadFromXML()</a></li>
+ <li><a href="#soundmanager-mute">mute()</a></li>
+ <li><a href="#soundmanager-pause">pause()</a></li>
+ <li><a href="#soundmanager-pauseall">pauseAll()</a></li>
+ <li><a href="#soundmanager-play">play()</a></li>
+ <li><a href="#soundmanager-reboot">reboot()</a></li>
+ <li><a href="#soundmanager-resume">resume()</a></li>
+ <li><a href="#soundmanager-resumeall">resumeAll()</a></li>
+ <li><a href="#soundmanager-setpan">setPan()</a></li>
+ <li><a href="#soundmanager-setposition">setPosition()</a></li>
+ <li><a href="#soundmanager-setvolume">setVolume()</a></li>
+ <li><a href="#soundmanager-supported">supported()</a></li>
+ <li><a href="#soundmanager-stop">stop()</a></li>
+
+ <li><a href="#soundmanager-stopall">stopAll()</a></li>
+ <li><a href="#soundmanager-togglemute">toggleMute()</a></li>
+ <li><a href="#soundmanager-togglepause">togglePause()</a></li>
+ <li><a href="#soundmanager-unload">unload()</a></li>
+ <li><a href="#soundmanager-unmute">unmute()</a></li>
+ </ul>
+
+ <h4>Events</h4>
+ <ul>
+ <li><a href="#soundmanager-onerror">onerror()</a></li>
+ <li><a href="#soundmanager-oninitmovie">oninitmovie()</a></li>
+ <li><a href="#soundmanager-onload">onload()</a></li>
+ <li><a href="#soundmanager-onready">onready()</a></li>
+ </ul>
+
+ </li>
+
+ <li onclick="setFilter(event,'s-')" class="ignore">
+
+ <h3 class="wedge">SMSound <span class="archive">(Sound Object)</span><span class="l"></span><span class="r"></span></h3>
+
+ <h4>Properties (Instance Options)</h4>
+ <ul>
+ <li>autoLoad</li>
+ <li>autoPlay</li>
+ <li title="Flash 9.0r115+ only" class="flash9">bufferTime</li>
+ <li title="Flash 9+ only" class="flash9"><a href="#smsound-eqdata">eqData</a></li>
+ <li title="Flash 9.0r115+ only" class="flash9">isMovieStar</li>
+ <li title="Recently-updated feature" class="recent">loops</li>
+ <li>multiShot</li>
+ <li>multiShotEvents</li>
+ <li>onbeforefinishtime</li>
+ <li>onjustbeforefinishtime</li>
+ <li>pan</li>
+ <li title="Flash 9+ only" class="flash9"><a href="#smsound-peakdata">peakData</a></li>
+ <li><a href="#smsound-position">position</a></li>
+ <li title="Flash 9+ only, new feature" class="flash9 new"><a href="#smsound-serverurl">serverURL</a></li>
+ <li><a href="#smsound-sid">sID</a></li>
+ <li>stream</li>
+ <li title="Recently-added feature" class="recent"><a href="#smsound-type">type</a></li>
+ <li><a href="#smsound-url">url</a></li>
+ <li title="New feature" class="new"><a href="#smsound-usepolicyfile">usePolicyFile</a></li>
+ <li>volume</li>
+ <li title="Flash 9+ only" class="flash9"><a href="#smsound-waveformdata">waveformData</a></li>
+ </ul>
+
+ <h4>Dynamic Properties</h4>
+ <ul>
+
+ <li><a href="#smsound-bytesloaded">bytesLoaded</a></li>
+ <li><a href="#smsound-bytestotal">bytesTotal</a></li>
+ <li title="Flash 9+" class="flash9"><a href="#smsound-isbuffering">isBuffering</a></li>
+ <li title="Flash 9+, new feature" class="flash9 new"><a href="#smsound-connected">connected</a></li>
+ <li><a href="#smsound-didbeforefinish">didBeforeFinish</a></li>
+ <li><a href="#smsound-didjustbeforefinish">didJustBeforeFinish</a></li>
+ <li><a href="#smsound-duration">duration</a></li>
+ <li><a href="#smsound-durationestimate">durationEstimate</a></li>
+ <li><a href="#smsound-loaded">loaded</a></li>
+ <li><a href="#smsound-muted">muted</a></li>
+ <li><a href="#smsound-paused">paused</a></li>
+ <li><a href="#smsound-playstate">playState</a></li>
+ <li><a href="#smsound-position">position</a></li>
+ <li><a href="#smsound-readystate">readyState</a></li>
+ </ul>
+
+ <h4>Events</h4>
+ <ul>
+ <li title="Flash 9+ required, recently-added feature" class="recent"><a href="#smsound-onbufferchange">onbufferchange()</a></li>
+ <li title="Flash 9+ required, new feature" class="new"><a href="#smsound-onconnect">onconnect()</a></li>
+ <li title="Flash 9.0.r115+" class="flash9"><a href="#smsound-ondataerror">ondataerror()</a></li>
+ <li><a href="#smsound-onfinish">onfinish()</a></li>
+ <li><a href="#smsound-onload">onload()</a></li>
+ <li><a href="#smsound-onpause">onpause()</a></li>
+ <li><a href="#smsound-onplay">onplay()</a></li>
+ <li class="new"><a href="#smsound-onposition">onposition()</a></li>
+ <li><a href="#smsound-onresume">onresume()</a></li>
+ <li><a href="#smsound-onstop">onstop()</a></li>
+ <li><a href="#smsound-onbeforefinishcomplete">onbeforefinishcomplete()</a></li>
+ <li><a href="#smsound-onbeforefinish">onbeforefinish()</a></li>
+ <li><a href="#smsound-onjustbeforefinish">onjustbeforefinish()</a></li>
+ <li><a href="#smsound-onid3">onid3()</a></li>
+ <li><a href="#smsound-whileloading">whileloading()</a></li>
+ <li><a href="#smsound-whileplaying">whileplaying()</a></li>
+ </ul>
+
+ <h4>Methods</h4>
+
+ <ul>
+ <li><a href="#smsound-destruct">destruct()</a></li>
+ <li><a href="#smsound-load">load()</a></li>
+ <li><a href="#smsound-mute">mute()</a></li>
+ <li><a href="#smsound-pause">pause()</a></li>
+ <li><a href="#smsound-resume">resume()</a></li>
+ <li><a href="#smsound-setpan">setPan()</a></li>
+ <li><a href="#smsound-setposition">setPosition()</a></li>
+ <li><a href="#smsound-setvolume">setVolume()</a></li>
+ <li><a href="#smsound-stop">stop()</a></li>
+ <li><a href="#smsound-togglemute">toggleMute()</a></li>
+ <li><a href="#smsound-togglepause">togglePause()</a></li>
+ <li><a href="#smsound-unload">unload()</a></li>
+ <li><a href="#smsound-unmute">unmute()</a></li>
+ </ul>
+
+ </li>
+ </ul>
+
+ <!-- /.box -->
+ </div>
+
+ </div>
+
+ </div>
+
+ <div class="clear"></div>
+
+ <!-- /main -->
+ </div>
+
+ <!-- /content -->
+ </div>
+
+<script type="text/javascript">
+init();
+</script>
+
+
+</body>
+
+</html>
diff --git a/docs/dymaxion/soundmanagerv297a-20101010/doc/resources/index.html b/docs/dymaxion/soundmanagerv297a-20101010/doc/resources/index.html new file mode 100755 index 0000000..a5b2c73 --- /dev/null +++ b/docs/dymaxion/soundmanagerv297a-20101010/doc/resources/index.html @@ -0,0 +1,239 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+<title>SoundManager 2: Resources</title> +<meta name="robots" content="noindex" />
+<meta name="description" content="Sound and media web projects related to SoundManager 2." />
+<meta name="keywords" content="javascript sound, javascript audio, media web, embedded audio, embedded video" />
+<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" />
+<script type="text/javascript" src="../../script/soundmanager2.js"></script>
+<script type="text/javascript" src="../../demo/index.js"></script>
+<script type="text/javascript">
+ soundManager.handleFlashBlock = false;
+ soundManager.debugMode = false;
+ soundManager.url = '../../swf/';
+ soundManager.onload = function() {
+ }
+</script>
+</head>
+
+<body>
+
+<div id="content">
+
+ <div id="top">
+
+ <h1>SoundManager 2: Resources</h1>
+
+ <div id="nav">
+ <ul>
+
+ <li>
+ <a href="../../">Home</a>
+ </li>
+
+ <li>
+ <a href="#">Demos</a>
+ <ul>
+ <li><a href="../../demo/api/">API Examples</a></li>
+ <li><a href="../../demo/play-mp3-links/" class="exclude">Playable MP3 links</a></li>
+ <li><a href="../../demo/mp3-player-button/" class="exclude">Basic MP3 Play Button</a></li>
+ <li><a href="../../demo/page-player/">Muxtape-style UI</a></li>
+ <li><a href="../../demo/360-player/">360° Player UI</a></li>
+ <li><a href="../../demo/mpc/">Drum Machine (MPC)</a></li>
+ <li><a href="../../demo/animation/">DOM/Animation Demos</a></li>
+ <li><a href="../../demo/flashblock/">FlashBlock Handling</a></li>
+ <li><a href="../../demo/template/">Basic Template</a></li>
+ </ul>
+ </li>
+
+ <li>
+ <a href="../getstarted/">Getting Started</a>
+ <ul>
+ <li><a href="../getstarted/#how-sm2-works">How SoundManager 2 works</a></li>
+ <li><a href="../getstarted/#basic-inclusion">Including SM2 on your site</a></li>
+ <li><a href="../getstarted/#troubleshooting">Troubleshooting</a></li>
+ </ul>
+ </li>
+
+ <li>
+ <a href="..">Documentation</a>
+ <ul>
+ <li><a href="../#sm-config">SoundManager Properties</a></li>
+ <li><a href="../#sound-object-properties">Sound Object Properties</a></li>
+ <li><a href="../#smdefaults">Global Sound Defaults</a></li>
+ <li><a href="../#api">SoundManager Core API</a></li>
+ <li><a href="../#smsoundmethods">Sound Object (SMSound) API</a></li>
+ </ul>
+ </li>
+
+ <li>
+ <a href="../download/">Download</a>
+ <ul>
+ <li><a href="../download/#latest">Get SoundManager 2</a></li>
+ <li><a href="../download/#revision-history">Revision History</a></li>
+ </ul>
+ </li>
+
+ <li>
+ <a href="../technotes/">Technical Notes</a>
+ <ul>
+ <li><a href="../technotes/#requirements">System Requirements</a></li>
+ <li><a href="../technotes/#debug-output">Debug + Console Output</a></li>
+ </ul>
+ </li>
+
+ <li>
+ <strong><a href="#">Resources</a></strong>
+ <ul>
+ <li><a href="#licensing">Licensing</a></li>
+ <li><a href="#related">Related Projects</a></li>
+ <li><a href="http://getsatisfaction.com/schillmania/products/schillmania_soundmanager_2/">SM2 support / discussion</a></li>
+ <li><a href="http://www.schillmania.com/content/react/contact/">Contact Info @ Schillmania.com</a></li>
+ </ul>
+ </li>
+
+ </ul>
+ <div class="clear"></div>
+ </div>
+
+ </div>
+
+ <div id="main" class="triple">
+
+
+ <div class="columnar">
+
+ <div class="c1">
+ <h2>Licensing</h2>
+ <p>BSD licensed.</p>
+ </div>
+
+ <div class="c2">
+ <h3>SoundManager 2 License</h3>
+ <p>SoundManager 2 is provided under a <a href="../../license.txt" title="SoundManager 2 BSD license" class="norewrite">BSD license</a>.</p>
+ </div>
+
+ </div>
+
+
+ <div id="related" class="columnar">
+ <div class="c1">
+ <h2>General + Related</h2>
+ <p>Other information about SoundManager 2.</p>
+ </div>
+
+ <div class="c2">
+
+ <div class="f-block c-about">
+ <h3 id="general">General</h3>
+ <p>SoundManager was written to meet a desire to have Javascript-driven sound for interactive web-based projects, and "to make it easy to play MP3s in the browser." It is free for use in both personal and commercial projects (see <a href="#licensing" title="SoundManager 2 licensing information" onclick="resetFilter()">Licensing</a>.) It was originally developed for personal use and has been packaged with the hopes of being useful to others.</p>
+ </div>
+
+ <div class="f-block">
+
+ <h3 id="related-projects">Related Projects</h3>
+
+ <h4 id="html5-compatibility">HTML 5 Audio/Video Compatibility Wrappers, <audio> for HTML 4 etc.</h4>
+ <p><a href="http://gettingsoftware.posterous.com/html5flash-using-html5-video-and-audio-right">HTML5Flash</a> is a project that lets you use HTML 5's <code><audio></code> and <code><video></code> tags in HTML 4 browsers, making them compatible using SoundManager 2 behind the scenes.</p>
+ <p>Additionally, see the <a href="http://getsatisfaction.com/schillmania/topics/html5_audio">SM2 discussion thread on HTML 5 audio</a> support.</p>
+
+ <h4>JavaScript/DHTML/Flash MP3 and video players</h4>
+ <p>Searching for an included/embedded-type media player? These related projects might be of use.</p>
+ <ul>
+ <li><a href="http://www.happyworm.com/jquery/jplayer/" title="Happyworm jPlayer">jPlayer</a> is a HTML5/Flash player which jQuery fans should feel at home with; several different players and skins are provided.</li>
+ <li><a href="http://flowplayer.org" title="Flowplayer does video, with free and commercial versions available">Flowplayer</a> is a pretty solid GPL Flash-based video player with a JS API.</li>
+ <li><a href="http://www.longtailvideo.com/players/jw-flv-player/">JW FLV Player</a> is a general-purpose Flash-based player which can handle FLV, MP3, MP4 and a number of image formats.</li>
+ <li><a href="http://developer.yahoo.com/mediaplayer/" title="An embedded player that supports a number of sound formats">Yahoo! Media Player</a> supports a number of different formats depending on installed plugins (WMA etc.), can display artist / album information and so on.</li>
+ <li><a href="http://jssoundkit.sourceforge.net/" title="A Javascript/Flash MP3 player">JSSoundkit</a>, an MP3 player with a simple UI.</li>
+ </ul>
+
+ <h3 id="external-links">Links</h3>
+ <ul>
+ <li><a href="http://www.schillmania.com/projects/soundmanager2/" title="SoundManager 2 Web Home">SoundManager 2 Project Page</a> (schillmania.com)</li>
+ <li><a href="http://livedocs.adobe.com/flash/8/" title="Info on Flash 8's sound object">Flash 8 / AS2 documentation</a> (livedocs.macromedia.com) - download, open index.html under "main" subdirectory, use navigation: ActionScript 2.0 Language Reference -> ActionScript Classes -> Sound</li>
+ <li id="fpgss"><a href="http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html" title="Configure Flash security settings">Flash Player Global Security Settings Panel</a> - Configure your Flash Player security, eg., allow SM2 .swf on your local filesystem to have internet access for testing by whitelisting its location eg. file://Users/Administrator/Desktop/soundmanager... etc. Alternately, view the page over HTTP and access internet resources that way.</li>
+ </ul>
+
+ </div>
+
+ <div class="f-block c-about">
+ <h3 id="sonundmanager-about">About</h3>
+ <p><a href="http://www.schillmania.com" title="Scott Schiller's experimental design site">Scott Schiller</a> (<a href="http://www.schillmania.com/content/react/contact/" title="Contact Info @ Schillmania.comrmation for Scott Schiller">contact</a>) is a Front-end Engineer (previously "Web Developer") who builds fun creative and technical stuff on the web - or failing that, tries - when he has free time. He likes building cool things which contribute to, yet enjoys mocking, the <a href="http://www.schillmania.com/content/opinion/2005/10/dont-believe-the-web-20-hype/" title="Web 2.0: Don't Believe The Hype!">Web 2.0 meme</a>. (See <a href="http://www.schillmania.com/content/entries/2006/08/how-web20-aware-are-you/" title="Take the Web 2.0 Awareness Test!">How Web 2.0-Aware Are You?</a>)</p>
+ </div>
+
+ </div>
+
+ </div>
+
+
+ <div id="col3" class="c3">
+
+
+ <div id="get-satisfaction" class="box">
+ <div id="gsfn_list_widget">
+ <h2><a href="http://getsatisfaction.com/schillmania/products/schillmania_soundmanager_2/" title="User discussion, FAQs and support for SoundManager 2">Discussion / Support</a><span class="l"></span><span class="r"></span></h2>
+ <div id="gsfn_content"></div>
+ <div class="powered_by"><a href="http://getsatisfaction.com/">Get Satisfaction support network</a></div>
+ </div>
+ <!-- /.box -->
+
+ </div>
+
+ <div id="shortcuts">
+
+<!--
+ <div class="box">
+
+ <h2>Shortcuts<span class="l"></span><span class="r"></span></h2>
+
+ <ul class="first">
+ <li onclick="setFilter(event,'c-')" class="ignore">
+
+ <ul>
+
+ <li>Demos</li>
+ <li>Getting Started</li>
+ <li>Basic Use</li>
+ <li>Download</li>
+ <li>Requirements</li>
+ <li>Limitations</li>
+
+ <li>Debug Output</li>
+ <li>Revision History</li>
+ <li>About</li>
+ </ul>
+
+ </li>
+ </ul>
+
+ </div>
+-->
+
+ </div>
+
+
+
+ </div>
+
+ <div class="clear"></div>
+
+ <!-- /main -->
+ </div>
+
+ <!-- /content -->
+ </div>
+
+<script type="text/javascript">
+init();
+</script>
+
+</body>
+
+</html>
diff --git a/docs/dymaxion/soundmanagerv297a-20101010/doc/technotes/index.html b/docs/dymaxion/soundmanagerv297a-20101010/doc/technotes/index.html new file mode 100755 index 0000000..baec8e2 --- /dev/null +++ b/docs/dymaxion/soundmanagerv297a-20101010/doc/technotes/index.html @@ -0,0 +1,305 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+<title>SoundManager 2: Technical Notes</title> +<meta name="robots" content="noindex" />
+<meta name="description" content="Requirements and Specifications for SoundManager 2, the Javascript Sound API" />
+<meta name="keywords" content="javascript sound, javascript audio, technical specifications, requirements, licensing" />
+<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" />
+<script type="text/javascript" src="../../script/soundmanager2.js"></script>
+<script type="text/javascript" src="../../demo/index.js"></script>
+<script type="text/javascript">
+ soundManager.debugMode = true;
+ soundManager.debugFlash = true;
+ soundManager.url = '../../swf/';
+ soundManager.onload = function() {
+ }
+</script>
+</head>
+
+<body>
+
+<div id="content">
+
+ <div id="top">
+
+ <h1>SoundManager 2: Technical Notes</h1>
+
+ <div id="nav">
+ <ul>
+
+ <li>
+ <a href="../../">Home</a>
+ </li>
+
+ <li>
+ <a href="#">Demos</a>
+ <ul>
+ <li><a href="../../demo/api/">API Examples</a></li>
+ <li><a href="../../demo/play-mp3-links/" class="exclude">Playable MP3 links</a></li>
+ <li><a href="../../demo/mp3-player-button/" class="exclude">Basic MP3 Play Button</a></li>
+ <li><a href="../../demo/page-player/">Muxtape-style UI</a></li>
+ <li><a href="../../demo/360-player/">360° Player UI</a></li>
+ <li><a href="../../demo/mpc/">Drum Machine (MPC)</a></li>
+ <li><a href="../../demo/animation/">DOM/Animation Demos</a></li>
+ <li><a href="../../demo/flashblock/">FlashBlock Handling</a></li>
+ <li><a href="../../demo/template/">Basic Template</a></li>
+ </ul>
+ </li>
+
+ <li>
+ <a href="../getstarted/">Getting Started</a>
+ <ul>
+ <li><a href="../getstarted/#how-sm2-works">How SoundManager 2 works</a></li>
+ <li><a href="../getstarted/#basic-inclusion">Including SM2 on your site</a></li>
+ <li><a href="../getstarted/#troubleshooting">Troubleshooting</a></li>
+ </ul>
+ </li>
+
+ <li>
+ <a href="..">Documentation</a>
+ <ul>
+ <li><a href="../#sm-config">SoundManager Properties</a></li>
+ <li><a href="../#sound-object-properties">Sound Object Properties</a></li>
+ <li><a href="../#smdefaults">Global Sound Defaults</a></li>
+ <li><a href="../#api">SoundManager Core API</a></li>
+ <li><a href="../#smsoundmethods">Sound Object (SMSound) API</a></li>
+ </ul>
+ </li>
+
+ <li>
+ <a href="../download/">Download</a>
+ <ul>
+ <li><a href="../download/#latest">Get SoundManager 2</a></li>
+ <li><a href="../download/#revision-history">Revision History</a></li>
+ </ul>
+ </li>
+
+ <li>
+ <strong><a href="../technotes/">Technical Notes</a></strong>
+ <ul>
+ <li><a href="../technotes/#requirements">System Requirements</a></li>
+ <li><a href="../technotes/#debug-output">Debug + Console Output</a></li>
+ </ul>
+ </li>
+
+ <li>
+ <a href="../resources/">Resources</a>
+ <ul>
+ <li><a href="../resources/#licensing">Licensing</a></li>
+ <li><a href="../resources/#related">Related Projects</a></li>
+ <li><a href="http://getsatisfaction.com/schillmania/products/schillmania_soundmanager_2/">SM2 support / discussion</a></li>
+ <li><a href="http://www.schillmania.com/content/react/contact/">Contact Info @ Schillmania.com</a></li>
+ </ul>
+ </li>
+
+ </ul>
+ <div class="clear"></div>
+ </div>
+
+ </div>
+
+ <div id="main" class="triple">
+
+
+ <div id="filter-box" class="columnar">
+
+ <div class="c1">
+ <div id="reset-filter"></div>
+ </div>
+
+ <div class="c2">
+ <div id="search-results"><!-- search results for %s --></div>
+ </div>
+
+ </div>
+
+ <div class="columnar">
+
+ <div class="c1">
+ <h2>Requirements + Specifications</h2>
+ <p>What SM2 needs, and how it works.</p>
+ </div>
+
+ <div class="c2">
+
+ <div class="f-block c-requirements">
+
+ <h3>Requirements + Specifications</h3>
+
+ <h4 style="margin-top:1.5em">Prerequisites (client)</h4>
+
+ <ul>
+ <li>Flash plugin, version 8 or higher</li>
+ <li>Supported Browser</li>
+ </ul>
+
+ <h4>Supported Browsers/Platforms</h4>
+
+ <p>Javascript-to-flash communication is possible through Flash 8's ExternalInterface feature, which uses a standard browser plugin architecture implemented by each browser manufacturer (see <a href="http://www.mozilla.org/projects/plugins/npruntime.html" title="Mozilla plugin scripting reference">NPAPI</a>.) As a result, the following browsers should be supported:</p>
+
+ <ul>
+ <li>IE 5.0+, Windows</li>
+ <li>Netscape 8.0+, Windows/Mac</li>
+ <li>Mozilla 1.7.5+, Windows/Mac</li>
+ <li>Firefox 1.0+, Windows/Mac</li>
+ <li>Firefox 1.5+, Linux (Flash 9 beta)</li>
+ <li>Safari 1.3+, Mac / All Windows versions</li>
+ <li>Google Chrome (All versions/OSes)</li>
+ <li>Opera 9.10 (slightly buggy, 9.5+ ideal), Windows/Mac</li>
+ </ul>
+
+ <p>For reference, see Adobe's <a href="http://livedocs.macromedia.com/flash/8/" title="Adobe Flash 8 documentation">Flash 8 documentation</a>, under the "ExternalInterface support" page which details supported browsers.</p>
+
+ <p>At this time, not all combinations of browser/OS have been tested. Some unlisted configurations may be supported, but have not been explicitly verified to work.</p>
+
+ </div>
+
+ <div class="f-block c-limitations">
+
+ <h3 id="caveats">Caveats + Limitations / FAQ</h3>
+
+ </div>
+
+ <div class="f-block c-limitations">
+
+ <h4>Supported sound formats (MP3 via Flash 8 and MP4/M4A/AAC via Flash 9 "MovieStar", with caveats)</h4>
+ <p>SM2 uses Flash's native Sound object for loading and managing sound, so it is subject to the same limitations that Flash 8 is. Perhaps a design decision, the Flash 8 sound object only supports MP3 files through the <code class="in">loadSound()</code> ActionScript method. SM2 is not able to load other sound formats, including audio-only SWF files, due to this limitation. Refer to the <a href="http://livedocs.macromedia.com/flash/8/" title="Info on Flash 8's sound object">Flash 8 documentation</a> for details.</p>
+
+ <h4>MP3 Format Caveats</h4>
+ <p>Additionally, some very low and very high bitrate MP3s, and Variable Bitrate (VBR) MP3s may play either too quickly or too slowly (see <a href="http://www.boutell.com/newfaq/creating/chipmunk.html" title="Flash mp3 chipmunk problem description">"the chipmunk problem"</a>); if you are encountering this issue, try re-encoding at a different bitrate (between 64 kbps and 192 kbps, for example.) Using Constant Bitrate (CBR) encoding may also alleviate this problem.</p>
+ <p>It has been suggested that sample rates that are neither 22/44 KHz can also contribute to this issue. 44 KHz is the standard CD-spec sample rate, and is recommended for "hi-fi" recordings.</p>
+
+ <h4>Looping</h4>
+ <p class="in">Perhaps due to the way Flash dynamically loads and decodes MP3 data, seamless looping doesn't seem to be fully implemented. Loops have a noticeable gap between the finish and start. This has been an issue since the original version of SoundManager. Rather than have a broken feature, the funcionality has been omitted until a solid workaround is found.</p>
+
+ <h4>Flash 8 limitations with multiShot (overlaying/"chorus") effects</h4>
+ <p class="in">Regarding "layering" sounds (calling <code>play()</code> on a sound multiple times): Even though a multi-shot option can be specified, it does not work with Flash 8; a single instance of a sound can only have one timeline. The current behaviour is that when <code>multiShot</code> is specified and <code>play()</code> is called on a currently-playing sound, it will restart from the beginning without an overlay.</p>
+ <p>However, the API does provide some creative ways (<code class="in">onbeforefinish</code> for looping, multiple sound objects for multi-shot layering) of working around these Flash limitations.</p>
+ <p>It should be noted that sounds can loop seamlessly and be layered when linked and exported to SWF from within the Flash IDE, but SoundManager does not support SWF-based audio.</p>
+
+ <h4>Flash 9 multiShot capabilities</h4>
+ <p class="in">The Flash 9-based version of SoundManager2 can successfully layer sounds via "multiShot", truly playing a single sound multiple times on top of itself. However the API will only call certain timing-related methods such as <code>whileplaying()</code> for the first <code>play()</code> "instance" of the sound, to avoid confusion. By contrast, simpler methods such as <code>onfinish()</code> will be called multiple times, one for each instance of <code>play()</code>.</p>
+
+ <h4 id="id3-parsing">ID3 Parsing</h4>
+ <p>ID3 data can differ in formatting, version and subsequently be oddly-parsed by Flash. Values may sometimes be repeated across different fields.</p>
+ <p>ID3 info seems to fail to load for iTunes 7-edited files, perhaps due to the format or inclusion of album artwork (image data.)</p>
+
+ <h4>Performance Notes: Caching + RAM Obeservations</h4>
+ <p>Flash appears to use the browser cache (presumably the OS' native, or closest browser,) so the browser's cache size and other settings may affect Flash's cache behaviour. It is safe to assume a 100 MB MP3 will probably not be cached, for example, but a 16 MB one most likely will be.</p>
+ <p>MP3s appear to be loaded and stored in RAM while loading over HTTP, so memory use needs to be considered for both large MP3s and streaming radio-type applications.</p>
+
+ <h4>Timing/Latency (JS + Flash, ExternalInterface-related)</h4>
+ <p>Javascript-to-Flash communication is not instantaneous on slower systems, but can be much better on more modern systems. Latency (timing lag/delays) can be noted in some cases from function call to sound execution. It is possible some performance analysis can help to speed up this area for timing-critical applications involving animation etc., but this area has not been thoroughly investigated yet. Brad Neuberg has some notes on <a href="http://codinginparadise.org/weblog/2006/02/how-to-speed-up-flash-8s.html" title="Brad Neuberg - How To Speed Up ExternalInterface">speeding up ExternalInterface</a> which may be relevant.</p>
+ <p>Flash-to-OS/hardware latency (where flash reports progress, but no sound is heard for a number of milliseconds) may also be an unfortunate reality of Flash-based audio, varying between platform and OS version etc.</p>
+ <p>Additionally, MP3 files may contain audible gaps at the beginning or end by default when encoded, even if the source (eg. WAVE) file did not. Using optional "nogap" encoding options with programs such as LAME may help to remedy this.</p>
+ <p>Finally, the <code class="in">useHighPerformance</code> option may help with JS/flash lag. Using this option causes the flash movie to be placed with position:fixed on-screen at all times (though in a small, hidden box) and has been shown to notably improve performance on Mac OS X. As well, <code class="in">useFastPolling</code> will use a lower timer interval within Flash, making polling calls run as quickly as reasonably possible and increasing the frequency of calls to <code class="in">whileplaying()</code>, <code class="in">whileloading()</code> and other time-related events.</p>
+
+ </div>
+
+ </div>
+
+ </div>
+
+ <div id="debug-output" class="columnar">
+ <div class="c1">
+ <h2>Debug + Console Output</h2>
+ <p>Console-style messaging, useful for troubleshooting start-up and runtime issues.</p>
+ </div>
+
+ <div class="c2">
+ <h3>Live Debug Output</h3>
+ <p class="in">With debug mode enabled via <code>soundManager.debugMode = true</code>, SM2 can write helpful troubleshooting information to javascript <code>console.log()</code>-style interfaces. Additionally, output can be written to an optional DIV element with the ID of "<code>soundmanager-debug</code>".</p>
+ <p class="in"><code>soundManager.consoleOnly</code> can be set to true to disable HTML output (using <code>console.log()</code>-only methods) as well.</p>
+ <p>Additionally, debugging within the Flash portion of SM2 is also available and set using <code>soundManager.debugFlash = true</code>. Debug messages are written to the flash movie itself.</p>
+ <p>For info on SoundManager 2 loading/initialization failures and how to fix them, see <a href="../getstarted/#troubleshooting">troubleshooting</a>.</p>
+
+ <p>Below is a live example of debug output from SM2:</p>
+
+ <div id="live-debug" class="block">
+ <div id="soundmanager-debug" class="code">
+ <!-- live debug goes here -->
+ </div>
+ </div>
+
+ <p>And, Flash debug output:</p>
+
+ <div id="sm2-container">
+ <!-- flash movie goes here -->
+ </div>
+
+ </div>
+
+ </div>
+
+
+ <div id="col3" class="c3">
+
+
+ <div id="get-satisfaction" class="box">
+ <div id="gsfn_list_widget">
+ <h2><a href="http://getsatisfaction.com/schillmania/products/schillmania_soundmanager_2/" title="User discussion, FAQs and support for SoundManager 2" rel="nofollow">Discussion / Support</a><span class="l"></span><span class="r"></span></h2>
+ <div id="gsfn_content"></div>
+ <div class="powered_by"><a href="http://getsatisfaction.com/">Get Satisfaction support network</a></div>
+ </div>
+ <!-- /.box -->
+
+ </div>
+
+ <div id="shortcuts">
+
+<!--
+ <div class="box">
+
+ <h2>Shortcuts<span class="l"></span><span class="r"></span></h2>
+
+ <ul class="first">
+ <li onclick="setFilter(event,'c-')" class="ignore">
+
+ <ul>
+
+ <li>Demos</li>
+ <li>Getting Started</li>
+ <li>Basic Use</li>
+ <li>Download</li>
+ <li>Requirements</li>
+ <li>Limitations</li>
+
+ <li>Debug Output</li>
+ <li>Revision History</li>
+ <li>About</li>
+ </ul>
+
+ </li>
+ </ul>
+
+ </div>
+-->
+
+ </div>
+
+
+
+ </div>
+
+ <div class="clear"></div>
+
+ <!-- /main -->
+ </div>
+
+ <!-- /content -->
+ </div>
+
+<script type="text/javascript">
+init();
+</script>
+
+</body>
+
+</html>
|
