[READ-ONLY] Mirror of https://github.com/flo-bit/youtube-party-dj. democratic youtube player, everyone can vote and add songs, uni project, made with uix
0

Configure Feed

Select the types of activity you want to include in your feed.

Update VideoPlayer.tsx

+16 -18
+16 -18
common/components/VideoPlayer.tsx
··· 1 - export default function VideoPlayer() { 2 - 3 - return (<div class="relative aspect-video bg-white/5 border border-white/10 w-full overflow-hidden object-cover rounded-xl"> 4 - 5 - <div class="w-full h-full flex items-center justify-center text-white"> CURRENT YOUTUBE VIDEO </div> 6 - 7 - </div>); 8 - 9 - } 1 + export default function VideoPlayer({ videoList }) { 10 2 11 - /* 12 - let player; 13 - let videoList = []; 3 + let player; 14 4 15 5 function play(videoId) { 16 6 if (player) { ··· 36 26 } 37 27 } 38 28 39 - var tag = document.createElement('script'); 40 - tag.src = "https://www.youtube.com/iframe_api"; 41 - var firstScriptTag = document.getElementsByTagName('script')[0]; 42 - firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); 43 - 44 29 function onYouTubeIframeAPIReady() { 45 30 if (videoList.length > 0) { 46 31 play(videoList[0].videoId); 47 32 } 48 33 } 34 + 35 + var tag = document.createElement('script'); 36 + tag.src = "https://www.youtube.com/iframe_api"; 37 + var firstScriptTag = document.getElementsByTagName('script')[0]; 38 + firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); 49 39 50 - */ 40 + 41 + return (<div class="relative aspect-video bg-white/5 border border-white/10 w-full overflow-hidden object-cover rounded-xl"> 42 + 43 + <div id="player" class="w-full h-full flex items-center justify-center text-white"> CURRENT YOUTUBE VIDEO </div> 44 + 45 + </div>); 46 + 47 + } 48 +