修改等待图标显示问题,切换默认视频卡顿问题,读文本不音频生成慢导致,没播放口播
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 37s

This commit is contained in:
Song367 2025-08-11 15:21:58 +08:00
parent 4c50f77889
commit 1731519143
2 changed files with 8 additions and 6 deletions

View File

@ -334,6 +334,8 @@ class WebRTCChat {
}
// 设置视频流
this.recordedVideoBuffer.style.zIndex = "1";
this.recordedVideo.style.zIndex = "2";
this.currentVideoStream = defaultStream;
this.recordedVideo.srcObject = defaultStream;
this.recordedVideoBuffer.srcObject = this.precreatedStreams.get(this.interactionVideo);
@ -360,6 +362,10 @@ class WebRTCChat {
};
checkReady();
});
this.avatarContainer.style.display = 'none';
// 隐藏等待连接提示
this.hideConnectionWaiting();
// 确保视频开始播放
try {
@ -1165,14 +1171,10 @@ class WebRTCChat {
// 隐藏头像,显示视频
if (this.videoContainer) {
this.avatarContainer.style.display = 'none';
this.videoContainer.classList.add('calling');
}
// 隐藏等待连接提示
this.hideConnectionWaiting();
// 显示结束通话按钮
this.stopButton.style.display = 'block';

View File

@ -68,7 +68,7 @@ async function processAudioQueue() {
const sayName = '8-4-sh'
const targetVideo = window.webrtcApp.interactionVideo
// 如果是第一个音频片段,触发视频切换
if (isFirstChunk && sayName != window.webrtcApp.currentVideoTag && window.webrtcApp && window.webrtcApp.switchVideoStream) {
if (sayName != window.webrtcApp.currentVideoTag && window.webrtcApp && window.webrtcApp.switchVideoStream) {
try {
console.log('--------------触发视频切换:', sayName);
window.webrtcApp.switchVideoStream(targetVideo, 'audio', '8-4-sh');