annotate interfaces/blank.js @ 1112:28aa066720ed

Fixed typo
author Giulio Moro <giuliomoro@yahoo.it>
date Sun, 21 Feb 2016 03:35:27 +0000
parents 282dfb8076f5
children b5bf2f57187c c0022a09c4f6
rev   line source
n@1106 1 /**
n@1106 2 * WAET Blank Template
n@1106 3 * Use this to start building your custom interface
n@1106 4 */
n@1106 5
n@1106 6 // Once this is loaded and parsed, begin execution
n@1106 7 loadInterface();
n@1106 8
n@1106 9 function loadInterface() {
n@1106 10 // Use this to do any one-time page / element construction. For instance, placing any stationary text objects,
n@1106 11 // holding div's, or setting up any nodes which are present for the entire test sequence
n@1106 12 };
n@1106 13
n@1106 14 function loadTest(page)
n@1106 15 {
n@1106 16 // Called each time a new test page is to be build. The page specification node is the only item passed in
n@1106 17 }
n@1106 18
n@1106 19 function interfaceObject()
n@1106 20 {
n@1106 21 // An example node, you can make this however you want for each audioElement.
n@1106 22 // However, every audioObject (audioEngineContext.audioObject) MUST have an interface object with the following
n@1106 23 // You attach them by calling audioObject.bindInterface( )
n@1106 24 this.enable = function()
n@1106 25 {
n@1106 26 // This is used to tell the interface object that playback of this node is ready
n@1106 27 };
n@1106 28 this.updateLoading = function(progress)
n@1106 29 {
n@1106 30 // progress is a value from 0 to 100 indicating the current download state of media files
n@1106 31 };
n@1106 32 this.startPlayback = function()
n@1106 33 {
n@1106 34 // Called when playback has begun
n@1106 35 };
n@1106 36 this.stopPlayback = function()
n@1106 37 {
n@1106 38 // Called when playback has stopped. This gets called even if playback never started!
n@1106 39 };
n@1106 40 this.getValue = function()
n@1106 41 {
n@1106 42 // Return the current value of the object. If there is no value, return 0
n@1106 43 };
n@1106 44 this.getPresentedId = function()
n@1106 45 {
n@1106 46 // Return the presented ID of the object. For instance, the APE has sliders starting from 0. Whilst AB has alphabetical scale
n@1106 47 };
n@1106 48 this.canMove = function()
n@1106 49 {
n@1106 50 // Return either true or false if the interface object can be moved. AB / Reference cannot, whilst sliders can and therefore have a continuous scale.
n@1106 51 // These are checked primarily if the interface check option 'fragmentMoved' is enabled.
n@1106 52 };
n@1106 53 this.exportXMLDOM = function(audioObject) {
n@1106 54 // Called by the audioObject holding this element to export the interface <value> node.
n@1106 55 // If there is no value node (such as outside reference), return null
n@1106 56 // 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
n@1106 57 // Use storage.document.createElement('value'); to generate the XML node.
n@1106 58
n@1106 59 };
n@1106 60 };
n@1106 61
n@1106 62 function resizeWindow(event)
n@1106 63 {
n@1106 64 // Called on every window resize event, use this to scale your page properly
n@1106 65 }
n@1106 66
n@1106 67 function pageXMLSave(store, pageSpecification)
n@1106 68 {
n@1106 69 // MANDATORY
n@1106 70 // Saves a specific test page
n@1106 71 // You can use this space to add any extra nodes to your XML <audioHolder> saves
n@1106 72 // Get the current <page> information in store (remember to appendChild your data to it)
n@1106 73 // pageSpecification is the current page node configuration
n@1106 74 // To create new XML nodes, use storage.document.createElement();
n@1106 75 }