Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions lib/webmushra/audio/MushraAudioControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ This source code is protected by copyright law and international treaties. This

**************************************************************************/

function MushraAudioControl(_audioContext, _bufferSize, _reference, _conditions, _errorHandler, _createAnchor35, _createAnchor70, _randomize, _switchBack) {
function MushraAudioControl(_audioContext, _bufferSize, _reference, _conditions, _errorHandler, _excludeReferenceFromConditions, _createAnchor35, _createAnchor70, _randomize, _switchBack) {
this.audioContext = _audioContext;
this.bufferSize = parseInt(_bufferSize);
this.reference = _reference;
this.conditions = _conditions;
this.errorHandler = _errorHandler;
this.excludeReferenceFromConditions = _excludeReferenceFromConditions;
this.createAnchor35 = _createAnchor35;
this.createAnchor70 = _createAnchor70;
this.switchBack = _switchBack;
Expand Down Expand Up @@ -41,7 +42,10 @@ function MushraAudioControl(_audioContext, _bufferSize, _reference, _conditions,
//listeners
this.eventListeners = [];

this.conditions[this.conditions.length] = this.reference;
// include or exclude reference from conditions
if (this.excludeReferenceFromConditions === false) { // default is false
this.conditions[this.conditions.length] = this.reference;
}

// add anchors
if (this.createAnchor35) {
Expand Down
2 changes: 1 addition & 1 deletion lib/webmushra/pages/MushraPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ MushraPage.prototype.init = function () {
}
this.mushraValidator.checkConditionConsistency(this.reference, this.conditions);

this.mushraAudioControl = new MushraAudioControl(this.audioContext, this.bufferSize, this.reference, this.conditions, this.errorHandler, this.pageConfig.createAnchor35, this.pageConfig.createAnchor70, this.pageConfig.randomize, this.pageConfig.switchBack);
this.mushraAudioControl = new MushraAudioControl(this.audioContext, this.bufferSize, this.reference, this.conditions, this.errorHandler, this.pageConfig.excludeReferenceFromConditions, this.pageConfig.createAnchor35, this.pageConfig.createAnchor70, this.pageConfig.randomize, this.pageConfig.switchBack);
this.mushraAudioControl.addEventListener((function (_event) {
if (_event.name == 'stopTriggered') {
$(".audioControlElement").text(this.pageManager.getLocalizer().getFragment(this.language, 'playButton'));
Expand Down