giuliomoro@0: /** giuliomoro@0: * WAET Blank Template giuliomoro@0: * Use this to start building your custom interface giuliomoro@0: */ giuliomoro@0: giuliomoro@0: // Once this is loaded and parsed, begin execution giuliomoro@0: loadInterface(); giuliomoro@0: giuliomoro@0: function loadInterface() { giuliomoro@0: // Use this to do any one-time page / element construction. For instance, placing any stationary text objects, giuliomoro@0: // holding div's, or setting up any nodes which are present for the entire test sequence giuliomoro@0: }; giuliomoro@0: giuliomoro@0: function loadTest(page) giuliomoro@0: { giuliomoro@0: // Called each time a new test page is to be build. The page specification node is the only item passed in giuliomoro@0: } giuliomoro@0: giuliomoro@0: function interfaceObject() giuliomoro@0: { giuliomoro@0: // An example node, you can make this however you want for each audioElement. giuliomoro@0: // However, every audioObject (audioEngineContext.audioObject) MUST have an interface object with the following giuliomoro@0: // You attach them by calling audioObject.bindInterface( ) giuliomoro@0: this.enable = function() giuliomoro@0: { giuliomoro@0: // This is used to tell the interface object that playback of this node is ready giuliomoro@0: }; giuliomoro@0: this.updateLoading = function(progress) giuliomoro@0: { giuliomoro@0: // progress is a value from 0 to 100 indicating the current download state of media files giuliomoro@0: }; giuliomoro@0: this.startPlayback = function() giuliomoro@0: { giuliomoro@0: // Called when playback has begun giuliomoro@0: }; giuliomoro@0: this.stopPlayback = function() giuliomoro@0: { giuliomoro@0: // Called when playback has stopped. This gets called even if playback never started! giuliomoro@0: }; giuliomoro@0: this.getValue = function() giuliomoro@0: { giuliomoro@0: // Return the current value of the object. If there is no value, return 0 giuliomoro@0: }; giuliomoro@0: this.getPresentedId = function() giuliomoro@0: { giuliomoro@0: // Return the presented ID of the object. For instance, the APE has sliders starting from 0. Whilst AB has alphabetical scale giuliomoro@0: }; giuliomoro@0: this.canMove = function() giuliomoro@0: { giuliomoro@0: // Return either true or false if the interface object can be moved. AB / Reference cannot, whilst sliders can and therefore have a continuous scale. giuliomoro@0: // These are checked primarily if the interface check option 'fragmentMoved' is enabled. giuliomoro@0: }; giuliomoro@0: this.exportXMLDOM = function(audioObject) { giuliomoro@0: // Called by the audioObject holding this element to export the interface node. giuliomoro@0: // If there is no value node (such as outside reference), return null giuliomoro@0: // If there are multiple value nodes (such as multiple scale / 2D scales), return an array of nodes with each value node having an 'interfaceName' attribute giuliomoro@0: // Use storage.document.createElement('value'); to generate the XML node. giuliomoro@0: giuliomoro@0: }; giuliomoro@0: this.error = function() { giuliomoro@0: // If there is an error with the audioObject, this will be called to indicate a failure giuliomoro@0: } giuliomoro@0: }; giuliomoro@0: giuliomoro@0: function resizeWindow(event) giuliomoro@0: { giuliomoro@0: // Called on every window resize event, use this to scale your page properly giuliomoro@0: } giuliomoro@0: giuliomoro@0: function pageXMLSave(store, pageSpecification) giuliomoro@0: { giuliomoro@0: // MANDATORY giuliomoro@0: // Saves a specific test page giuliomoro@0: // You can use this space to add any extra nodes to your XML saves giuliomoro@0: // Get the current information in store (remember to appendChild your data to it) giuliomoro@0: // pageSpecification is the current page node configuration giuliomoro@0: // To create new XML nodes, use storage.document.createElement(); giuliomoro@0: }