alpha
Login
or
Join now
flo-bit.dev
/
youtube-party-dj
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
[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
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
Update VideoPlayer.tsx
author
moritzbarv
committer
GitHub
date
2 years ago
(Jun 2, 2024, 2:01 PM +0200)
commit
10f85a98
10f85a9827f72c078f4863f0a94fc290f0291174
parent
5265739c
5265739cdc88ee5aae0e6e8a26291c2f57e2a849
+16
-18
1 changed file
Expand all
Collapse all
Unified
Split
common
components
VideoPlayer.tsx
+16
-18
common/components/VideoPlayer.tsx
View file
Reviewed
···
1
1
-
export default function VideoPlayer() {
2
2
-
3
3
-
return (<div class="relative aspect-video bg-white/5 border border-white/10 w-full overflow-hidden object-cover rounded-xl">
4
4
-
5
5
-
<div class="w-full h-full flex items-center justify-center text-white"> CURRENT YOUTUBE VIDEO </div>
6
6
-
7
7
-
</div>);
8
8
-
9
9
-
}
1
1
+
export default function VideoPlayer({ videoList }) {
10
2
11
11
-
/*
12
12
-
let player;
13
13
-
let videoList = [];
3
3
+
let player;
14
4
15
5
function play(videoId) {
16
6
if (player) {
···
36
26
}
37
27
}
38
28
39
39
-
var tag = document.createElement('script');
40
40
-
tag.src = "https://www.youtube.com/iframe_api";
41
41
-
var firstScriptTag = document.getElementsByTagName('script')[0];
42
42
-
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
43
43
-
44
29
function onYouTubeIframeAPIReady() {
45
30
if (videoList.length > 0) {
46
31
play(videoList[0].videoId);
47
32
}
48
33
}
34
34
+
35
35
+
var tag = document.createElement('script');
36
36
+
tag.src = "https://www.youtube.com/iframe_api";
37
37
+
var firstScriptTag = document.getElementsByTagName('script')[0];
38
38
+
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
49
39
50
50
-
*/
40
40
+
41
41
+
return (<div class="relative aspect-video bg-white/5 border border-white/10 w-full overflow-hidden object-cover rounded-xl">
42
42
+
43
43
+
<div id="player" class="w-full h-full flex items-center justify-center text-white"> CURRENT YOUTUBE VIDEO </div>
44
44
+
45
45
+
</div>);
46
46
+
47
47
+
}
48
48
+