Intro video: replace with 0627.mp4, enable audio#3
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the intro video experience to allow audio playback by removing muted, and adds a user-interaction fallback when autoplay with sound is blocked by browser policy.
Changes:
- Removed
mutedfrom the intro<video>so audio can play. - Added a centered “▶ Play Intro” button that appears when
vv.play()is blocked. - Adjusted autoplay handling logic to show the button instead of immediately skipping the intro.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+929
to
+936
| playPromise.catch(function(){ | ||
| // autoplay blocked — show click-to-play button | ||
| if(playBtn) playBtn.style.display="block"; | ||
| if(playBtn) playBtn.addEventListener("click",function(){ | ||
| playBtn.style.display="none"; | ||
| vv.play(); | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更内容
原因
原视频无声音是因为
<video>标签添加了muted属性——Chrome 要求有音频的视频必须静音才能自动播放。本次修复
frontend/intro.mp4→0627.mp4(11 MB)muted:视频现在可正常输出音频vv.play())play()Promise rejected),显示居中 ▶ Play Intro 按钮技术说明
Chrome 自动播放策略:
测试
/intro.mp4返回200 video/mp4,Content-Length = 11017941video.muted === false(确认无静音属性)video.ended === true(视频正常播放至结束,触发 startApp() 过渡)#vi遮罩淡出,主界面正常渲染