BotChat.Speech.SpeechSynthesizer.instance.onIsPlayingChanged 无法正常工作

问题描述 投票:0回答:0

我希望 SpeechSynthesizer isplaying 属性上的启用停止按钮为真。所以我使用了 onIsPlayingChanged 函数。调用 isplaing 属性更改的函数。

BotChat.Speech.SpeechSynthesizer.instance.onIsPlayingChanged = function (newValue, oldValue) {
                            const musicStopButton = document.getElementsByClassName("music-stop")[0];
                            if (newValue === true) {
                            musicStopButton.classList.add("show");
                            } else {
                            musicStopButton.classList.remove("show");
                            }
                            };

我已经尝试了上面提到的更多代码。没有任何工作。请帮我解决这个问题

javascript jquery azure-cognitive-services direct-line-botframework speechsynthesizer
© www.soinside.com 2019 - 2024. All rights reserved.