mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
@@ -278,7 +278,13 @@ class TaskSay extends TtsTask {
|
|||||||
try {
|
try {
|
||||||
this.logger.debug({evt},
|
this.logger.debug({evt},
|
||||||
`Say got playback-stop ${evt.variable_tts_playback_id ? evt.variable_tts_playback_id : ''}`);
|
`Say got playback-stop ${evt.variable_tts_playback_id ? evt.variable_tts_playback_id : ''}`);
|
||||||
const unmatchedResponse = !!evt.variable_tts_playback_id && evt.variable_tts_playback_id !== playbackId;
|
|
||||||
|
/**
|
||||||
|
* If we got a playback id on both the start and stop events, and they don't match,
|
||||||
|
* then we must have received a playback-stop event for an earlier play request.
|
||||||
|
*/
|
||||||
|
const unmatchedResponse = (!!playbackId && !!evt.variable_tts_playback_id) &&
|
||||||
|
evt.variable_tts_playback_id !== playbackId;
|
||||||
if (unmatchedResponse) {
|
if (unmatchedResponse) {
|
||||||
this.logger.info({currentPlaybackId: playbackId, stopPPlaybackId: evt.variable_tts_playback_id},
|
this.logger.info({currentPlaybackId: playbackId, stopPPlaybackId: evt.variable_tts_playback_id},
|
||||||
'Say:exec discarding playback-stop for earlier play');
|
'Say:exec discarding playback-stop for earlier play');
|
||||||
|
|||||||
Reference in New Issue
Block a user