Skip to content

Commit 02f5b80

Browse files
authored
Fix Youtube player (#1254)
1 parent e4e2059 commit 02f5b80

File tree

1 file changed

+14
-17
lines changed
  • django_project/minisass_frontend/src/components/YoutubeEmbedded

1 file changed

+14
-17
lines changed

django_project/minisass_frontend/src/components/YoutubeEmbedded/index.tsx

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,22 @@ interface YouTubeVideoProps {
77
playButtonColor?: 'red' | 'green' | 'transparent'; // Custom play button color
88
}
99

10-
const YouTubeVideo: React.FC<YouTubeVideoProps> = ({ videoId, height, width, playButtonColor }) => {
11-
const colorParam = playButtonColor ? `&color=${playButtonColor}` : '';
12-
const embedUrl = `https://www.youtube.com/embed/${videoId}?rel=0${colorParam}`;
10+
const YouTubeVideo: React.FC<YouTubeVideoProps> = ({ videoId, height, width }) => {
11+
const embedUrl = `https://www.youtube.com/embed/${videoId}?rel=0`;
12+
console.log(embedUrl);
1313

1414
return (
15-
<div className='video-responsive'>
16-
<iframe
17-
src={embedUrl}
18-
title="miniSASS"
19-
frameBorder="0"
20-
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
21-
allowFullScreen
22-
style={{
23-
borderRadius: '25px 0px 25px 25px'
24-
}}
25-
height={height}
26-
width={width}
27-
></iframe>
28-
</div>
15+
<div className='video-responsive'>
16+
<iframe
17+
width={width}
18+
height={height}
19+
src={embedUrl}
20+
title="miniSASS"
21+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
22+
referrerPolicy="strict-origin-when-cross-origin"
23+
style={{borderRadius: '25px 0px 25px 25px'}}
24+
allowFullScreen></iframe>
25+
</div>
2926
);
3027
};
3128

0 commit comments

Comments
 (0)