Skip to content

add double-click functionality for fullscreen toggle#4

Open
Quick-Genius wants to merge 1 commit intoshubho0908:mainfrom
Quick-Genius:main
Open

add double-click functionality for fullscreen toggle#4
Quick-Genius wants to merge 1 commit intoshubho0908:mainfrom
Quick-Genius:main

Conversation

@Quick-Genius
Copy link
Copy Markdown

No description provided.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
youtube-clone-mern ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 9, 2025 5:19pm

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 9, 2025

@Quick-Genius is attempting to deploy a commit to the Shubhojeet Bera's projects Team on Vercel.

A member of the Team first needs to authorize it.

@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 9, 2025

Deploy Preview for shubho-youtube-mern ready!

Name Link
🔨 Latest commit b1ebccc
🔍 Latest deploy log https://app.netlify.com/projects/shubho-youtube-mern/deploys/68471798e0f259000817617e
😎 Deploy Preview https://deploy-preview-4--shubho-youtube-mern.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@Quick-Genius
Copy link
Copy Markdown
Author

@CodiumAI-Agent /review

@QodoAI-Agent
Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 4 🔵🔵🔵🔵⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Fullscreen Toggle Conflict

The PR adds both a Plyr dblclick listener and a native onDoubleClick handler on the video element to toggle fullscreen, potentially causing duplicate or conflicting toggles. Ensure only one mechanism is used and that component state and UI remain in sync.

listeners: {
  dblclick: (e) => {
    if (!document.fullscreenElement) {
      player.fullscreen.enter();
    } else {
      player.fullscreen.exit();
    }
  },
},
API Inconsistency

The code mixes Plyr’s fullscreen API with the native Fullscreen API (requestFullscreen/exitFullscreen). Verify that both methods work together reliably across browsers and that exiting fullscreen updates state correctly.

const toggleFullscreen = () => {
  if (!document.fullscreenElement) {
    videoRef.current.requestFullscreen()
      .then(() => setIsFullscreen(true))
      .catch(err => console.log(err));
  } else {
    document.exitFullscreen()
      .then(() => setIsFullscreen(false))
      .catch(err => console.log(err));
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants