# HG changeset patch # User Nicholas Jillings # Date 1464335548 -3600 # Node ID c31f73252af5cc0e4201ae24c0318ffefc14f027 # Parent 2f6a1f510ade2f85d0a99d05082a2f74c61bf624# Parent 5e1fb07919e73f1f71b70c2dea30d2a1854fa5ce Merge branch 'master' into Dev_main diff -r 5e1fb07919e7 -r c31f73252af5 js/core.js --- a/js/core.js Thu May 26 16:36:06 2016 +0100 +++ b/js/core.js Fri May 27 08:52:28 2016 +0100 @@ -1690,7 +1690,7 @@ } else { this.outputGain.gain.setValueAtTime(0.0,startTime); } - this.bufferNode.start(startTime); + this.bufferNode.start(startTime,this.specification.startTime || 0, this.specification.stopTime-this.specification.startTime || this.buffer.buffer.duration); this.bufferNode.playbackStartTime = audioEngineContext.timer.getTestTime(); } }; @@ -2501,7 +2501,7 @@ this.outsideReferenceHolder = document.createElement('button'); this.outsideReferenceHolder.className = 'outside-reference'; this.outsideReferenceHolder.setAttribute('track-id',index); - this.outsideReferenceHolder.textContent = "Play Reference"; + this.outsideReferenceHolder.textContent = this.parent.specification.label || "Reference"; this.outsideReferenceHolder.disabled = true; this.outsideReferenceHolder.onclick = function(event) @@ -2524,7 +2524,7 @@ progress = progress.split('.')[0]; this.outsideReferenceHolder.textContent = progress+'%'; } else { - this.outsideReferenceHolder.textContent = "Play Reference"; + this.outsideReferenceHolder.textContent = this.parent.specification.label || "Reference"; } }; this.startPlayback = function() @@ -2549,7 +2549,7 @@ }; this.getPresentedId = function() { - return 'Reference'; + return this.parent.specification.label || "Reference"; }; this.canMove = function() { diff -r 5e1fb07919e7 -r c31f73252af5 js/specification.js --- a/js/specification.js Thu May 26 16:36:06 2016 +0100 +++ b/js/specification.js Fri May 27 08:52:28 2016 +0100 @@ -626,6 +626,9 @@ this.marker = null; this.enforce = false; this.gain = 0.0; + this.label = null; + this.startTime = null; + this.stopTime = null; this.schema = specification.schema.getAllElementsByName('audioelement')[0];; this.parent = null; this.decode = function(parent,xml) diff -r 5e1fb07919e7 -r c31f73252af5 xml/test-schema.xsd --- a/xml/test-schema.xsd Thu May 26 16:36:06 2016 +0100 +++ b/xml/test-schema.xsd Fri May 27 08:52:28 2016 +0100 @@ -161,6 +161,7 @@ + @@ -184,6 +185,20 @@ + + + + + + + + + + + + + +