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