From 7bd9058651bafe7c994164dcd6c98d7298bc7f5d Mon Sep 17 00:00:00 2001 From: olivier <> Date: Fri, 10 Apr 2009 14:32:40 +0000 Subject: [PATCH] eztelemeta: bundle SoundManager2 v294a-20090206 --- .../eztelemetaitem/eztelemetaitemtype.php | 11 +- .../design/standard/javascript/init.js | 0 .../design/standard/javascript/page-player.js | 1014 +++++++++++ .../javascript/soundmanager2-nodebug-jsmin.js | 12 + .../standard/javascript/soundmanager2.js | 1615 +++++++++++++++++ .../standard/stylesheets/page-player.css | 758 ++++++++ .../design/standard/swf/soundmanager2.swf | Bin 0 -> 2436 bytes .../standard/swf/soundmanager2_flash9.swf | Bin 0 -> 8273 bytes tools/eztelemeta/settings/design.ini.append | 6 + 9 files changed, 3410 insertions(+), 6 deletions(-) create mode 100644 tools/eztelemeta/design/standard/javascript/init.js create mode 100644 tools/eztelemeta/design/standard/javascript/page-player.js create mode 100644 tools/eztelemeta/design/standard/javascript/soundmanager2-nodebug-jsmin.js create mode 100644 tools/eztelemeta/design/standard/javascript/soundmanager2.js create mode 100644 tools/eztelemeta/design/standard/stylesheets/page-player.css create mode 100644 tools/eztelemeta/design/standard/swf/soundmanager2.swf create mode 100644 tools/eztelemeta/design/standard/swf/soundmanager2_flash9.swf diff --git a/tools/eztelemeta/datatypes/eztelemetaitem/eztelemetaitemtype.php b/tools/eztelemeta/datatypes/eztelemetaitem/eztelemetaitemtype.php index 3cfb8642..089e1bf1 100755 --- a/tools/eztelemeta/datatypes/eztelemetaitem/eztelemetaitemtype.php +++ b/tools/eztelemeta/datatypes/eztelemetaitem/eztelemetaitemtype.php @@ -8,7 +8,6 @@ * @license CeCILL Free Software License Agreement */ - /** * Class definining the Telemeta Item datatype * @@ -31,8 +30,8 @@ class eZTelemetaItemType extends eZDataType $idvar = "{$base}_itemid_" . $attribute->attribute('id'); $urlvar = "{$base}_url_" . $attribute->attribute('id'); if ($http->hasPostVariable($idvar)) { - $itemId = trim($http->postVariable($idvar)); - $url = trim($http->postVariable($urlvar)); + $itemId = trim($http->postVariable($idvar)); + $url = trim($http->postVariable($urlvar)); $classAttribute = $attribute->contentClassAttribute(); if ($classAttribute->attribute("is_required")) { if (!$itemId) { @@ -151,9 +150,9 @@ class eZTelemetaItemType extends eZDataType function metaData($attribute) { $data = unserialize($attribute->attribute("data_text")); - $words = array(); - $src = $data['title'] . ' ' . $data['description']; - $cut = split('[ =+()[{}_,.:;\\/"\'*#%!?&-]+', $src); + $words = array(); + $src = $data['title'] . ' ' . $data['description']; + $cut = split('[ =+()[{}_,.:;\\/"\'*#%!?&-]+', $src); foreach ($cut as $w) { if (strlen($w) >= 3) { $words[] = $w; diff --git a/tools/eztelemeta/design/standard/javascript/init.js b/tools/eztelemeta/design/standard/javascript/init.js new file mode 100644 index 00000000..e69de29b diff --git a/tools/eztelemeta/design/standard/javascript/page-player.js b/tools/eztelemeta/design/standard/javascript/page-player.js new file mode 100644 index 00000000..fee54490 --- /dev/null +++ b/tools/eztelemeta/design/standard/javascript/page-player.js @@ -0,0 +1,1014 @@ +/* + + SoundManager 2 Demo: "Page as playlist" + ---------------------------------------------- + http://schillmania.com/projects/soundmanager2/ + + An example of a Muxtape.com-style UI, where an + unordered list of MP3 links becomes a playlist + + Flash 9 "MovieStar" edition supports MPEG4 + audio and video as well. + + Requires SoundManager 2 Javascript API. + +*/ + +function PagePlayer(oConfigOverride) { + var self = this; + var pl = this; + var sm = soundManager; // soundManager instance + // sniffing for favicon stuff/IE workarounds + var isIE = navigator.userAgent.match(/msie/i); + var isOpera = navigator.userAgent.match(/opera/i); + var isFirefox = navigator.userAgent.match(/firefox/i); + + sm.url = '../../swf/'; // path to directory containing SM2 SWF + + this.config = { + flashVersion: 8, // version of Flash to tell SoundManager to use - either 8 or 9. Flash 9 required for peak / spectrum data. + usePeakData: false, // [Flash 9 only]: show peak data + useWaveformData: false, // [Flash 9 only]: enable sound spectrum (raw waveform data) - WARNING: CPU-INTENSIVE: may set CPUs on fire. + useEQData: false, // [Flash 9 only]: enable sound EQ (frequency spectrum data) - WARNING: Also CPU-intensive. + fillGraph: false, // [Flash 9 only]: draw full lines instead of only top (peak) spectrum points + allowRightClick:true, // let users right-click MP3 links ("save as...", etc.) or discourage (can't prevent.) + useThrottling: false, // try to rate-limit potentially-expensive calls (eg. dragging position around) + autoStart: false, // begin playing first sound when page loads + playNext: true, // stop after one sound, or play through list until end + updatePageTitle: true, // change the page title while playing sounds + emptyTime: '-:--', // null/undefined timer values (before data is available) + useFavIcon: false // try to show peakData in address bar (Firefox + Opera) + } + + sm.debugMode = (window.location.href.toString().match(/debug=1/i)?true:false); // enable with #debug=1 for example + + this._mergeObjects = function(oMain,oAdd) { + // non-destructive merge + var o1 = {}; // clone o1 + for (var i in oMain) { + o1[i] = oMain[i]; + } + var o2 = (typeof oAdd == 'undefined'?{}:oAdd); + for (var o in o2) { + if (typeof o1[o] == 'undefined') o1[o] = o2[o]; + } + return o1; + } + + if (typeof oConfigOverride != 'undefined' && oConfigOverride) { + // allow overriding via arguments object + this.config = this._mergeObjects(oConfigOverride,this.config); + } + + this.css = { // CSS class names appended to link during various states + sDefault: 'sm2_link', // default state + sLoading: 'sm2_loading', + sPlaying: 'sm2_playing', + sPaused: 'sm2_paused' + } + + // apply externally-defined override, if applicable + this.cssBase = []; // optional features added to ul.playlist + if (this.config.usePeakData) this.cssBase.push('use-peak'); + if (this.config.useWaveformData || this.config.useEQData) this.cssBase.push('use-spectrum'); + this.cssBase = this.cssBase.join(' '); + + // apply some items to SM2 + sm.flashVersion = this.config.flashVersion; + if (sm.flashVersion >= 9) { + sm.useMovieStar = this.config.useMovieStar; // enable playing FLV, MP4 etc. + sm.movieStarOptions.useVideo = this.config.useVideo; + sm.defaultOptions.usePeakData = this.config.usePeakData; + sm.defaultOptions.useWaveformData = this.config.useWaveformData; + sm.defaultOptions.useEQData = this.config.useEQData; + } + + this.links = []; + this.sounds = []; + this.soundsByObject = []; + this.lastSound = null; + this.soundCount = 0; + this.strings = []; + this.dragActive = false; + this.dragExec = new Date(); + this.dragTimer = null; + this.pageTitle = document.title; + this.lastWPExec = new Date(); + this.xbmImages = []; + this.oControls = null; + + this.addEventHandler = function(o,evtName,evtHandler) { + typeof(attachEvent)=='undefined'?o.addEventListener(evtName,evtHandler,false):o.attachEvent('on'+evtName,evtHandler); + } + + this.removeEventHandler = function(o,evtName,evtHandler) { + typeof(attachEvent)=='undefined'?o.removeEventListener(evtName,evtHandler,false):o.detachEvent('on'+evtName,evtHandler); + } + + this.hasClass = function(o,cStr) { + return (typeof(o.className)!='undefined'?new RegExp('(^|\\s)'+cStr+'(\\s|$)').test(o.className):false); + } + + this.addClass = function(o,cStr) { + if (!o || !cStr) return false; // safety net + if (self.hasClass(o,cStr)) return false; + o.className = (o.className?o.className+' ':'')+cStr; + } + + this.removeClass = function(o,cStr) { + if (!o || !cStr) return false; // safety net + if (!self.hasClass(o,cStr)) return false; + o.className = o.className.replace(new RegExp('( '+cStr+')|('+cStr+')','g'),''); + } + + this.getElementsByClassName = function(className,tagNames,oParent) { + var doc = (oParent||document); + var matches = []; + var i,j; + var nodes = []; + if (typeof(tagNames)!='undefined' && typeof(tagNames)!='string') { + for (i=tagNames.length; i--;) { + if (!nodes || !nodes[tagNames[i]]) { + nodes[tagNames[i]] = doc.getElementsByTagName(tagNames[i]); + } + } + } else if (tagNames) { + nodes = doc.getElementsByTagName(tagNames); + } else { + nodes = doc.all||doc.getElementsByTagName('*'); + } + if (typeof(tagNames)!='string') { + for (i=tagNames.length; i--;) { + for (j=nodes[tagNames[i]].length; j--;) { + if (self.hasClass(nodes[tagNames[i]][j],className)) { + matches[matches.length] = nodes[tagNames[i]][j]; + } + } + } + } else { + for (i=0; i | Load failed, d\'oh! '+(sm.sandbox.noRemote?' Possible cause: Flash sandbox is denying remote URL access.':(sm.sandbox.noLocal?'Flash denying local filesystem access':'404?'))+''; + setTimeout(function(){ + oTemp.innerHTML = oString; + // pl.events.finish.apply(oThis); // load next + },5000); + } else { + if (this._data.metadata) { + this._data.metadata.refresh(); + } + } + }, + + metadata: function() { + // video-only stuff + sm._wD('video metadata: '+this.width+'x'+this.height); + // set the SWF dimensions to match + sm.oMC.style.width = this.width+'px'; + sm.oMC.style.height = this.height+'px'; + }, + + whileplaying: function() { + var d = null; + if (pl.dragActive || !pl.config.useThrottling) { + self.updateTime.apply(this); + if (sm.flashVersion >= 9) { + if (pl.config.usePeakData && this.instanceOptions.usePeakData) self.updatePeaks.apply(this); + if (pl.config.useWaveformData && this.instanceOptions.useWaveformData || pl.config.useEQData && this.instanceOptions.useEQData) { + self.updateGraph.apply(this); + } + } + if (this._data.metadata) { + d = new Date(); + if (d && d-self.lastWPExec>500) { + self.refreshMetadata(this); + self.lastWPExec = d; + } + } + this._data.oPosition.style.width = (((this.position/self.getDurationEstimate(this))*100)+'%'); + } else { + d = new Date(); + if (d-self.lastWPExec>500) { + self.updateTime.apply(this); + if (sm.flashVersion >= 9) { + if (pl.config.usePeakData && this.instanceOptions.usePeakData) { + self.updatePeaks.apply(this); + } + if (pl.config.useWaveformData && this.instanceOptions.useWaveformData || pl.config.useEQData && this.instanceOptions.useEQData) { + self.updateGraph.apply(this); + } + } + if (this._data.metadata) self.refreshMetadata(this); + this._data.oPosition.style.width = (((this.position/self.getDurationEstimate(this))*100)+'%'); + self.lastWPExec = d; + } + } + } + + } // events{} + + this.setPageIcon = function(sDataURL) { + if (!self.config.useFavIcon || !self.config.usePeakData || !sDataURL) return false; + var link = document.getElementById('favicon'); + if (!link) { + link = document.createElement('link'); + link.id = 'favicon'; + link.rel = 'shortcut icon'; + link.type = 'image/x-bitmap'; + link.href = sDataURL; + } else { + link.href = sDataURL; + } + document.getElementsByTagName('head')[0].appendChild(link); + } + + this.resetPageIcon = function() { + if (!self.config.useFavIcon) return false; + var link = document.getElementById('favicon'); + if (link) { + link.href = '/favicon.ico'; + } + } + + this.updatePeaks = function() { + var o = this._data.oPeak; + var oSpan = o.getElementsByTagName('span'); + oSpan[0].style.marginTop = (13-(Math.floor(15*this.peakData.left))+'px'); + oSpan[1].style.marginTop = (13-(Math.floor(15*this.peakData.right))+'px'); + // highly experimental + if (self.config.flashVersion > 8 && self.config.useFavIcon && self.config.usePeakData) { + if (!isOpera) { + self.setPageIcon(self.xbmImages[parseInt(15*this.peakData.left)][parseInt(15*this.peakData.right)]); + } else { + self.setPageIcon(self.xbmImages[1+parseInt(14*this.peakData.left)][1+parseInt(14*this.peakData.right)]); + } + } + } + + this.updateGraph = function() { + if ((!pl.config.useWaveformData && !pl.config.useEQData) || pl.config.flashVersion<9) return false; + var sbC = this._data.oGraph.getElementsByTagName('div'); + if (pl.config.useWaveformData) { + // raw waveform + var scale = 8; // Y axis (+/- this distance from 0) + for (var i=255; i--;) { + sbC[255-i].style.marginTop = (1+scale+Math.ceil(this.waveformData[i]*-scale))+'px'; + } + } else { + // eq spectrum + var offset = 9; + for (var i=255; i--;) { + sbC[255-i].style.marginTop = ((offset*2)-1+Math.ceil(this.eqData[i]*-offset))+'px'; + } + } + } + + this.resetGraph = function() { + if (!pl.config.useEQData || pl.config.flashVersion<9) return false; + var sbC = this._data.oGraph.getElementsByTagName('div'); + var scale = (!pl.config.useEQData?'9px':'17px'); + var nHeight = (!pl.config.fillGraph?'1px':'32px'); + for (var i=255; i--;) { + sbC[255-i].style.marginTop = scale; // EQ scale + sbC[255-i].style.height = nHeight; + } + } + + this.refreshMetadata = function(oSound) { + // Display info as appropriate + var index = null; + var now = oSound.position; + var metadata = oSound._data.metadata.data; + for (var i=0, j=metadata.length; i= metadata[i].startTimeMS && now <= metadata[i].endTimeMS) { + index = i; + break; + } + } + if (index != metadata.currentItem) { + // update + oSound._data.oLink.innerHTML = metadata.mainTitle+' '; + self.setPageTitle(metadata[index].title+' | '+metadata.mainTitle); + metadata.currentItem = index; + } + } + + this.updateTime = function() { + var str = self.strings['timing'].replace('%s1',self.getTime(this.position,true)); + str = str.replace('%s2',self.getTime(self.getDurationEstimate(this),true)); + this._data.oTiming.innerHTML = str; + } + + this.getTheDamnTarget = function(e) { + return (e.target||e.srcElement||window.event.srcElement); + } + + this.withinStatusBar = function(o) { + return (self.isChildOfClass(o,'controls')); + } + + this.handleClick = function(e) { + // a sound (or something) was clicked - determine what and handle appropriately + if (e.button == 2) { + if (!pl.config.allowRightClick) pl.stopEvent(e); + return (pl.config.allowRightClick); // ignore right-clicks + } + var o = self.getTheDamnTarget(e); + if (self.dragActive) self.stopDrag(); // to be safe + if (self.withinStatusBar(o)) { + // self.handleStatusClick(e); + return false; + } + if (o.nodeName.toLowerCase() != 'a') { + o = self.getParentByNodeName(o,'a'); + } + if (!o) { + // not a link + return true; + } + var sURL = o.getAttribute('href'); + if (!o.href || (!sm.canPlayURL(o.href) && !self.hasClass(o,'playable')) || self.hasClass(o,'exclude')) { + if (isIE && o.onclick) { + return false; // IE will run this handler before .onclick(), everyone else is cool? + } + return true; // pass-thru for non-MP3/non-links + } + var soundURL = o.href; + var thisSound = self.getSoundByObject(o); + if (thisSound) { + // sound already exists + self.setPageTitle(thisSound._data.originalTitle); + if (thisSound == self.lastSound) { + // ..and was playing (or paused) and isn't in an error state + if (thisSound.readyState != 2) { + if (thisSound.playState != 1) { + // not yet playing + thisSound.play(); + } else { + thisSound.togglePause(); + } + } else { + sm._writeDebug('Warning: sound failed to load (security restrictions, 404 or bad format)',2); + } + } else { + // ..different sound + if (self.lastSound) self.stopSound(self.lastSound); + thisSound._data.oTimingBox.appendChild(document.getElementById('spectrum-container')); + thisSound.togglePause(); // start playing current + } + } else { + // create sound + thisSound = sm.createSound({ + id:'pagePlayerMP3Sound'+(self.soundCount++), + url:soundURL, + onplay:self.events.play, + onstop:self.events.stop, + onpause:self.events.pause, + onresume:self.events.resume, + onfinish:self.events.finish, + whileloading:self.events.whileloading, + whileplaying:self.events.whileplaying, + onmetadata:self.events.metadata, + onload:self.events.onload + }); + // append control template + var oControls = self.oControls.cloneNode(true); + o.parentNode.appendChild(oControls); + o.parentNode.appendChild(document.getElementById('spectrum-container')); + self.soundsByObject[o.rel] = thisSound; + // tack on some custom data + thisSound._data = { + oLink: o, // DOM reference within SM2 object event handlers + oLI: o.parentNode, + oControls: self.getElementsByClassName('controls','div',o.parentNode)[0], + oStatus: self.getElementsByClassName('statusbar','div',o.parentNode)[0], + oLoading: self.getElementsByClassName('loading','div',o.parentNode)[0], + oPosition: self.getElementsByClassName('position','div',o.parentNode)[0], + oTimingBox: self.getElementsByClassName('timing','div',o.parentNode)[0], + oTiming: self.getElementsByClassName('timing','div',o.parentNode)[0].getElementsByTagName('div')[0], + oPeak: self.getElementsByClassName('peak','div',o.parentNode)[0], + oGraph: self.getElementsByClassName('spectrum-box','div',o.parentNode)[0], + nIndex: self.getSoundIndex(o), + className: self.css.sPlaying, + originalTitle: o.innerHTML, + metadata: null + }; + thisSound._data.oTimingBox.appendChild(document.getElementById('spectrum-container')); + // "Metadata" + if (thisSound._data.oLI.getElementsByTagName('ul').length) { + thisSound._data.metadata = new Metadata(thisSound); + } + // set initial timer stuff (before loading) + var str = self.strings['timing'].replace('%s1',self.config.emptyTime); + str = str.replace('%s2',self.config.emptyTime); + thisSound._data.oTiming.innerHTML = str; + self.sounds.push(thisSound); + if (self.lastSound) self.stopSound(self.lastSound); + self.resetGraph.apply(thisSound); + thisSound.play(); + } + self.lastSound = thisSound; // reference for next call + return self.stopEvent(e); + } + + this.handleMouseDown = function(e) { + // a sound link was clicked + if (e.button == 2) { + if (!pl.config.allowRightClick) pl.stopEvent(e); + return (pl.config.allowRightClick); // ignore right-clicks + } + var o = self.getTheDamnTarget(e); + if (!self.withinStatusBar(o)) return true; + self.dragActive = true; + self.lastSound.pause(); + self.setPosition(e); + self.addEventHandler(document,'mousemove',self.handleMouseMove); + self.addClass(self.lastSound._data.oControls,'dragging'); + self.stopEvent(e); + return false; + } + + this.handleMouseMove = function(e) { + // set position accordingly + if (self.dragActive) { + if (self.config.useThrottling) { + // be nice to CPU/externalInterface + var d = new Date(); + if (d-self.dragExec>20) { + self.setPosition(e); + } else { + window.clearTimeout(self.dragTimer); + self.dragTimer = window.setTimeout(function(){self.setPosition(e)},20); + } + self.dragExec = d; + } else { + // oh the hell with it + self.setPosition(e); + } + } else { + self.stopDrag(); + } + return false; + } + + this.stopDrag = function(e) { + if (self.dragActive) { + self.removeClass(self.lastSound._data.oControls,'dragging'); + self.removeEventHandler(document,'mousemove',self.handleMouseMove); + // self.removeEventHandler(document,'mouseup',self.stopDrag); + if (!pl.hasClass(self.lastSound._data.oLI,self.css.sPaused)) { + self.lastSound.resume(); + } + self.dragActive = false; + self.stopEvent(e); + return false; + } + } + + this.handleStatusClick = function(e) { + self.setPosition(e); + if (!pl.hasClass(self.lastSound._data.oLI,self.css.sPaused)) self.resume(); + return self.stopEvent(e); + } + + this.stopEvent = function(e) { + if (typeof e != 'undefined' && typeof e.preventDefault != 'undefined') { + e.preventDefault(); + } else if (typeof event != 'undefined' && typeof event.returnValue != 'undefined') { + event.returnValue = false; + } + return false; + } + + this.setPosition = function(e) { + // called from slider control + var oThis = self.getTheDamnTarget(e); + var oControl = oThis; + while (!self.hasClass(oControl,'controls') && oControl.parentNode) { + oControl = oControl.parentNode; + } + var oSound = self.lastSound; + var x = parseInt(e.clientX); + // play sound at this position + var nMsecOffset = Math.floor((x-self.getOffX(oControl)-4)/(oControl.offsetWidth)*self.getDurationEstimate(oSound)); + if (!isNaN(nMsecOffset)) nMsecOffset = Math.min(nMsecOffset,oSound.duration); + if (!isNaN(nMsecOffset)) oSound.setPosition(nMsecOffset); + } + + this.stopSound = function(oSound) { + sm._writeDebug('stopping sound: '+oSound.sID); + sm.stop(oSound.sID); + sm.unload(oSound.sID); + } + + this.getDurationEstimate = function(oSound) { + if (oSound.instanceOptions.isMovieStar) { + return (oSound.duration); + } else { + return (!oSound._data.metadata || !oSound._data.metadata.data.givenDuration?oSound.durationEstimate:oSound._data.metadata.data.givenDuration); + } + } + + // XBM support + + // xbmDraw.js XBM drawing library + // (c)2002 David L. Blackledge + // http://David.Blackledge.com + // Written April, 2002 + // You may use this if you keep this copyright notice intact + // + // See http://David.Blackledge.com/XBMDrawLibrary.html + // Some unused functions removed, see site for complete library + + function array_copy(o_array) { + var ret_array = new Array(); + if(typeof(ret_array.concat) == "function") + return ret_array.concat(o_array); + for(var j = 0 ; j < o_array.length ; ++j) { + ret_array[ret_array.length] = o_array[j]; + } + return ret_array; + } + + function XBMImage_body() { + var bod = ""; + for(var i = 0 ; i < this.height ; ++i) { + for(var j = 0 ; j < this.width/8 ; ++j) { + if(typeof(this.data[i]) != "undefined" && typeof(this.data[i][j]) != "undefined") { + // must be reversed to work right, apparently. + var bool = 0; + bool = this.data[i][j]; + var hex = (new Number(bool)).toString(16); + if(hex.length == 1) + hex = "0"+hex; + bod += "0x"+hex+","; + } else { + bod += "0x00,"; + } + } + } + if(bod.length > 0) // remove trailing comma + bod = bod.substring(0,bod.length-1); + return bod; + } + + function XBMImage_draw(x,y) { + if(!(x > -1 && x < this.width && y > -1 && y < this.height)) + return; + if(typeof(this.data[y]) == "undefined") + this.data[y] = new Array(); + var bit = x%8; + var byt = (x-bit)/8; + if(typeof(this.data[y][byt]) == "undefined") + this.data[y][byt] = 0; + this.data[y][byt] |= (0x01< -1 && y1 < this.height)) + return; + if(x1 > x2){ + var xs = x1;x1=Math.max(0,x2);x2=Math.min(this.width,xs); + } + var filled = 0xFF; + var startbits = x1%8; + var startbyt = (x1-x1%8)/8; + var endbits = 8-x2%8; + var endbyt = (x2-x2%8)/8; + if(startbyt == endbyt) { + this.data[y1][startbyt]|=(filled <>endbits); + return; + } + for(var i = startbyt+1 ; i < endbyt ; ++i) { + this.data[y1][i] = filled; + } + for(var j=x1; j < (x1+(8-x1%8)) ; ++j) + this.draw(j,y1); + this.data[y1][endbyt] |= (filled >>endbits); + } + + function XBMImage_drawVLine(x1,y1,y2) { + if(!(x1 > -1 && x1 < this.width)) + return; + if(y1 > y2){ + var ys = y1;y1=Math.max(0,y2);y2=Math.min(this.height,ys); + } + var bit = x1%8; + var byt = (x1-bit)/8; + var bitmask = (0x01< x2) { + var xx = x1; x1 = x2; x2 = xx; + var yy = y1; y1 = y2; y2 = yy; + } + var y = y1; + if(y1 == y2) + if(x1 == x2) + return this.draw(x1,y1); + else + return this.drawHLine(x1,y1,x2); + if(x1 == x2) return this.drawVLine(x1,y1,y2); + var slope=(y1-y2)/(x1-x2); + var yint = y1-Math.floor(slope*x1); // y-intercept + for(var x = x1; x < x2; ++x) { + if(slope > 0) { //y1y2 (bottom to top) + for(y = Math.floor(slope*x)+yint ; y > (Math.floor(slope*(x+1))+yint) ; --y) { + this.draw(x,y); + } + if(Math.floor(slope*x) == Math.floor(slope*(x+1))) + this.draw(x,y); + if(x==x2-1) { + for(y ; y >= y2 ; --y) { + this.draw(x,y); + } + } + } + } + return null; + } + + function XBMImage_drawBoxFilled(x1,y1,x2,y2) { + for(var y = y1; y <= y2; ++y) + this.drawHLine(x1,y,x2); + } + + function XBMImage_getXBM() { + return this.header + this.body() + this.footer; + } + + function XBMImage_setXBM(str){ + var xbmdata = str.substring(str.indexOf("{")+1,str.lastIndexOf("}")); + var a_data = xbmdata.split(","); + for(var j = 0 ; j < this.height ; ++j) { + this.data[j] = new Array(); + for(var i = 0 ; i < Math.floor(this.width/8) ; ++i) { + var a_idx = i+j*(Math.floor(this.width/8)); + if(a_idx < a_data.length) + this.data[j][i] = (new Number(parseInt(a_data[a_idx],16))).valueOf();//parseInt(a_data[a_idx]); + } + } + } + + function XBMImage(width,height,name) { + this.name = name; + this.width = width+((width%8)>0?(8-(width%8)):0); //expand to a multiple of 8 + this.height = height; + this.header = "#define "+name+"_width "+this.width+"\n"+ + "#define "+name+"_height "+this.height+"\n"+ + "static char "+name+"_bits[] = {\n"; + this.footer = "};"; + this.data = new Array(this.height); + for(var i = 0 ; i < this.data.length ; ++i) { + this.data[i] = new Array(this.width); + for(var j = 0 ; j < this.data[i].length ; ++j) { + this.data[i][j] = 0; + } + } + this.frames = new Array(); // store copies of this.data; + this.body = XBMImage_body; + this.draw = XBMImage_draw; + this.drawLine = XBMImage_drawLine; + this.drawHLine = XBMImage_drawHLine; + this.drawVLine = XBMImage_drawVLine; + this.drawBoxFilled = XBMImage_drawBoxFilled; + this.getXBM = XBMImage_getXBM; + this.setXBM = XBMImage_setXBM; + this.xbm = this.getXBM(); + } + + this.createXBMData = function() { + var ico = null; + var i=0; + var j=0; + for (i=0; i<16; i++) { + self.xbmImages[i] = []; + } + for (var i=0; i<16; i++) { + for (j=0; j<16; j++) { + ico = new XBMImage(16,16,'img'+i+'x'+j); + ico.drawBoxFilled(0,16-i,7,16-(i-16)); + ico.drawBoxFilled(9,16-j,16,16-(j-16)); + // self.xbmImages[i][j] = 'data:image/x-bitmap;base64,'+Base64.encode(ico.getXBM()); // using Base64 library + self.xbmImages[i][j] = 'data:image/x-bitmap,'+encodeURI(ico.getXBM()); // hat tip: @p01 + } + } + } + + if (this.config.useFavIcon) { + if (isFirefox || isOpera) { + this.createXBMData(); + } else { + // browser doesn't support doing this + this.config.useFavIcon = false; + } + } + + this.init = function() { + sm._writeDebug('pagePlayer.init()'); + var oLinks = document.getElementsByTagName('a'); + // grab all links, look for .mp3 + var foundItems = 0; + for (var i=0; i0) { + var oTiming = document.getElementById('sm2_timing'); + self.strings['timing'] = oTiming.innerHTML; + oTiming.innerHTML = ''; + oTiming.id = ''; + self.addEventHandler(document,'click',self.handleClick); + self.addEventHandler(document,'mousedown',self.handleMouseDown); + self.addEventHandler(document,'mouseup',self.stopDrag); + self.addEventHandler(window,'unload',function(){}); // force page reload when returning here via back button (Opera tries to remember old state, etc.) + } + sm._writeDebug('pagePlayer.init(): Found '+foundItems+' relevant items.'); + if (self.config.autoStart) { + pl.handleClick({target:pl.links[0]}); + } + } + +var Metadata = function(oSound) { + var self = this; + var oLI = oSound._data.oLI; + var o = oLI.getElementsByTagName('ul')[0]; + var oItems = o.getElementsByTagName('li'); + var oTemplate = document.createElement('div'); + oTemplate.innerHTML = ' '; + oTemplate.className = 'annotation'; + var oTemplate2 = document.createElement('div'); + oTemplate2.innerHTML = ' '; + oTemplate2.className = 'annotation alt'; + + var oTemplate3 = document.createElement('div'); + oTemplate3.className = 'note'; + + this.totalTime = 0; + this.strToTime = function(sTime) { + var segments = sTime.split(':'); + var seconds = 0; + for (var i=segments.length; i--;) { + seconds += parseInt(segments[i])*Math.pow(60,segments.length-1-i,10); // hours, minutes + } + return seconds; + } + this.data = []; + this.data.givenDuration = null; + this.data.currentItem = null; + this.data.mainTitle = oSound._data.oLink.innerHTML; + for (var i=0; i= 9) { + self.addClass(self.getElementsByClassName('playlist','ul',document.documentElement)[0],self.cssBase); + var sbC = sb.getElementsByTagName('div')[0]; + var oF = document.createDocumentFragment(); + var oClone = null; + for (var i=256; i--;) { + oClone = sbC.cloneNode(false); + oClone.style.left = (i)+'px'; + oF.appendChild(oClone); + } + sb.removeChild(sbC); + sb.appendChild(oF); + } + this.oControls = document.getElementById('control-template').cloneNode(true); + this.oControls.id = ''; + this.init(); + } + +} + +var pagePlayer = new PagePlayer(typeof PP_CONFIG != 'undefined'?PP_CONFIG:null); + +soundManager.onload = function() { + // soundManager.createSound() etc. may now be called + pagePlayer.initDOM(); +} \ No newline at end of file diff --git a/tools/eztelemeta/design/standard/javascript/soundmanager2-nodebug-jsmin.js b/tools/eztelemeta/design/standard/javascript/soundmanager2-nodebug-jsmin.js new file mode 100644 index 00000000..50b0d0a7 --- /dev/null +++ b/tools/eztelemeta/design/standard/javascript/soundmanager2-nodebug-jsmin.js @@ -0,0 +1,12 @@ +/* + SoundManager 2: Javascript Sound for the Web + -------------------------------------------- + http://schillmania.com/projects/soundmanager2/ + + Copyright (c) 2008, Scott Schiller. All rights reserved. + Code licensed under the BSD License: + http://schillmania.com/projects/soundmanager2/license.txt + + V2.94a.20090206 +*/ +var soundManager=null;function SoundManager(b,a){this.flashVersion=8;this.debugMode=true;this.useConsole=true;this.consoleOnly=false;this.waitForWindowLoad=false;this.nullURL="null.mp3";this.allowPolling=true;this.useMovieStar=false;this.bgColor="#ffffff";this.useHighPerformance=false;this.flashLoadTimeout=750;this.defaultOptions={autoLoad:false,stream:true,autoPlay:false,onid3:null,onload:null,whileloading:null,onplay:null,onpause:null,onresume:null,whileplaying:null,onstop:null,onfinish:null,onbeforefinish:null,onbeforefinishtime:5000,onbeforefinishcomplete:null,onjustbeforefinish:null,onjustbeforefinishtime:200,multiShot:true,position:null,pan:0,volume:100};this.flash9Options={onbufferchange:null,isMovieStar:null,usePeakData:false,useWaveformData:false,useEQData:false};this.movieStarOptions={onmetadata:null,useVideo:false};var f=null;var e=this;this.version=null;this.versionNumber="V2.94a.20090206";this.movieURL=null;this.url=null;this.altURL=null;this.swfLoaded=false;this.enabled=false;this.o=null;this.id=(a||"sm2movie");this.oMC=null;this.sounds={};this.soundIDs=[];this.muted=false;this.wmode=null;this.isIE=(navigator.userAgent.match(/MSIE/i));this.isSafari=(navigator.userAgent.match(/safari/i));this.isGecko=(navigator.userAgent.match(/gecko/i));this.debugID="soundmanager-debug";this._debugOpen=true;this._didAppend=false;this._appendSuccess=false;this._didInit=false;this._disabled=false;this._windowLoaded=false;this._hasConsole=(typeof console!="undefined"&&typeof console.log!="undefined");this._debugLevels=["log","info","warn","error"];this._defaultFlashVersion=8;this._oRemoved=null;this._oRemovedHTML=null;var g=function(h){return document.getElementById(h)};this.filePatterns={flash8:/\.mp3(\?.*)?$/i,flash9:/\.mp3(\?.*)?$/i};this.netStreamTypes=["aac","flv","mov","mp4","m4v","f4v","m4a","mp4v","3gp","3g2"];this.netStreamPattern=new RegExp("\\.("+this.netStreamTypes.join("|")+")(\\?.*)?$","i");this.filePattern=null;this.features={buffering:false,peakData:false,waveformData:false,eqData:false,movieStar:false};this.sandbox={type:null,types:{remote:"remote (domain-based) rules",localWithFile:"local with file access (no internet access)",localWithNetwork:"local with network (internet access only, no local access)",localTrusted:"local, trusted (local + internet access)"},description:null,noRemote:null,noLocal:null};this._setVersionInfo=function(){if(e.flashVersion!=8&&e.flashVersion!=9){alert('soundManager.flashVersion must be 8 or 9. "'+e.flashVersion+'" is invalid. Reverting to '+e._defaultFlashVersion+".");e.flashVersion=e._defaultFlashVersion}e.version=e.versionNumber+(e.flashVersion==9?" (AS3/Flash 9)":" (AS2/Flash 8)");if(e.flashVersion>8){e.defaultOptions=e._mergeObjects(e.defaultOptions,e.flash9Options);e.features.buffering=true}if(e.flashVersion>8&&e.useMovieStar){e.defaultOptions=e._mergeObjects(e.defaultOptions,e.movieStarOptions);e.filePatterns.flash9=new RegExp("\\.(mp3|"+e.netStreamTypes.join("|")+")(\\?.*)?$","i");e.features.movieStar=true}else{e.useMovieStar=false;e.features.movieStar=false}e.filePattern=e.filePatterns[(e.flashVersion!=8?"flash9":"flash8")];e.movieURL=(e.flashVersion==8?"soundmanager2.swf":"soundmanager2_flash9.swf");e.features.peakData=e.features.waveformData=e.features.eqData=(e.flashVersion==9)};this._overHTTP=(document.location?document.location.protocol.match(/http/i):null);this._waitingforEI=false;this._initPending=false;this._tryInitOnFocus=(this.isSafari&&typeof document.hasFocus=="undefined");this._isFocused=(typeof document.hasFocus!="undefined"?document.hasFocus():null);this._okToDisable=!this._tryInitOnFocus;this.useAltURL=!this._overHTTP;var d="http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html";this.supported=function(){return(e._didInit&&!e._disabled)};this.getMovie=function(h){return e.isIE?window[h]:(e.isSafari?g(h)||document[h]:g(h))};this.loadFromXML=function(h){try{e.o._loadFromXML(h)}catch(i){e._failSafely();return true}};this.createSound=function(i){if(!e._didInit){throw new Error("soundManager.createSound(): Not loaded yet - wait for soundManager.onload() before calling sound-related methods")}if(arguments.length==2){i={id:arguments[0],url:arguments[1]}}var j=e._mergeObjects(i);var h=j;if(e._idCheck(h.id,true)){return e.sounds[h.id]}if(e.flashVersion>8&&e.useMovieStar){if(h.isMovieStar===null){h.isMovieStar=(h.url.match(e.netStreamPattern)?true:false)}if(h.isMovieStar&&(h.usePeakData||h.useWaveformData||h.useEQData)){h.usePeakData=false;h.useWaveformData=false;h.useEQData=false}}e.sounds[h.id]=new f(h);e.soundIDs[e.soundIDs.length]=h.id;if(e.flashVersion==8){e.o._createSound(h.id,h.onjustbeforefinishtime)}else{e.o._createSound(h.id,h.url,h.onjustbeforefinishtime,h.usePeakData,h.useWaveformData,h.useEQData,h.isMovieStar,(h.isMovieStar?h.useVideo:false))}if(h.autoLoad||h.autoPlay){if(e.sounds[h.id]){e.sounds[h.id].load(h)}}if(h.autoPlay){e.sounds[h.id].play()}return e.sounds[h.id]};this.createVideo=function(h){if(arguments.length==2){h={id:arguments[0],url:arguments[1]}}if(e.flashVersion>=9){h.isMovieStar=true;h.useVideo=true}else{return false}return e.createSound(h)};this.destroySound=function(j,h){if(!e._idCheck(j)){return false}for(var k=0;kWarning: soundManager.onload() is undefined.",2)};this.onerror=function(){};this._idCheck=this.getSoundById;var c=function(){return false};c._protected=true;this._disableObject=function(i){for(var h in i){if(typeof i[h]=="function"&&typeof i[h]._protected=="undefined"){i[h]=c}}h=null};this._failSafely=function(h){if(typeof h=="undefined"){h=false}if(!e._disabled||h){e.disable(h)}};this._normalizeMovieURL=function(h){var i=null;if(h){if(h.match(/\.swf(\?.*)?$/i)){i=h.substr(h.toLowerCase().lastIndexOf(".swf?")+4);if(i){return h}}else{if(h.lastIndexOf("/")!=h.length-1){h=h+"/"}}}return(h&&h.lastIndexOf("/")!=-1?h.substr(0,h.lastIndexOf("/")+1):"./")+e.movieURL};this._getDocument=function(){return(document.body?document.body:(document.documentElement?document.documentElement:document.getElementsByTagName("div")[0]))};this._getDocument._protected=true;this._createMovie=function(n,l){if(e._didAppend&&e._appendSuccess){return false}if(window.location.href.indexOf("debug=1")+1){e.debugMode=true}e._didAppend=true;e._setVersionInfo();var u=(l?l:e.url);var k=(e.altURL?e.altURL:u);e.url=e._normalizeMovieURL(e._overHTTP?u:k);l=e.url;var m=null;if(e.useHighPerformance&&e.useMovieStar){m="Note: disabling highPerformance, not applicable with movieStar mode on";e.useHighPerformance=false}e.wmode=(e.useHighPerformance&&!e.useMovieStar?"transparent":"");var t={name:n,id:n,src:l,width:"100%",height:"100%",quality:"high",allowScriptAccess:"always",bgcolor:e.bgColor,pluginspage:"http://www.macromedia.com/go/getflashplayer",type:"application/x-shockwave-flash",wmode:e.wmode};var w={id:n,data:l,type:"application/x-shockwave-flash",width:"100%",height:"100%",wmode:e.wmode};var o={movie:l,AllowScriptAccess:"always",quality:"high",bgcolor:e.bgColor,wmode:e.wmode};var j=null;var r=null;if(e.isIE){j=document.createElement("div");var h=''+(e.useHighPerformance&&!e.useMovieStar?' ':"")+''}else{j=document.createElement("embed");for(r in t){if(t.hasOwnProperty(r)){j.setAttribute(r,t[r])}}}var q="soundManager._createMovie(): appendChild/innerHTML set failed. May be app/xhtml+xml DOM-related.";var i=e._getDocument();if(i){e.oMC=g("sm2-container")?g("sm2-container"):document.createElement("div");if(!e.oMC.id){e.oMC.id="sm2-container";e.oMC.className="movieContainer";var z=null;var p=null;if(e.useHighPerformance){z={position:"fixed",width:"8px",height:"8px",bottom:"0px",left:"0px"}}else{z={position:"absolute",width:"1px",height:"1px",top:"-999px",left:"-999px"}}var y=null;for(y in z){if(z.hasOwnProperty(y)){e.oMC.style[y]=z[y]}}try{if(!e.isIE){e.oMC.appendChild(j)}i.appendChild(e.oMC);if(e.isIE){p=e.oMC.appendChild(document.createElement("div"));p.className="sm2-object-box";p.innerHTML=h}e._appendSuccess=true}catch(v){throw new Error(q)}}else{e.oMC.appendChild(j);if(e.isIE){p=e.oMC.appendChild(document.createElement("div"));p.className="sm2-object-box";p.innerHTML=h}e._appendSuccess=true}}};this._writeDebug=function(h,j,i){};this._writeDebug._protected=true;this._wdCount=0;this._wdCount._protected=true;this._wD=this._writeDebug;this._toggleDebug=function(){};this._toggleDebug._protected=true;this._debug=function(){};this._debugTS=function(j,h,i){};this._debugTS._protected=true;this._mergeObjects=function(j,h){var m={};for(var k in j){if(j.hasOwnProperty(k)){m[k]=j[k]}}var l=(typeof h=="undefined"?e.defaultOptions:h);for(var n in l){if(l.hasOwnProperty(n)&&typeof m[n]=="undefined"){m[n]=l[n]}}return m};this.createMovie=function(h){if(h){e.url=h}e._initMovie()};this.go=this.createMovie;this._initMovie=function(){if(e.o){return false}e.o=e.getMovie(e.id);if(!e.o){if(!e.oRemoved){e._createMovie(e.id,e.url)}else{if(!e.isIE){e.oMC.appendChild(e.oRemoved)}else{e.oMC.innerHTML=e.oRemovedHTML}e.oRemoved=null;e._didAppend=true}e.o=e.getMovie(e.id)}};this.waitForExternalInterface=function(){if(e._waitingForEI){return false}e._waitingForEI=true;if(e._tryInitOnFocus&&!e._isFocused){return false}if(e.flashLoadTimeout>0){setTimeout(function(){if(!e._didInit&&e._okToDisable){e._failSafely(true)}},e.flashLoadTimeout)}};this.handleFocus=function(){if(e._isFocused||!e._tryInitOnFocus){return true}e._okToDisable=true;e._isFocused=true;if(e._tryInitOnFocus){window.removeEventListener("mousemove",e.handleFocus,false)}e._waitingForEI=false;setTimeout(e.waitForExternalInterface,500);if(window.removeEventListener){window.removeEventListener("focus",e.handleFocus,false)}else{if(window.detachEvent){window.detachEvent("onfocus",e.handleFocus)}}};this.initComplete=function(h){if(e._didInit){return false}e._didInit=true;if(e._disabled||h){e.onerror.apply(window);return false}else{}if(e.waitForWindowLoad&&!e._windowLoaded){if(window.addEventListener){window.addEventListener("load",e.initUserOnload,false)}else{if(window.attachEvent){window.attachEvent("onload",e.initUserOnload)}}return false}else{e.initUserOnload()}};this.initUserOnload=function(){e.onload.apply(window)};this.init=function(){e._initMovie();if(e._didInit){return false}if(window.removeEventListener){window.removeEventListener("load",e.beginDelayedInit,false)}else{if(window.detachEvent){window.detachEvent("onload",e.beginDelayedInit)}}try{e.o._externalInterfaceTest(false);e.setPolling(true);if(!e.debugMode){e.o._disableDebug()}e.enabled=true}catch(h){e._failSafely(true);e.initComplete();return false}e.initComplete()};this.beginDelayedInit=function(){e._windowLoaded=true;setTimeout(e.waitForExternalInterface,500);setTimeout(e.beginInit,20)};this.beginInit=function(){if(e._initPending){return false}e.createMovie();e._initMovie();e._initPending=true;return true};this.domContentLoaded=function(){if(document.removeEventListener){document.removeEventListener("DOMContentLoaded",e.domContentLoaded,false)}e.go()};this._externalInterfaceOK=function(){if(e.swfLoaded){return false}e.swfLoaded=true;e._tryInitOnFocus=false;if(e.isIE){setTimeout(e.init,100)}else{e.init()}};this._setSandboxType=function(h){var i=e.sandbox;i.type=h;i.description=i.types[(typeof i.types[h]!="undefined"?h:"unknown")];if(i.type=="localWithFile"){i.noRemote=true;i.noLocal=false}else{if(i.type=="localWithNetwork"){i.noRemote=false;i.noLocal=true}else{if(i.type=="localTrusted"){i.noRemote=false;i.noLocal=false}}}};this.reboot=function(){if(e.soundIDs.length){}for(var h=e.soundIDs.length;h--;){e.sounds[e.soundIDs[h]].destruct()}try{if(e.isIE){e.oRemovedHTML=e.o.innerHTML}e.oRemoved=e.o.parentNode.removeChild(e.o)}catch(j){}e.enabled=false;e._didInit=false;e._waitingForEI=false;e._initPending=false;e._didInit=false;e._didAppend=false;e._appendSuccess=false;e._didInit=false;e._disabled=false;e._waitingforEI=true;e.swfLoaded=false;e.soundIDs={};e.sounds=[];e.o=null;window.setTimeout(function(){soundManager.beginDelayedInit()},20)};this.destruct=function(){e.disable(true)};f=function(h){var i=this;this.sID=h.id;this.url=h.url;this.options=e._mergeObjects(h);this.instanceOptions=this.options;this._iO=this.instanceOptions;this.pan=this.options.pan;this.volume=this.options.volume;this._debug=function(){if(e.debugMode){var l=null;var n=[];var k=null;var m=null;var j=64;for(l in i.options){if(i.options[l]!==null){if(i.options[l] instanceof Function){k=i.options[l].toString();k=k.replace(/\s\s+/g," ");m=k.indexOf("{");n[n.length]=" "+l+": {"+k.substr(m+1,(Math.min(Math.max(k.indexOf("\n")-1,j),j))).replace(/\n/g,"")+"... }"}else{n[n.length]=" "+l+": "+i.options[l]}}}}};this._debug();this.id3={};this.resetProperties=function(j){i.bytesLoaded=null;i.bytesTotal=null;i.position=null;i.duration=null;i.durationEstimate=null;i.loaded=false;i.playState=0;i.paused=false;i.readyState=0;i.muted=false;i.didBeforeFinish=false;i.didJustBeforeFinish=false;i.isBuffering=false;i.instanceOptions={};i.instanceCount=0;i.peakData={left:0,right:0};i.waveformData=[];i.eqData=[]};i.resetProperties();this.load=function(j){if(typeof j!="undefined"){i._iO=e._mergeObjects(j);i.instanceOptions=i._iO}else{j=i.options;i._iO=j;i.instanceOptions=i._iO}if(typeof i._iO.url=="undefined"){i._iO.url=i.url}if(i._iO.url==i.url&&i.readyState!==0&&i.readyState!=2){return false}i.loaded=false;i.readyState=1;i.playState=0;try{if(e.flashVersion==8){e.o._load(i.sID,i._iO.url,i._iO.stream,i._iO.autoPlay,(i._iO.whileloading?1:0))}else{e.o._load(i.sID,i._iO.url,i._iO.stream?true:false,i._iO.autoPlay?true:false);if(i._iO.isMovieStar&&i._iO.autoLoad&&!i._iO.autoPlay){i.pause()}}}catch(k){e.onerror();e.disable()}};this.unload=function(){if(i.readyState!==0){if(i.readyState!=2){i.setPosition(0,true)}e.o._unload(i.sID,e.nullURL);i.resetProperties()}};this.destruct=function(){e.o._destroySound(i.sID);e.destroySound(i.sID,true)};this.play=function(k){if(!k){k={}}i._iO=e._mergeObjects(k,i._iO);i._iO=e._mergeObjects(i._iO,i.options);i.instanceOptions=i._iO;if(i.playState==1){var j=i._iO.multiShot;if(!j){return false}}if(!i.loaded){if(i.readyState===0){i._iO.stream=true;i._iO.autoPlay=true;i.load(i._iO)}else{if(i.readyState==2){return false}}}if(i.paused){i.resume()}else{i.playState=1;if(!i.instanceCount||e.flashVersion==9){i.instanceCount++}i.position=(typeof i._iO.position!="undefined"&&!isNaN(i._iO.position)?i._iO.position:0);if(i._iO.onplay){i._iO.onplay.apply(i)}i.setVolume(i._iO.volume,true);i.setPan(i._iO.pan,true);e.o._start(i.sID,i._iO.loop||1,(e.flashVersion==9?i.position:i.position/1000))}};this.start=this.play;this.stop=function(j){if(i.playState==1){i.playState=0;i.paused=false;if(i._iO.onstop){i._iO.onstop.apply(i)}e.o._stop(i.sID,j);i.instanceCount=0;i._iO={}}};this.setPosition=function(k,j){if(typeof k=="undefined"){k=0}var l=Math.min(i.duration,Math.max(k,0));i._iO.position=l;e.o._setPosition(i.sID,(e.flashVersion==9?i._iO.position:i._iO.position/1000),(i.paused||!i.playState))};this.pause=function(){if(i.paused||i.playState===0){return false}i.paused=true;e.o._pause(i.sID);if(i._iO.onpause){i._iO.onpause.apply(i)}};this.resume=function(){if(!i.paused||i.playState===0){return false}i.paused=false;e.o._pause(i.sID);if(i._iO.onresume){i._iO.onresume.apply(i)}};this.togglePause=function(){if(!i.playState){i.play({position:(e.flashVersion==9?i.position:i.position/1000)});return false}if(i.paused){i.resume()}else{i.pause()}};this.setPan=function(k,j){if(typeof k=="undefined"){k=0}if(typeof j=="undefined"){j=false}e.o._setPan(i.sID,k);i._iO.pan=k;if(!j){i.pan=k}};this.setVolume=function(j,k){if(typeof j=="undefined"){j=100}if(typeof k=="undefined"){k=false}e.o._setVolume(i.sID,(e.muted&&!i.muted)||i.muted?0:j);i._iO.volume=j;if(!k){i.volume=j}};this.mute=function(){i.muted=true;e.o._setVolume(i.sID,0)};this.unmute=function(){i.muted=false;var j=typeof i._iO.volume!="undefined";e.o._setVolume(i.sID,j?i._iO.volume:i.options.volume)};this._whileloading=function(j,k,l){if(!i._iO.isMovieStar){i.bytesLoaded=j;i.bytesTotal=k;i.duration=Math.floor(l);i.durationEstimate=parseInt((i.bytesTotal/i.bytesLoaded)*i.duration,10);if(i.readyState!=3&&i._iO.whileloading){i._iO.whileloading.apply(i)}}else{i.bytesLoaded=j;i.bytesTotal=k;i.duration=Math.floor(l);i.durationEstimate=i.duration;if(i.readyState!=3&&i._iO.whileloading){i._iO.whileloading.apply(i)}}};this._onid3=function(n,k){var o=[];for(var m=0,l=n.length;m 8) { + _s.defaultOptions = _s._mergeObjects(_s.defaultOptions,_s.flash9Options); + _s.features.buffering = true; + } + if (_s.flashVersion > 8 && _s.useMovieStar) { + // flash 9+ support for movieStar formats as well as MP3 + _s.defaultOptions = _s._mergeObjects(_s.defaultOptions,_s.movieStarOptions); + _s.filePatterns.flash9 = new RegExp('\\.(mp3|'+_s.netStreamTypes.join('|')+')(\\?.*)?$','i'); + _s.features.movieStar = true; + } else { + _s.useMovieStar = false; + _s.features.movieStar = false; + } + _s.filePattern = _s.filePatterns[(_s.flashVersion!=8?'flash9':'flash8')]; + _s.movieURL = (_s.flashVersion==8?'soundmanager2.swf':'soundmanager2_flash9.swf'); + _s.features.peakData = _s.features.waveformData = _s.features.eqData = (_s.flashVersion==9); + }; + + this._overHTTP = (document.location?document.location.protocol.match(/http/i):null); + this._waitingforEI = false; + this._initPending = false; + this._tryInitOnFocus = (this.isSafari && typeof document.hasFocus == 'undefined'); + this._isFocused = (typeof document.hasFocus != 'undefined'?document.hasFocus():null); + this._okToDisable = !this._tryInitOnFocus; + + this.useAltURL = !this._overHTTP; // use altURL if not "online" + + var flashCPLink = 'http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html'; + + // --- public methods --- + + this.supported = function() { + return (_s._didInit && !_s._disabled); + }; + + this.getMovie = function(smID) { + return _s.isIE?window[smID]:(_s.isSafari?_$(smID)||document[smID]:_$(smID)); + }; + + this.loadFromXML = function(sXmlUrl) { + try { + _s.o._loadFromXML(sXmlUrl); + } catch(e) { + _s._failSafely(); + return true; + } + }; + + this.createSound = function(oOptions) { + if (!_s._didInit) { + throw new Error('soundManager.createSound(): Not loaded yet - wait for soundManager.onload() before calling sound-related methods'); + } + if (arguments.length == 2) { + // function overloading in JS! :) ..assume simple createSound(id,url) use case + oOptions = {'id':arguments[0],'url':arguments[1]}; + } + var thisOptions = _s._mergeObjects(oOptions); // inherit SM2 defaults + var _tO = thisOptions; // alias + _s._wD('soundManager.createSound(): '+_tO.id+' ('+_tO.url+')',1); + if (_s._idCheck(_tO.id,true)) { + _s._wD('soundManager.createSound(): '+_tO.id+' exists',1); + return _s.sounds[_tO.id]; + } + if (_s.flashVersion > 8 && _s.useMovieStar) { + if (_tO.isMovieStar === null) { + _tO.isMovieStar = (_tO.url.match(_s.netStreamPattern)?true:false); + } + if (_tO.isMovieStar) { + _s._wD('soundManager.createSound(): using MovieStar handling'); + } + if (_tO.isMovieStar && (_tO.usePeakData || _tO.useWaveformData || _tO.useEQData)) { + _s._wD('Warning: peak/waveform/eqData features unsupported for non-MP3 formats'); + _tO.usePeakData = false; + _tO.useWaveformData = false; + _tO.useEQData = false; + } + } + _s.sounds[_tO.id] = new SMSound(_tO); + _s.soundIDs[_s.soundIDs.length] = _tO.id; + // AS2: + if (_s.flashVersion == 8) { + _s.o._createSound(_tO.id,_tO.onjustbeforefinishtime); + } else { + _s.o._createSound(_tO.id,_tO.url,_tO.onjustbeforefinishtime,_tO.usePeakData,_tO.useWaveformData,_tO.useEQData,_tO.isMovieStar,(_tO.isMovieStar?_tO.useVideo:false)); + } + if (_tO.autoLoad || _tO.autoPlay) { + // TODO: does removing timeout here cause problems? + if (_s.sounds[_tO.id]) { + _s.sounds[_tO.id].load(_tO); + } + } + if (_tO.autoPlay) { + _s.sounds[_tO.id].play(); + } + return _s.sounds[_tO.id]; + }; + + this.createVideo = function(oOptions) { + if (arguments.length==2) { + oOptions = {'id':arguments[0],'url':arguments[1]}; + } + if (_s.flashVersion >= 9) { + oOptions.isMovieStar = true; + oOptions.useVideo = true; + } else { + _s._wD('soundManager.createVideo(): flash 9 required for video. Exiting.',2); + return false; + } + if (!_s.useMovieStar) { + _s._wD('soundManager.createVideo(): MovieStar mode not enabled. Exiting.',2); + } + return _s.createSound(oOptions); + }; + + this.destroySound = function(sID,bFromSound) { + // explicitly destroy a sound before normal page unload, etc. + if (!_s._idCheck(sID)) { + return false; + } + for (var i=0; i<_s.soundIDs.length; i++) { + if (_s.soundIDs[i] == sID) { + _s.soundIDs.splice(i,1); + continue; + } + } + // conservative option: avoid crash with ze flash 8 + // calling destroySound() within a sound onload() might crash firefox, certain flavours of winXP + flash 8?? + // if (_s.flashVersion != 8) { + _s.sounds[sID].unload(); + // } + if (!bFromSound) { + // ignore if being called from SMSound instance + _s.sounds[sID].destruct(); + } + delete _s.sounds[sID]; + }; + + this.destroyVideo = this.destroySound; + + this.load = function(sID,oOptions) { + if (!_s._idCheck(sID)) { + return false; + } + _s.sounds[sID].load(oOptions); + }; + + this.unload = function(sID) { + if (!_s._idCheck(sID)) { + return false; + } + _s.sounds[sID].unload(); + }; + + this.play = function(sID,oOptions) { + if (!_s._idCheck(sID)) { + if (typeof oOptions != 'Object') { + oOptions = {url:oOptions}; // overloading use case: play('mySound','/path/to/some.mp3'); + } + if (oOptions && oOptions.url) { + // overloading use case, creation + playing of sound: .play('someID',{url:'/path/to.mp3'}); + _s._wD('soundController.play(): attempting to create "'+sID+'"',1); + oOptions.id = sID; + _s.createSound(oOptions); + } else { + return false; + } + } + _s.sounds[sID].play(oOptions); + }; + + this.start = this.play; // just for convenience + + this.setPosition = function(sID,nMsecOffset) { + if (!_s._idCheck(sID)) { + return false; + } + _s.sounds[sID].setPosition(nMsecOffset); + }; + + this.stop = function(sID) { + if (!_s._idCheck(sID)) { + return false; + } + _s._wD('soundManager.stop('+sID+')',1); + _s.sounds[sID].stop(); + }; + + this.stopAll = function() { + _s._wD('soundManager.stopAll()',1); + for (var oSound in _s.sounds) { + if (_s.sounds[oSound] instanceof SMSound) { + _s.sounds[oSound].stop(); // apply only to sound objects + } + } + }; + + this.pause = function(sID) { + if (!_s._idCheck(sID)) { + return false; + } + _s.sounds[sID].pause(); + }; + + this.pauseAll = function() { + for (var i=_s.soundIDs.length; i--;) { + _s.sounds[_s.soundIDs[i]].pause(); + } + }; + + this.resume = function(sID) { + if (!_s._idCheck(sID)) { + return false; + } + _s.sounds[sID].resume(); + }; + + this.resumeAll = function() { + for (var i=_s.soundIDs.length; i--;) { + _s.sounds[_s.soundIDs[i]].resume(); + } + }; + + this.togglePause = function(sID) { + if (!_s._idCheck(sID)) { + return false; + } + _s.sounds[sID].togglePause(); + }; + + this.setPan = function(sID,nPan) { + if (!_s._idCheck(sID)) { + return false; + } + _s.sounds[sID].setPan(nPan); + }; + + this.setVolume = function(sID,nVol) { + if (!_s._idCheck(sID)) { + return false; + } + _s.sounds[sID].setVolume(nVol); + }; + + this.mute = function(sID) { + if (typeof sID != 'string') { + sID = null; + } + if (!sID) { + _s._wD('soundManager.mute(): Muting all sounds'); + for (var i=_s.soundIDs.length; i--;) { + _s.sounds[_s.soundIDs[i]].mute(); + } + _s.muted = true; + } else { + if (!_s._idCheck(sID)) { + return false; + } + _s._wD('soundManager.mute(): Muting "'+sID+'"'); + _s.sounds[sID].mute(); + } + }; + + this.muteAll = function() { + _s.mute(); + }; + + this.unmute = function(sID) { + if (typeof sID != 'string') { + sID = null; + } + if (!sID) { + _s._wD('soundManager.unmute(): Unmuting all sounds'); + for (var i=_s.soundIDs.length; i--;) { + _s.sounds[_s.soundIDs[i]].unmute(); + } + _s.muted = false; + } else { + if (!_s._idCheck(sID)) { + return false; + } + _s._wD('soundManager.unmute(): Unmuting "'+sID+'"'); + _s.sounds[sID].unmute(); + } + }; + + this.unmuteAll = function() { + _s.unmute(); + }; + + this.getMemoryUse = function() { + if (_s.flashVersion == 8) { + // not supported in Flash 8 + return 0; + } + if (_s.o) { + return parseInt(_s.o._getMemoryUse(),10); + } + }; + + this.setPolling = function(bPolling) { + if (!_s.o || !_s.allowPolling) { + return false; + } + _s.o._setPolling(bPolling); + }; + + this.disable = function(bNoDisable) { + // destroy all functions + if (typeof bNoDisable == 'undefined') { + bNoDisable = false; + } + if (_s._disabled) { + return false; + } + _s._disabled = true; + _s._wD('soundManager.disable(): Shutting down',1); + for (var i=_s.soundIDs.length; i--;) { + _s._disableObject(_s.sounds[_s.soundIDs[i]]); + } + _s.initComplete(bNoDisable); // fire "complete", despite fail + // _s._disableObject(_s); // taken out to allow reboot() + }; + + this.canPlayURL = function(sURL) { + return (sURL?(sURL.match(_s.filePattern)?true:false):null); + }; + + this.getSoundById = function(sID,suppressDebug) { + if (!sID) { + throw new Error('SoundManager.getSoundById(): sID is null/undefined'); + } + var result = _s.sounds[sID]; + if (!result && !suppressDebug) { + _s._wD('"'+sID+'" is an invalid sound ID.',2); + // soundManager._wD('trace: '+arguments.callee.caller); + } + return result; + }; + + this.onload = function() { + // window.onload() equivalent for SM2, ready to create sounds etc. + // this is a stub - you can override this in your own external script, eg. soundManager.onload = function() {} + soundManager._wD('Warning: soundManager.onload() is undefined.',2); + }; + + this.onerror = function() { + // stub for user handler, called when SM2 fails to load/init + }; + + // --- "private" methods --- + + this._idCheck = this.getSoundById; + + var _doNothing = function() { + return false; + }; + _doNothing._protected = true; + + this._disableObject = function(o) { + for (var oProp in o) { + if (typeof o[oProp] == 'function' && typeof o[oProp]._protected == 'undefined') { + o[oProp] = _doNothing; + } + } + oProp = null; + }; + + this._failSafely = function(bNoDisable) { + // general failure exception handler + if (typeof bNoDisable == 'undefined') { + bNoDisable = false; + } + if (!_s._disabled || bNoDisable) { + _s._wD('soundManager: Failed to initialise.',2); + _s.disable(bNoDisable); + } + }; + + this._normalizeMovieURL = function(smURL) { + var urlParams = null; + if (smURL) { + if (smURL.match(/\.swf(\?.*)?$/i)) { + urlParams = smURL.substr(smURL.toLowerCase().lastIndexOf('.swf?')+4); + if (urlParams) { + return smURL; // assume user knows what they're doing + } + } else if (smURL.lastIndexOf('/') != smURL.length-1) { + smURL = smURL+'/'; + } + } + return(smURL && smURL.lastIndexOf('/')!=-1?smURL.substr(0,smURL.lastIndexOf('/')+1):'./')+_s.movieURL; + }; + + this._getDocument = function() { + return (document.body?document.body:(document.documentElement?document.documentElement:document.getElementsByTagName('div')[0])); + }; + + this._getDocument._protected = true; + + this._createMovie = function(smID,smURL) { + if (_s._didAppend && _s._appendSuccess) { + return false; // ignore if already succeeded + } + if (window.location.href.indexOf('debug=1')+1) { + _s.debugMode = true; // allow force of debug mode via URL + } + _s._didAppend = true; + + // safety check for legacy (change to Flash 9 URL) + _s._setVersionInfo(); + var remoteURL = (smURL?smURL:_s.url); + var localURL = (_s.altURL?_s.altURL:remoteURL); + _s.url = _s._normalizeMovieURL(_s._overHTTP?remoteURL:localURL); + smURL = _s.url; + + var specialCase = null; + + if (_s.useHighPerformance && _s.useMovieStar) { + specialCase = 'Note: disabling highPerformance, not applicable with movieStar mode on'; + _s.useHighPerformance = false; + } + + _s.wmode = (_s.useHighPerformance && !_s.useMovieStar?'transparent':''); // wmode=opaque seems to break firefox/windows. + + var oEmbed = { + name: smID, + id: smID, + src: smURL, + width: '100%', + height: '100%', + quality: 'high', + allowScriptAccess: 'always', + bgcolor: _s.bgColor, + pluginspage: 'http://www.macromedia.com/go/getflashplayer', + type: 'application/x-shockwave-flash', + wmode: _s.wmode + }; + + var oObject = { + id: smID, + data: smURL, + type: 'application/x-shockwave-flash', + width: '100%', + height: '100%', + wmode: _s.wmode + }; + + var oObjectParams = { + movie: smURL, + AllowScriptAccess: 'always', + quality: 'high', + bgcolor: _s.bgColor, + wmode: _s.wmode + }; + + var oMovie = null; + var tmp = null; + + if (_s.isIE) { + // IE is "special". + oMovie = document.createElement('div'); + var movieHTML = ''+(_s.useHighPerformance && !_s.useMovieStar?' ':'')+''; + } else { + oMovie = document.createElement('embed'); + for (tmp in oEmbed) { + if (oEmbed.hasOwnProperty(tmp)) { + oMovie.setAttribute(tmp,oEmbed[tmp]); + } + } + } + + var oD = document.createElement('div'); + oD.id = _s.debugID+'-toggle'; + var oToggle = { + position: 'fixed', + bottom: '0px', + right: '0px', + width: '1.2em', + height: '1.2em', + lineHeight: '1.2em', + margin: '2px', + textAlign: 'center', + border: '1px solid #999', + cursor: 'pointer', + background: '#fff', + color: '#333', + zIndex: 10001 + }; + + oD.appendChild(document.createTextNode('-')); + oD.onclick = _s._toggleDebug; + oD.title = 'Toggle SM2 debug console'; + + if (navigator.userAgent.match(/msie 6/i)) { + oD.style.position = 'absolute'; + oD.style.cursor = 'hand'; + } + + for (tmp in oToggle) { + if (oToggle.hasOwnProperty(tmp)) { + oD.style[tmp] = oToggle[tmp]; + } + } + + var appXHTML = 'soundManager._createMovie(): appendChild/innerHTML set failed. May be app/xhtml+xml DOM-related.'; + + var oTarget = _s._getDocument(); + + if (oTarget) { + + _s.oMC = _$('sm2-container')?_$('sm2-container'):document.createElement('div'); + + if (!_s.oMC.id) { + _s.oMC.id = 'sm2-container'; + _s.oMC.className = 'movieContainer'; + // "hide" flash movie + var s = null; + var oEl = null; + if (_s.useHighPerformance) { + s = { + position: 'fixed', + width: '8px', + height: '8px', // must be at least 6px for flash to run fast. odd? yes. + bottom: '0px', + left: '0px' + // zIndex:-1 // sit behind everything else - potentially dangerous/buggy? + }; + } else { + s = { + position: 'absolute', + width: '1px', + height: '1px', + top: '-999px', + left: '-999px' + }; + } + var x = null; + for (x in s) { + if (s.hasOwnProperty(x)) { + _s.oMC.style[x] = s[x]; + } + } + try { + if (!_s.isIE) { + _s.oMC.appendChild(oMovie); + } + oTarget.appendChild(_s.oMC); + if (_s.isIE) { + oEl = _s.oMC.appendChild(document.createElement('div')); + oEl.className = 'sm2-object-box'; + oEl.innerHTML = movieHTML; + } + _s._appendSuccess = true; + } catch(e) { + throw new Error(appXHTML); + } + } else { + // it's already in the document. + _s.oMC.appendChild(oMovie); + if (_s.isIE) { + oEl = _s.oMC.appendChild(document.createElement('div')); + oEl.className = 'sm2-object-box'; + oEl.innerHTML = movieHTML; + } + _s._appendSuccess = true; + } + + if (!_$(_s.debugID) && ((!_s._hasConsole||!_s.useConsole)||(_s.useConsole && _s._hasConsole && !_s.consoleOnly))) { + var oDebug = document.createElement('div'); + oDebug.id = _s.debugID; + oDebug.style.display = (_s.debugMode?'block':'none'); + if (_s.debugMode && !_$(oD.id)) { + try { + oTarget.appendChild(oD); + } catch(e2) { + throw new Error(appXHTML); + } + oTarget.appendChild(oDebug); + } + } + oTarget = null; + } + + if (specialCase) { + _s._wD(specialCase); + } + + _s._wD('-- SoundManager 2 '+_s.version+(_s.useMovieStar?', MovieStar mode':'')+(_s.useHighPerformance?', high performance mode':'')+' --',1); + _s._wD('soundManager._createMovie(): Trying to load '+smURL+(!_s._overHTTP && _s.altURL?'(alternate URL)':''),1); + }; + + // aliased to this._wD() + this._writeDebug = function(sText,sType,bTimestamp) { + if (!_s.debugMode) { + return false; + } + if (typeof bTimestamp != 'undefined' && bTimestamp) { + sText = sText + ' | '+new Date().getTime(); + } + if (_s._hasConsole && _s.useConsole) { + var sMethod = _s._debugLevels[sType]; + if (typeof console[sMethod] != 'undefined') { + console[sMethod](sText); + } else { + console.log(sText); + } + if (_s.useConsoleOnly) { + return true; + } + } + var sDID = 'soundmanager-debug'; + try { + var o = _$(sDID); + if (!o) { + return false; + } + var oItem = document.createElement('div'); + if (++_s._wdCount%2===0) { + oItem.className = 'sm2-alt'; + } + // sText = sText.replace(/\n/g,'
'); + if (typeof sType == 'undefined') { + sType = 0; + } else { + sType = parseInt(sType,10); + } + oItem.appendChild(document.createTextNode(sText)); + if (sType) { + if (sType >= 2) { + oItem.style.fontWeight = 'bold'; + } + if (sType == 3) { + oItem.style.color = '#ff3333'; + } + } + // o.appendChild(oItem); // top-to-bottom + o.insertBefore(oItem,o.firstChild); // bottom-to-top + } catch(e) { + // oh well + } + o = null; + }; + this._writeDebug._protected = true; + this._wdCount = 0; + this._wdCount._protected = true; + this._wD = this._writeDebug; + + this._wDAlert = function(sText) { alert(sText); }; + + if (window.location.href.indexOf('debug=alert')+1 && _s.debugMode) { + _s._wD = _s._wDAlert; + } + + this._toggleDebug = function() { + var o = _$(_s.debugID); + var oT = _$(_s.debugID+'-toggle'); + if (!o) { + return false; + } + if (_s._debugOpen) { + // minimize + oT.innerHTML = '+'; + o.style.display = 'none'; + } else { + oT.innerHTML = '-'; + o.style.display = 'block'; + } + _s._debugOpen = !_s._debugOpen; + }; + + this._toggleDebug._protected = true; + + this._debug = function() { + _s._wD('--- soundManager._debug(): Current sound objects ---',1); + for (var i=0,j=_s.soundIDs.length; i0) { + _s._wD('soundManager._initMovie(): Waiting for ExternalInterface call from Flash..'); + } + } + }; + + this.waitForExternalInterface = function() { + if (_s._waitingForEI) { + return false; + } + _s._waitingForEI = true; + if (_s._tryInitOnFocus && !_s._isFocused) { + _s._wD('soundManager: Special case: Waiting for focus-related event..'); + return false; + } + if (_s.flashLoadTimeout>0) { + if (!_s._didInit) { + _s._wD('soundManager: Getting impatient, still waiting for Flash.. ;)'); + } + setTimeout(function() { + if (!_s._didInit) { + _s._wD('soundManager: No Flash response within reasonable time after document load.\nPossible causes: Flash version under 8, no support, or Flash security denying JS-Flash communication.',2); + if (!_s._overHTTP) { + _s._wD('soundManager: Loading this page from local/network file system (not over HTTP?) Flash security likely restricting JS-Flash access. Consider adding current URL to "trusted locations" in the Flash player security settings manager at '+flashCPLink+', or simply serve this content over HTTP.',2); + } + _s._debugTS('flashtojs',false,': Timed out'+(_s._overHTTP)?' (Check flash security)':' (No plugin/missing SWF?)'); + } + // if still not initialized and no other options, give up + if (!_s._didInit && _s._okToDisable) { + _s._failSafely(true); // don't disable, for reboot() + } + },_s.flashLoadTimeout); + } else if (!_s.didInit) { + _s._wD('soundManager: Waiting indefinitely for Flash...'); + } + }; + + this.handleFocus = function() { + if (_s._isFocused || !_s._tryInitOnFocus) { + return true; + } + _s._okToDisable = true; + _s._isFocused = true; + _s._wD('soundManager.handleFocus()'); + if (_s._tryInitOnFocus) { + // giant Safari 3.1 hack - assume window in focus if mouse is moving, since document.hasFocus() not currently implemented. + window.removeEventListener('mousemove',_s.handleFocus,false); + } + // allow init to restart + _s._waitingForEI = false; + setTimeout(_s.waitForExternalInterface,500); + // detach event + if (window.removeEventListener) { + window.removeEventListener('focus',_s.handleFocus,false); + } else if (window.detachEvent) { + window.detachEvent('onfocus',_s.handleFocus); + } + }; + + this.initComplete = function(bNoDisable) { + if (_s._didInit) { + return false; + } + _s._didInit = true; + _s._wD('-- SoundManager 2 '+(_s._disabled?'failed to load':'loaded')+' ('+(_s._disabled?'security/load error':'OK')+') --',1); + if (_s._disabled || bNoDisable) { + _s._wD('soundManager.initComplete(): calling soundManager.onerror()',1); + _s._debugTS('onload',false); + _s.onerror.apply(window); + return false; + } else { + _s._debugTS('onload',true); + } + if (_s.waitForWindowLoad && !_s._windowLoaded) { + _s._wD('soundManager: Waiting for window.onload()'); + if (window.addEventListener) { + window.addEventListener('load',_s.initUserOnload,false); + } else if (window.attachEvent) { + window.attachEvent('onload',_s.initUserOnload); + } + return false; + } else { + if (_s.waitForWindowLoad && _s._windowLoaded) { + _s._wD('soundManager: Document already loaded'); + } + _s.initUserOnload(); + } + }; + + this.initUserOnload = function() { + _s._wD('soundManager.initComplete(): calling soundManager.onload()',1); + // call user-defined "onload", scoped to window + _s.onload.apply(window); + _s._wD('soundManager.onload() complete',1); + }; + + this.init = function() { + _s._wD('-- soundManager.init() --'); + // called after onload() + _s._initMovie(); + if (_s._didInit) { + _s._wD('soundManager.init(): Already called?'); + return false; + } + // event cleanup + if (window.removeEventListener) { + window.removeEventListener('load',_s.beginDelayedInit,false); + } else if (window.detachEvent) { + window.detachEvent('onload',_s.beginDelayedInit); + } + try { + _s._wD('Attempting to call Flash from JS..'); + _s.o._externalInterfaceTest(false); // attempt to talk to Flash + // _s._wD('Flash ExternalInterface call (JS-Flash) OK',1); + if (!_s.allowPolling) { + _s._wD('Polling (whileloading/whileplaying support) is disabled.',1); + } + _s.setPolling(true); + if (!_s.debugMode) { + _s.o._disableDebug(); + } + _s.enabled = true; + _s._debugTS('jstoflash',true); + } catch(e) { + _s._debugTS('jstoflash',false); + _s._failSafely(true); // don't disable, for reboot() + _s.initComplete(); + return false; + } + _s.initComplete(); + }; + + this.beginDelayedInit = function() { + _s._wD('soundManager.beginDelayedInit()'); + _s._windowLoaded = true; + setTimeout(_s.waitForExternalInterface,500); + setTimeout(_s.beginInit,20); + }; + + this.beginInit = function() { + if (_s._initPending) { + return false; + } + _s.createMovie(); // ensure creation if not already done + _s._initMovie(); + _s._initPending = true; + return true; + }; + + this.domContentLoaded = function() { + _s._wD('soundManager.domContentLoaded()'); + if (document.removeEventListener) { + document.removeEventListener('DOMContentLoaded',_s.domContentLoaded,false); + } + _s.go(); + }; + + this._externalInterfaceOK = function() { + // callback from flash for confirming that movie loaded, EI is working etc. + if (_s.swfLoaded) { + return false; + } + _s._wD('soundManager._externalInterfaceOK()'); + _s._debugTS('swf',true); + _s._debugTS('flashtojs',true); + _s.swfLoaded = true; + _s._tryInitOnFocus = false; + if (_s.isIE) { + // IE needs a timeout OR delay until window.onload - may need TODO: investigating + setTimeout(_s.init,100); + } else { + _s.init(); + } + }; + + this._setSandboxType = function(sandboxType) { + var sb = _s.sandbox; + sb.type = sandboxType; + sb.description = sb.types[(typeof sb.types[sandboxType] != 'undefined'?sandboxType:'unknown')]; + _s._wD('Flash security sandbox type: '+sb.type); + if (sb.type == 'localWithFile') { + sb.noRemote = true; + sb.noLocal = false; + _s._wD('Flash security note: Network/internet URLs will not load due to security restrictions. Access can be configured via Flash Player Global Security Settings Page: http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html',2); + } else if (sb.type == 'localWithNetwork') { + sb.noRemote = false; + sb.noLocal = true; + } else if (sb.type == 'localTrusted') { + sb.noRemote = false; + sb.noLocal = false; + } + }; + + this.reboot = function() { + // attempt to reset and init SM2 + _s._wD('soundManager.reboot()'); + if (_s.soundIDs.length) { + _s._wD('Destroying '+_s.soundIDs.length+' SMSound objects...'); + } + for (var i=_s.soundIDs.length; i--;) { + _s.sounds[_s.soundIDs[i]].destruct(); + } + // trash ze flash + try { + if (_s.isIE) { + _s.oRemovedHTML = _s.o.innerHTML; + } + _s.oRemoved = _s.o.parentNode.removeChild(_s.o); + _s._wD('Flash movie removed.'); + } catch(e) { + // uh-oh. + _s._wD('Warning: Failed to remove flash movie.',2); + } + _s.enabled = false; + _s._didInit = false; + _s._waitingForEI = false; + _s._initPending = false; + _s._didInit = false; + _s._didAppend = false; + _s._appendSuccess = false; + _s._didInit = false; + _s._disabled = false; + _s._waitingforEI = true; + _s.swfLoaded = false; + _s.soundIDs = {}; + _s.sounds = []; + _s.o = null; + _s._wD('soundManager: Rebooting...'); + window.setTimeout(function() { + soundManager.beginDelayedInit(); + },20); + }; + + this.destruct = function() { + _s._wD('soundManager.destruct()'); + _s.disable(true); + }; + + // SMSound (sound object) + + SMSound = function(oOptions) { + var _t = this; + this.sID = oOptions.id; + this.url = oOptions.url; + this.options = _s._mergeObjects(oOptions); + this.instanceOptions = this.options; // per-play-instance-specific options + this._iO = this.instanceOptions; // short alias + + // assign property defaults (volume, pan etc.) + this.pan = this.options.pan; + this.volume = this.options.volume; + + this._debug = function() { + if (_s.debugMode) { + var stuff = null; + var msg = []; + var sF = null; + var sfBracket = null; + var maxLength = 64; // # of characters of function code to show before truncating + for (stuff in _t.options) { + if (_t.options[stuff] !== null) { + if (_t.options[stuff] instanceof Function) { + // handle functions specially + sF = _t.options[stuff].toString(); + sF = sF.replace(/\s\s+/g,' '); // normalize spaces + sfBracket = sF.indexOf('{'); + msg[msg.length] = ' '+stuff+': {'+sF.substr(sfBracket+1,(Math.min(Math.max(sF.indexOf('\n')-1,maxLength),maxLength))).replace(/\n/g,'')+'... }'; + } else { + msg[msg.length] = ' '+stuff+': '+_t.options[stuff]; + } + } + } + _s._wD('SMSound() merged options: {\n'+msg.join(', \n')+'\n}'); + } + }; + + this._debug(); + + this.id3 = { + /* + Name/value pairs set via Flash when available - see reference for names: + http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00001567.html + (eg., this.id3.songname or this.id3['songname']) + */ + }; + + this.resetProperties = function(bLoaded) { + _t.bytesLoaded = null; + _t.bytesTotal = null; + _t.position = null; + _t.duration = null; + _t.durationEstimate = null; + _t.loaded = false; + _t.playState = 0; + _t.paused = false; + _t.readyState = 0; // 0 = uninitialised, 1 = loading, 2 = failed/error, 3 = loaded/success + _t.muted = false; + _t.didBeforeFinish = false; + _t.didJustBeforeFinish = false; + _t.isBuffering = false; + _t.instanceOptions = {}; + _t.instanceCount = 0; + _t.peakData = { + left: 0, + right: 0 + }; + _t.waveformData = []; + _t.eqData = []; + }; + + _t.resetProperties(); + + // --- public methods --- + + this.load = function(oOptions) { + if (typeof oOptions != 'undefined') { + _t._iO = _s._mergeObjects(oOptions); + _t.instanceOptions = _t._iO; + } else { + oOptions = _t.options; + _t._iO = oOptions; + _t.instanceOptions = _t._iO; + } + if (typeof _t._iO.url == 'undefined') { + _t._iO.url = _t.url; + } + _s._wD('soundManager.load(): '+_t._iO.url,1); + if (_t._iO.url == _t.url && _t.readyState !== 0 && _t.readyState != 2) { + _s._wD('soundManager.load(): current URL already assigned.',1); + return false; + } + _t.loaded = false; + _t.readyState = 1; + _t.playState = 0; // (oOptions.autoPlay?1:0); // if autoPlay, assume "playing" is true (no way to detect when it actually starts in Flash unless onPlay is watched?) + try { + if (_s.flashVersion==8) { + _s.o._load(_t.sID,_t._iO.url,_t._iO.stream,_t._iO.autoPlay,(_t._iO.whileloading?1:0)); + } else { + _s.o._load(_t.sID,_t._iO.url,_t._iO.stream?true:false,_t._iO.autoPlay?true:false); // ,(_tO.whileloading?true:false) + if (_t._iO.isMovieStar && _t._iO.autoLoad && !_t._iO.autoPlay) { + // special case: MPEG4 content must start playing to load, then pause to prevent playing. + _t.pause(); + } + } + } catch(e) { + _s._wD('SMSound.load(): Exception: JS-Flash communication failed, or JS error.',2); + _s._debugTS('onload',false); + _s.onerror(); + _s.disable(); + } + + }; + + this.unload = function() { + // Flash 8/AS2 can't "close" a stream - fake it by loading an empty MP3 + // Flash 9/AS3: Close stream, preventing further load + if (_t.readyState !== 0) { + _s._wD('SMSound.unload(): "'+_t.sID+'"'); + if (_t.readyState != 2) { // reset if not error + _t.setPosition(0,true); // reset current sound positioning + } + _s.o._unload(_t.sID,_s.nullURL); + // reset load/status flags + _t.resetProperties(); + } + }; + + this.destruct = function() { + // kill sound within Flash + _s._wD('SMSound.destruct(): "'+_t.sID+'"'); + _s.o._destroySound(_t.sID); + _s.destroySound(_t.sID,true); // ensure deletion from controller + }; + + this.play = function(oOptions) { + if (!oOptions) { + oOptions = {}; + } + _t._iO = _s._mergeObjects(oOptions,_t._iO); + _t._iO = _s._mergeObjects(_t._iO,_t.options); + _t.instanceOptions = _t._iO; + if (_t.playState == 1) { + var allowMulti = _t._iO.multiShot; + if (!allowMulti) { + _s._wD('SMSound.play(): "'+_t.sID+'" already playing (one-shot)',1); + return false; + } else { + _s._wD('SMSound.play(): "'+_t.sID+'" already playing (multi-shot)',1); + } + } + if (!_t.loaded) { + if (_t.readyState === 0) { + _s._wD('SMSound.play(): Attempting to load "'+_t.sID+'"',1); + // try to get this sound playing ASAP + _t._iO.stream = true; + _t._iO.autoPlay = true; + // TODO: need to investigate when false, double-playing + // if (typeof oOptions.autoPlay=='undefined') _tO.autoPlay = true; // only set autoPlay if unspecified here + _t.load(_t._iO); // try to get this sound playing ASAP + } else if (_t.readyState == 2) { + _s._wD('SMSound.play(): Could not load "'+_t.sID+'" - exiting',2); + return false; + } else { + _s._wD('SMSound.play(): "'+_t.sID+'" is loading - attempting to play..',1); + } + } else { + _s._wD('SMSound.play(): "'+_t.sID+'"'); + } + if (_t.paused) { + _t.resume(); + } else { + _t.playState = 1; + if (!_t.instanceCount || _s.flashVersion == 9) { + _t.instanceCount++; + } + _t.position = (typeof _t._iO.position != 'undefined' && !isNaN(_t._iO.position)?_t._iO.position:0); + if (_t._iO.onplay) { + _t._iO.onplay.apply(_t); + } + _t.setVolume(_t._iO.volume,true); // restrict volume to instance options only + _t.setPan(_t._iO.pan,true); + _s.o._start(_t.sID,_t._iO.loop||1,(_s.flashVersion==9?_t.position:_t.position/1000)); + } + }; + + this.start = this.play; // just for convenience + + this.stop = function(bAll) { + if (_t.playState == 1) { + _t.playState = 0; + _t.paused = false; + // if (_s.defaultOptions.onstop) _s.defaultOptions.onstop.apply(_s); + if (_t._iO.onstop) { + _t._iO.onstop.apply(_t); + } + _s.o._stop(_t.sID,bAll); + _t.instanceCount = 0; + _t._iO = {}; + // _t.instanceOptions = _t._iO; + } + }; + + this.setPosition = function(nMsecOffset,bNoDebug) { + if (typeof nMsecOffset == 'undefined') { + nMsecOffset = 0; + } + var offset = Math.min(_t.duration,Math.max(nMsecOffset,0)); // position >= 0 and <= current available (loaded) duration + _t._iO.position = offset; + if (!bNoDebug) { + _s._wD('SMSound.setPosition('+nMsecOffset+')'+(nMsecOffset != offset?', corrected value: '+offset:'')); + } + _s.o._setPosition(_t.sID,(_s.flashVersion==9?_t._iO.position:_t._iO.position/1000),(_t.paused||!_t.playState)); // if paused or not playing, will not resume (by playing) + }; + + this.pause = function() { + if (_t.paused || _t.playState === 0) { + return false; + } + _s._wD('SMSound.pause()'); + _t.paused = true; + _s.o._pause(_t.sID); + if (_t._iO.onpause) { + _t._iO.onpause.apply(_t); + } + }; + + this.resume = function() { + if (!_t.paused || _t.playState === 0) { + return false; + } + _s._wD('SMSound.resume()'); + _t.paused = false; + _s.o._pause(_t.sID); // flash method is toggle-based (pause/resume) + if (_t._iO.onresume) { + _t._iO.onresume.apply(_t); + } + }; + + this.togglePause = function() { + _s._wD('SMSound.togglePause()'); + if (!_t.playState) { + _t.play({position:(_s.flashVersion==9?_t.position:_t.position/1000)}); + return false; + } + if (_t.paused) { + _t.resume(); + } else { + _t.pause(); + } + }; + + this.setPan = function(nPan,bInstanceOnly) { + if (typeof nPan == 'undefined') { + nPan = 0; + } + if (typeof bInstanceOnly == 'undefined') { + bInstanceOnly = false; + } + _s.o._setPan(_t.sID,nPan); + _t._iO.pan = nPan; + if (!bInstanceOnly) { + _t.pan = nPan; + } + }; + + this.setVolume = function(nVol,bInstanceOnly) { + if (typeof nVol == 'undefined') { + nVol = 100; + } + if (typeof bInstanceOnly == 'undefined') { + bInstanceOnly = false; + } + _s.o._setVolume(_t.sID,(_s.muted&&!_t.muted)||_t.muted?0:nVol); + _t._iO.volume = nVol; + if (!bInstanceOnly) { + _t.volume = nVol; + } + }; + + this.mute = function() { + _t.muted = true; + _s.o._setVolume(_t.sID,0); + }; + + this.unmute = function() { + _t.muted = false; + var hasIO = typeof _t._iO.volume != 'undefined'; + _s.o._setVolume(_t.sID,hasIO?_t._iO.volume:_t.options.volume); + }; + + // --- "private" methods called by Flash --- + + this._whileloading = function(nBytesLoaded,nBytesTotal,nDuration) { + if (!_t._iO.isMovieStar) { + _t.bytesLoaded = nBytesLoaded; + _t.bytesTotal = nBytesTotal; + _t.duration = Math.floor(nDuration); + _t.durationEstimate = parseInt((_t.bytesTotal/_t.bytesLoaded)*_t.duration,10); // estimate total time (will only be accurate with CBR MP3s.) + if (_t.readyState != 3 && _t._iO.whileloading) { + _t._iO.whileloading.apply(_t); + } + } else { + _t.bytesLoaded = nBytesLoaded; + _t.bytesTotal = nBytesTotal; + _t.duration = Math.floor(nDuration); + _t.durationEstimate = _t.duration; + if (_t.readyState != 3 && _t._iO.whileloading) { + _t._iO.whileloading.apply(_t); + } + } + }; + + this._onid3 = function(oID3PropNames,oID3Data) { + // oID3PropNames: string array (names) + // ID3Data: string array (data) + _s._wD('SMSound._onid3(): "'+this.sID+'" ID3 data received.'); + var oData = []; + for (var i=0,j=oID3PropNames.length; i Flash either. + _s._debugTS('onload',false); + soundManager.onerror(); + soundManager.disable(); + } + + if (document.addEventListener) { + document.addEventListener('DOMContentLoaded',_s.domContentLoaded,false); + } + +} // SoundManager() + +soundManager = new SoundManager(); \ No newline at end of file diff --git a/tools/eztelemeta/design/standard/stylesheets/page-player.css b/tools/eztelemeta/design/standard/stylesheets/page-player.css new file mode 100644 index 00000000..92b7a9df --- /dev/null +++ b/tools/eztelemeta/design/standard/stylesheets/page-player.css @@ -0,0 +1,758 @@ +/* + + SoundManager 2: "page as playlist" example + ------------------------------------------ + + Clicks on links to MP3s are intercepted via JS, calls are + made to SoundManager to load/play sounds. CSS classes are + appended to the LI parent, which are used to highlight the + current play state and so on. + + Class names are applied in addition to "sm2_link" base. + + Default: + + sm2_link + + Additional states: + + sm2_playing + sm2_paused + + eg. + + + + + + + + The script also injects an HTML template containing control bar + and timing elements, which can also be targeted with CSS. + + + Note you don't necessarily require ul.playlist for your use + if only using one style on a page. You can just use .sm2_link + and so on, but isolate the CSS you want. + + Side note: Would do multiple class definitions eg. + + li.sm2_default.sm2_playing{} + + .. except IE 6 has a parsing bug which may break behaviour, + applying sm2_playing {} even when the class is set to sm2_default. + + + If you want to make your own UI from scratch, here is the base: + + Default + hover state, "click to play": + + li.sm2_link {} + li.sm2_link:hover {} + + Playing + hover state, "click to pause": + + li.sm2_playing {} + li.sm2_playing:hover {} + + Paused + hover state, "click to resume": + + li.sm2_paused {} + li.sm2_paused:hover {} + +*/ + + +/* background-image-based CSS3 example */ + +.spectrum-container { + display:none; +} + +ul.use-spectrum li.sm2_playing .spectrum-container { + position:absolute; + left:0px; + top:0px; + margin-left:-266px; + margin-top:-1px; + display:block; + background-color:#5588bb; + border:1px solid #99ccff; + -moz-border-radius:4px; + -webkit-border-radius:4px; + border-radius:4px; +} + +ul.use-spectrum .spectrum-box { + position:relative; + width:255px; + font-size:1em; + padding:2px 0px; + height:1.2em; + overflow:hidden; +} + +ul.use-spectrum .spectrum-box .spectrum { + position:absolute; + left:0px; + top:-2px; + margin-top:20px; + display:block; + font-size:1px; + width:1px; + height:1px; /* set to 50px for a thick line, 1px for a thin line, etc. */ + overflow:hidden; + background-color:#fff; +} + +ul.playlist { + list-style-type:none; + margin:0px; + padding:0px; + +} + +ul.playlist li { + /* assume all items will be sounds rather than wait for onload etc. in this example.. may differ for your uses. */ + position:relative; + display:block; + width:auto; + font-size:2em; + color:#666; + padding:0.25em 0.5em 0.25em 0.5em; + border:none; + letter-spacing:-1px; /* ZOMG WEB X.0. ;) */ + background-color:#f9f9f9; + -webkit-transition-property: hover; + -webkit-transition: background-color 0.15s ease-in-out; +} + +ul.playlist li a { + display:block; + text-decoration:none; + font-weight:normal; + color:#000; + font-size:120%; + outline:none; + position:relative; + z-index:2; + text-shadow: 0 0 0 #fff; /* stupid Safari "fat" font rendering tweak */ +} + +ul.playlist li.sm2_playing, +ul.playlist li.sm2_paused, +ul.playlist li.sm2_playing a { + color:#fff; + border-radius:3px; + -webkit-border-radius:3px; + -moz-border-radius:3px; +} + +ul.playlist li:hover { + background-color:#eee; +} + +ul.playlist li:hover a { + color:#333; +} + +ul.playlist li.sm2_playing, +ul.playlist li.sm2_playing:hover { + background-color:#6699cc; +} + +ul.playlist li.sm2_paused { + background-color:#999; +} + +ul.playlist li.sm2_playing:hover a, +ul.playlist li.sm2_paused a { + color:#fff; +} + +ul.playlist li .controls { + display:none; +} + +ul.playlist li .peak, +ul.playlist.use-peak li .peak { + display:none; + position:absolute; + top:0.55em; + right:0.5em; +} + +ul.playlist li.sm2_playing .controls, +ul.playlist li.sm2_paused .controls { + position:relative; + display:block; +} + +ul.playlist.use-peak li.sm2_playing .peak, +ul.playlist.use-peak li.sm2_paused .peak { + display:inline; + display:inline-block; +} + +ul.playlist.use-peak li .peak { + display:none; /* IE 7 */ +} + +ul.playlist li.sm2_paused .controls { + background-color:#666; +} + +ul.playlist li:hover .controls .statusbar { + position:relative; + cursor:ew-resize; + cursor:-moz-grab; + cursor:grab; +} + +ul.playlist li.sm2_paused .controls .statusbar { + background-color:#ccc; +} + +ul.playlist li .controls { + position:relative; + margin-top:0.25em; + margin-bottom:0.25em; + background-color:#99ccff; +} + +ul.playlist li .controls .statusbar { + position:relative; + height:0.5em; + background-color:#ccddff; + border:2px solid #fff; + border-radius:2px; + -moz-border-radius:2px; + -webkit-border-radius:2px; + overflow:hidden; + cursor:-moz-grab; + cursor:grab; +} + +ul.playlist li .controls.dragging .statusbar { + cursor:-moz-grabbing; + cursor:grabbing; +} + +ul.playlist li .controls .statusbar .position, +ul.playlist li .controls .statusbar .loading, +ul.playlist li .controls .statusbar .annotation { + position:absolute; + left:0px; + top:0px; + height:0.5em; +} + +ul.playlist li .controls .statusbar .position { + background-color:#336699; + border-right:3px solid #336699; + border-radius:3px; + -moz-border-radius:3px; + -webkit-border-radius:3px; +} + +ul.playlist li.sm2_paused .controls .statusbar .position { + background-color:#666; + border-color:#666; +} + +ul.playlist li .controls .statusbar .loading { + background-color:#eee; +} + +ul.playlist li .controls .statusbar .position, +ul.playlist li .controls .statusbar .loading { + width:0px; +} + +ul.playlist li.sm2_playing a.sm2_link, +ul.playlist li.sm2_paused a.sm2_link { + margin-right:4.5em; /* room for timing stuff */ +} + +ul.playlist li .timing { + position:absolute; + display:none; + text-align:right; + right:1em; + top:1em; + width:auto; + height:1em; + /* + padding:4px 5px 2px 5px; + *padding:3px 5px 3px 5px; + */ + padding:3px 5px; + background-color:#5588bb; + border:1px solid #99ccff; + -moz-border-radius:4px; + -khtml-border-radius:4px; + border-radius:4px; + letter-spacing:0px; + font:44% monaco,"VT-100",terminal,"lucida console",courier,system; + line-height:1em; + vertical-align:middle; +} + +ul.playlist.use-peak li .timing { + right:4.25em; +} + +ul.playlist li:hover .timing { + z-index:2; +} + +ul.playlist li .timing div.sm2_timing { + margin:0px; + padding:0px; + margin-top:-1em; + text-shadow: 0 0 0 #fff; /* stupid Safari "fat" font rendering tweak */ +} + +ul.playlist li.sm2_playing .timing, +ul.playlist li.sm2_paused .timing { + display:block; +} + +ul.playlist li.sm2_paused .timing .sm2_position { + text-decoration:blink; /* hee hee. first actual appropriate use? :D */ +} + +ul.playlist li.sm2_paused .timing, +ul.playlist.use-peak li.sm2_paused .peak { + background-color:#888; + border-color:#ccc; +} + +/* peak data */ + +/* ul.playlist ... */ + +ul.playlist.use-peak li .peak { + display:none; + zoom:1; + border:1px solid #99ccff; + padding:2px; + height:0.55em; + -moz-border-radius:4px; + -khtml-border-radius:4px; + border-radius:4px; + background-color:#5588bb; + width:0.8em; + height:0.55em; + margin-top:-3px; +} + +ul.playlist.use-peak li .peak-box { + position:relative; + width:100%; + height:0.55em; + overflow:hidden; +} + +ul.playlist li .peak .l, +ul.playlist li .peak .r { + position:absolute; + left:0px; + top:0px; + width:7px; + height:50px; + background:#fff; + border:1px solid #fff; + -moz-border-radius:1px; + -khtml-border-radius:1px; + margin-top:1em; +} + +ul.playlist li .peak .l { + margin-right:1px; +} + +ul.playlist li .peak .r { + left:10px; +} + +#control-template { + display:none; +} + +/* + ------------------------------------------ + -- annotations (sub-tracks, notes etc.) -- + ------------------------------------------ +*/ + +ul.playlist li a.sm2_link .metadata { + display:none; /* hide by default */ +} + +ul.playlist li.sm2_paused a.sm2_link .metadata, +ul.playlist li.sm2_playing a.sm2_link .metadata { + display:inline; +} + +ul.playlist li ul { + list-style-type:none; + margin:0px; + padding:0px; + position:relative; + font-size:small; + display:none; +} + +ul.playlist li ul li { + position:relative; + margin:0px; + padding:2px 3px; + border:1px solid transparent; + -moz-border-radius:6px; + -khtml-border-radius:6px; + border-radius:6px; + margin-right:1em; + font-family:helvetica,verdana,tahoma,arial,"sans serif"; + font-size:x-small; + font-weight:lighter; + letter-spacing:0px; + background-color:transparent; + opacity:0.66; +} + +ul.playlist li ul li:hover { + opacity:1; + background-color:#fff; + border-color:#ccc; + color:#666; +} + +ul.playlist li.sm2_playing ul li, +ul.playlist li.sm2_paused ul li { + color:#fff; +} + +ul.playlist li.sm2_playing ul li:hover { + background-color:#fff; + color:#5588bb; + border-color:#336699; + opacity:0.9; +} + +ul.playlist li.sm2_paused ul li:hover { + background-color:#888; +} + +/* metadata */ + +ul.playlist li .metadata .duration { + /* optional timing data */ + display:none; +} + +ul.playlist li .metadata ul li p { + margin:0px; + padding:0px; +} + +ul.playlist li .metadata ul li span { + display:none; +} + +ul.playlist li .controls .statusbar .annotation { + position:absolute; + background-color:transparent; + top:0px; + color:#666; + text-align:right; + margin-left:10px; + height:0.5em; +} + +ul.playlist li .controls .statusbar .annotation:hover { + z-index:12; /* sit on top of note */ +} + +ul.playlist li .controls .statusbar .annotation span.bubble { + /* using · */ + display:inline-block; + background-color:#fff; + border:1px solid #666; + border-radius:6px; + -moz-border-radius:6px; + -webkit-border-radius:6px; +} + +ul.playlist li .controls .statusbar .annotation span { + display:block; + background:transparent url(../image/divot.png) no-repeat 50% 0px; + width:15px; + margin-left:-15px; + height:12px; + text-align:center; +} + +ul.playlist li .controls .statusbar .annotation.alt { + top:auto; + bottom:0px; +} + +ul.playlist li .controls .statusbar .annotation span:hover { + cursor:none; /* Fx3 rules. */ + margin-top:0.1em; +} + +ul.playlist li .controls .statusbar .annotation.alt span:hover { + margin-top:-0.1em; +} + +ul.playlist li .controls .statusbar .annotation.alt span { + background:transparent url(../image/divot-bottom.png) no-repeat 50% bottom; +} + +ul.playlist li .note { + position:absolute; + display:none; + left:0px; + top:0px; + z-index:10; + font-size:x-small; + padding:2px 4px 2px 4px; + width:auto; + color:#666; + background-color:#fff; + border:1px solid #ccc; + border-radius:6px; + -moz-border-radius:6px; + -webkit-border-radius:6px; + font-style:normal; + font-weight:bold; + font-family:arial,tahoma,verdana,"sans serif"; + letter-spacing:0px; + margin-top:1.1em; +} + +ul.playlist li .note.alt { + margin-top:-1.32em; +} + +ul.playlist li .note:hover { + display:block !important; +} + +ul.playlist li .sm2_divider { + font-size:0.75em; +} + +ul.playlist li .sm2_metadata { + font-size:0.65em; +} + + +/* + --------------------------------- + -- alternate (optional) themes -- + --------------------------------- +*/ + +ul.playlist.dark li.sm2_playing a { + color:#fff; +} + +ul.playlist.dark li.sm2_playing .timing, +ul.playlist.use-peak.dark li.sm2_playing .peak { + color:#999; +} + +ul.playlist.use-spectrum.dark li.sm2_playing .spectrum-container { + background-color:#222; + border-color:#444; +} + +ul.playlist.use-spectrum.dark li.sm2_playing .spectrum-container .spectrum { + background-color:#999; +} + +ul.playlist.dark li.sm2_paused { + background-color:#333; +} + +ul.playlist.dark li.sm2_paused a { + color:#999; +} + +ul.playlist.dark li.sm2_playing, +ul.playlist.dark li.sm2_playing:hover { + background-color:#333; +} + +ul.playlist.dark li:hover .controls .statusbar { + background-color:#666; +} + +ul.playlist.dark li .controls { + background-color:#333; +} + +ul.playlist.dark li .controls .statusbar { + background-color:#666; + border-color:#444; +} + +ul.playlist.dark li .controls .statusbar .position { + background-color:#111; + border-right:3px solid #111; + border-radius:3px; + -moz-border-radius:3px; + -webkit-border-radius:3px; +} + +ul.playlist.dark li .controls .statusbar .loading { + background-color:#444; +} + +ul.playlist.dark li .timing, +ul.playlist.use-peak.dark li .peak { + background-color:#222; + border-color:#444; +} + +ul.playlist.dark.use-peak li .peak .l, +ul.playlist.dark.use-peak li .peak .r { + border-color:#444; + background-color:#999; +} + + +/* gold theme */ + +ul.playlist.gold li.sm2_paused { + background-color:#996600; +} + +ul.playlist.gold li.sm2_playing, +ul.playlist.gold li.sm2_playing:hover { + background-color:#cc9900; +} + +ul.playlist.gold li .controls { + background-color:transparent; +} + +ul.playlist.gold li .controls .statusbar { + background-color:#fff; + border-color:#fff; +} + +ul.playlist.gold li .controls .statusbar .position { + background-color:#996600; + border-right:3px solid #996600; + border-radius:3px; + -moz-border-radius:3px; + -webkit-border-radius:3px; +} + +ul.playlist.gold li .controls .statusbar .loading { + background-color:#ffeedd; +} + +ul.playlist.gold li .timing, +ul.playlist.use-peak.gold li .peak { + background-color:#CC9900; + border-color:#ffcc33; +} + +ul.playlist.use-spectrum.gold li.sm2_playing .spectrum-container { + background-color:#cc9900; + border-color:#ffcc33; +} + +ul.playlist.use-spectrum.gold li.sm2_playing .spectrum-container .spectrum { + background-color:#fff; +} + +ul.playlist.gold.use-peak li .peak .l, +ul.playlist.gold.use-peak li .peak .r { + border-color:#fff; + background-color:#fff; +} + + +/* ZOMG PONIES!!!ONEONEONE */ + +ul.playlist.bubblegum li a { + font-family:"comic sans ms",verdana,arial,tahoma,"sans serif"; /* heh */ +} + +ul.playlist.bubblegum li.sm2_paused, +ul.playlist.bubblegum li.sm2_paused:hover { + background-color:#ffccee; +} + +ul.playlist.bubblegum li.sm2_paused a, +ul.playlist.bubblegum li.sm2_paused:hover a, +ul.playlist.bubblegum li.sm2_paused .timing, +ul.playlist.use-peak.bubblegum li.sm2_paused .peak { + color:#ff6699; +} + +ul.playlist.bubblegum li:hover { + background-color:#ffddee; +} + +ul.playlist.bubblegum li.sm2_playing, +ul.playlist.bubblegum li.sm2_playing:hover { + background-color:#ff7799; +} + +ul.playlist.bubblegum li .controls { + background-color:transparent; +} + +ul.playlist.bubblegum li .controls .statusbar { + background-color:#fff; + border-color:#fff; +} + +ul.playlist.bubblegum li .controls .statusbar .position { + background-color:#ffaacc; + border-right:3px solid #ffaacc; + border-radius:3px; + -moz-border-radius:3px; + -webkit-border-radius:3px; +} + +ul.playlist.bubblegum li .controls .statusbar .loading { + background-color:#ffeedd; +} + +ul.playlist.bubblegum li .timing, +ul.playlist.use-peak.bubblegum li .peak { + background-color:#ffaacc; + border-color:#ffccee; +} + +ul.playlist.use-spectrum.bubblegum li.sm2_playing .spectrum-container { + background-color:#ffaacc; + border-color:#ffccee; +} + +ul.playlist.use-spectrum.bubblegum li.sm2_playing .spectrum-container .spectrum { + background-color:#fff; +} + +ul.playlist.bubblegum.use-peak li .peak .l, +ul.playlist.bubblegum.use-peak li .peak .r { + border-color:#fff; + background-color:#fff; +} + + +ul.playlist.shiny li.sm2_paused, +ul.playlist.shiny li.sm2_playing { + background-image:url(../image/top-highlight.png); + background-repeat:repeat-x; + background-position:0px -1px; + _background-image:none; /* can't be bothered with IE 6. */ +} \ No newline at end of file diff --git a/tools/eztelemeta/design/standard/swf/soundmanager2.swf b/tools/eztelemeta/design/standard/swf/soundmanager2.swf new file mode 100644 index 0000000000000000000000000000000000000000..8a9711c6a6f3382e8e10a6449f67934533f0cfb7 GIT binary patch literal 2436 zcmV-~348WKS5pY;761Tv+KgCBbKA%fZh}J+vTSWEdCg=^dA0IOTH9L3juSs5TM}hG zED5AVzc!A|fFwx4h5!}-?pl}Jwz8KnH&*$ON-9;kFybT zpw=>12XG$Wbbr&YnbBK-836bLz}XZOwFCSc$>IQ%Q~0?*Hi=(sm8;dVS$|`;tYEI< zb==0b>0-yf4hLharwRV;--QE%Q`MH^)l3I!W?((66g@ZeJ;$+p2of+gTdKXb>LJYW zQ~=2zITb)??;)JO8*XU%U!mwW3bftU1J|rMRs$MVtrK^?_U+JGp%Iu_b>Sw z?F^E^RiXDq)A#nKq$EUF_Jh#cgTShHkmf!FrrW4_Zy)csEtDTvVI?t8ZP)?rRc>;i z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93IRw&uMjXxZCGqni7ZhYyJ75dE=pK*U=e>bD{m0K|Y|dZw z&52={bdYbaj&{3zecIT ztvUTgfwDla)AHoP(Wu@cs)3;x-#T7szttgg73rxP+oNCv%z$;T|;Eac&SdJ~)9 zUO*|^kC!UN>h{ux0pYG49Qw~P|1*c>5{bO}w@s8svQ{8XJfi{r4*&rF{{sMKHbl2| C7__4R literal 0 HcmV?d00001 diff --git a/tools/eztelemeta/design/standard/swf/soundmanager2_flash9.swf b/tools/eztelemeta/design/standard/swf/soundmanager2_flash9.swf new file mode 100644 index 0000000000000000000000000000000000000000..75366d007b13d9cd92ab223aa0215b202d21fd41 GIT binary patch literal 8273 zcmV-XAgS?SsdG0nl`3QA*9G4_Fm?*n6(WaD<% zo}NBqax|6Bb>ZmJ)RcidJ95;VuvXhCGncreqYOwm`D8w2ZR(C^qL$H@ zvL=mnMt2!sLMspgj+YtTRB=p`u-jvq(T=ffCO#fRo@^u~ktxw(>)H zGe4eF^mmVsMy;%tOy}!o9iT?>6Hn&GQsyzw&=~GxxijhQJ?rLVt@n|{nax>O?Aqx`Wz4u0 z4~*oj{9q=Rr1iiEP4;CoqXaOL%bVGJO)O!>jtpiqhqG2L7mS)YYhY+=CY{e_QYkB| z_H+)U$1{#t>Lu1rq*laq=aZvW*1eaWfq14YF~8y(gMHaJ}V@e?-W9E3y3Me@# zT?lzXGabrWhm$$vDxBV$868Vmd8>9z9o*rQPnvE?+HYOmW9Ch% z>N@210EQKcB{Ug0S~1YK9Lrl0OvICMDIKY$`br?V?v0OUWvFRDz=82xehaNzeaSS& z10ROFJ=WFZcsgA%leY4{eS3BmCri8r@Wdsl=p&i5EeX_8EIhV1Yo>FwYaK#W^4xUQ zj19xKjU;(GR)fUQ#L||uS})@5PsXi`M~XJCU-qQKKRU8+^?OFC6L$VhOve1_!F zNeEV!%oYtSG&E~U%Wd!RBi%vEJR(Ji@>P5I@Z|aZW(rTtbE6)mNgj*wT)tM)DV@(P z{Y6Jfs^civ*qSi$Ag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