Improve video player opacity transition on load
Add null check for video player element before setting opacity in VideoPage.tsx to prevent potential runtime errors. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 344ec1e0-1186-4058-bbff-2e9619a7b1e0 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/344ec1e0-1186-4058-bbff-2e9619a7b1e0/FgaI1Sc
This commit is contained in:
parent
17186275f6
commit
a5962fd556
BIN
attached_assets/image_1756595004913.png
Normal file
BIN
attached_assets/image_1756595004913.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 129 KiB |
@ -442,7 +442,9 @@ export default function VideoPage() {
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
|
||||
onLoad={(e) => {
|
||||
setTimeout(() => {
|
||||
if (e.currentTarget) {
|
||||
e.currentTarget.style.opacity = '1';
|
||||
}
|
||||
}, 500);
|
||||
handleVideoPlay();
|
||||
}}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user