Skip to content

Commit

Permalink
SelfVoicingUtterance -> VoicingUtterance, see phetsims/tasks#1083
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Mar 24, 2021
1 parent 18f7106 commit f70d41e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions js/accessibility/speaker/webSpeaker.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import stepTimer from '../../../../axon/js/stepTimer.js';
import Range from '../../../../dot/js/Range.js';
import platform from '../../../../phet-core/js/platform.js';
import stripEmbeddingMarks from '../../../../phet-core/js/stripEmbeddingMarks.js';
import SelfVoicingUtterance from '../../../../utterance-queue/js/SelfVoicingUtterance.js';
import VoicingUtterance from '../../../../utterance-queue/js/VoicingUtterance.js';
import Utterance from '../../../../utterance-queue/js/Utterance.js';
import scenery from '../../scenery.js';

Expand Down Expand Up @@ -61,7 +61,7 @@ class WebSpeaker {
this.speechEnabledProperty = new BooleanProperty( true );

// @private {Utterance} - A reference to the last utterance spoken, so we can determine
// cancelling behavior when it is time to speak the next utterance. See SelfVoicingUtterance options.
// cancelling behavior when it is time to speak the next utterance. See VoicingUtterance options.
this.previousUtterance = null;

// @public {boolean} - a more interal way to disable speaking - the enabledProperty
Expand Down Expand Up @@ -119,7 +119,7 @@ class WebSpeaker {
this.populateVoices();

this.canSpeakProperty = DerivedProperty.and( [
this.enabledProperty, this.speechEnabledProperty, window.phet.joist.sim.soundEnabledProperty
this.enabledProperty, this.speechEnabledProperty
] );
}

Expand All @@ -145,7 +145,7 @@ class WebSpeaker {
*/
announce( utterance ) {
let withCancel = true;
if ( utterance instanceof SelfVoicingUtterance ) {
if ( utterance instanceof VoicingUtterance ) {
if ( this.previousUtterance && this.previousUtterance === utterance ) {
withCancel = utterance.cancelSelf;
}
Expand Down

0 comments on commit f70d41e

Please sign in to comment.