Open valid-void opened 2 years ago
simply copy the a youtube video url and paste it here:
the code above also defines to auto-start, loop and mute the video
In order to hide youtube-player-information (e.g. youtube logo & video title) the app performs a little zoom-in. With this method we can also manage to dissolve black bars that might appear if the video format does not match the display format. downside: borders of video are cut off
responsible css: https://github.com/egozen-garage/radioalhara.com/blob/f2d139cf9b3e9ad486fe2fa89eb03fe4d4e6262d/src/components/background/videoBackground.css#L42-L45
vimeo does not response the same way like youtube videos. the css still needs to be extended, to add vimeo videos
npm install react-player
"A React component for playing a variety of URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia, Mixcloud, DailyMotion and Kaltura."
https://www.npmjs.com/package/react-player