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:
sebastjanartic 2025-08-30 23:03:44 +00:00
parent 17186275f6
commit a5962fd556
2 changed files with 3 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

View File

@ -442,7 +442,9 @@ export default function VideoPage() {
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
onLoad={(e) => {
setTimeout(() => {
e.currentTarget.style.opacity = '1';
if (e.currentTarget) {
e.currentTarget.style.opacity = '1';
}
}, 500);
handleVideoPlay();
}}