Skip to content

Instantly share code, notes, and snippets.

@3200pro
Created December 4, 2022 20:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 3200pro/c878d386faef6477bf407fab7f947010 to your computer and use it in GitHub Desktop.
Save 3200pro/c878d386faef6477bf407fab7f947010 to your computer and use it in GitHub Desktop.
Solution: Aspect Correct, Mobile responsive React video setup (Using React Player)
<div className="mt-30 w-screen max-w-full">
<VideoModule videoURL={url} />
</div>
<div className="relative aspect-video w-full overflow-hidden">
<ReactPlayer
className="absolute left-0 top-0 aspect-video w-full "
url={videoURL}
width="100%"
height="100%"
/>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment