Adjust video player behavior for improved user interaction

Remove unnecessary mouse event listeners from the iframe element in BunnyVideoModal, simplifying component logic.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 2eb1084e-b728-4449-9231-f1665924c8d5
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/2eb1084e-b728-4449-9231-f1665924c8d5/37EabIR
This commit is contained in:
sebastjanartic 2025-08-28 21:22:03 +00:00
parent 9bd61f667d
commit 25e260da9a

View File

@ -258,40 +258,7 @@ export default function BunnyVideoModal({ video, isOpen, onClose, onEdit, videos
<div className="flex-1 flex flex-col lg:flex-row gap-4 min-h-0">
{/* Main video player */}
<div className="flex-1">
<div
className="relative w-full aspect-video bg-black rounded-lg overflow-hidden"
onMouseMove={() => {
const iframe = document.querySelector('iframe');
if (iframe && iframe.contentWindow) {
// Trigger mouse events to keep controls visible longer
try {
iframe.contentWindow.postMessage(JSON.stringify({ method: "mousemove" }), '*');
} catch (e) {
// Ignore errors
}
}
}}
onMouseEnter={() => {
const iframe = document.querySelector('iframe');
if (iframe && iframe.contentWindow) {
try {
iframe.contentWindow.postMessage(JSON.stringify({ method: "mouseenter" }), '*');
} catch (e) {
// Ignore errors
}
}
}}
onClick={() => {
const iframe = document.querySelector('iframe');
if (iframe && iframe.contentWindow) {
try {
iframe.contentWindow.postMessage(JSON.stringify({ method: "click" }), '*');
} catch (e) {
// Ignore errors
}
}
}}
>
<div className="relative w-full aspect-video bg-black rounded-lg overflow-hidden">
{video.videoUrlIframe ? (
<iframe
src={video.videoUrlIframe}