Skip to content

Conversation

kazablock
Copy link

  • Add controlsList='nodownload' attribute to all video/audio elements
  • Implement onContextMenu prevention to disable right-click context menu
  • Add CSS-based protection for user selection and drag prevention
  • Apply protections across lesson viewer, community posts, and video components
  • Ensure protection works even when JavaScript is disabled (partial)

This prevents users from easily downloading course videos through:

  • Browser's built-in video controls download button
  • Right-click context menu 'Save video as' option
  • Drag and drop video element downloading

Files modified:

  • apps/web/components/public/lesson-viewer/index.tsx
  • apps/web/components/community/index.tsx
  • packages/components-library/src/video-with-preview.tsx
  • apps/web/styles/globals.css

- Add controlsList='nodownload' attribute to all video/audio elements
- Implement onContextMenu prevention to disable right-click context menu
- Add CSS-based protection for user selection and drag prevention
- Apply protections across lesson viewer, community posts, and video components
- Ensure protection works even when JavaScript is disabled (partial)

This prevents users from easily downloading course videos through:
- Browser's built-in video controls download button
- Right-click context menu 'Save video as' option
- Drag and drop video element downloading

Files modified:
- apps/web/components/public/lesson-viewer/index.tsx
- apps/web/components/community/index.tsx
- packages/components-library/src/video-with-preview.tsx
- apps/web/styles/globals.css
Copy link

vercel bot commented Aug 26, 2025

Someone is attempting to deploy a commit to the CourseLit Team on Vercel.

A member of the Team first needs to authorize it.

@rajat1saxena
Copy link
Member

Thanks for the PR @kazablock. I will check this soon.

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