video,没有音频。 我正在为Android开发.NET 9 MAUI移动应用。此应用程序包括一个页面,我在XAML页面中加载HybridWebView:

问题描述 投票:0回答:1
android azure maui text-to-speech .net-9.0
1个回答
0
投票
将此代码添加到我的JavaScript

document.getElementById('enableAudioButton').addEventListener('click', () => { const audioElement = document.getElementById('audio'); if (audioElement) { audioElement.muted = false; audioElement.play().then(() => { console.log("enableAudioButton Audio is playing."); }).catch((error) => { console.error("enableAudioButton Error attempting to play audio:", error); }); }

并按按钮“启用音频”,音频起作用。
我现在尝试做的是自动单击按钮,这是下一个挑战。
    

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.