解决加载动画在视频出来前不显示
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 2m54s
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 2m54s
				
			This commit is contained in:
		
							parent
							
								
									ec06a76a10
								
							
						
					
					
						commit
						4c50f77889
					
				
							
								
								
									
										25
									
								
								src/index.js
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								src/index.js
									
									
									
									
									
								
							| @ -1117,10 +1117,11 @@ class WebRTCChat { | ||||
|     hideConnectionWaiting() { | ||||
|         if (this.connectionWaiting) { | ||||
|             this.connectionWaiting.classList.remove('show'); | ||||
|             // 等待动画完成后隐藏元素
 | ||||
|             setTimeout(() => { | ||||
|             this.connectionWaiting.style.display = 'none'; | ||||
|             }, 300); | ||||
|             // // 等待动画完成后隐藏元素
 | ||||
|             // setTimeout(() => {
 | ||||
|             //     this.connectionWaiting.style.display = 'none';
 | ||||
|             // }, 300);
 | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
| @ -1162,13 +1163,20 @@ class WebRTCChat { | ||||
|             this.startButton.style.opacity = '0.5' | ||||
|             this.stopButton.disabled = false; | ||||
| 
 | ||||
|             // 隐藏头像,显示视频
 | ||||
|             if (this.videoContainer) { | ||||
|                 this.avatarContainer.style.display = 'none'; | ||||
| 
 | ||||
|                 this.videoContainer.classList.add('calling'); | ||||
|             } | ||||
| 
 | ||||
|             // 隐藏等待连接提示
 | ||||
|             this.hideConnectionWaiting(); | ||||
|              | ||||
|             // 显示结束通话按钮
 | ||||
|             this.stopButton.style.display = 'block'; | ||||
|              | ||||
|             // 隐藏头像,显示视频
 | ||||
|             if (this.videoContainer) { | ||||
|                 this.videoContainer.classList.add('calling'); | ||||
|             } | ||||
|              | ||||
|              | ||||
|             this.updateAudioStatus('已连接', 'connected'); | ||||
|             this.logMessage('音频通话已开始', 'success'); | ||||
| @ -1186,8 +1194,7 @@ class WebRTCChat { | ||||
|             // 开始播放当前场景的默认视频
 | ||||
|             // await this.precreateImportantVideos();
 | ||||
| 
 | ||||
|             // 隐藏等待连接提示
 | ||||
|             this.hideConnectionWaiting(); | ||||
|              | ||||
|              | ||||
|         } catch (error) { | ||||
|             this.logMessage(`开始通话失败: ${error.message}`, 'error'); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Song367
						Song367