Skip to content

Commit

Permalink
Embeded YouTube videos using iframes
Browse files Browse the repository at this point in the history
Updated src attribute to use YouTube embed link
Added attributes to iframe for video embedding
  • Loading branch information
zelihapala committed May 20, 2024
1 parent ec0fa8d commit d8fc586
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions client/src/VideoRecommendations.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,14 @@ const VideoList = () => {
{videos.map((videoData, i) => (
<div className="video" data-testid="video" key={i}>
<div>
{/* <a>{videoData.title}</a> */}
<a href={videoData.src}>{videoData.title}</a>
<iframe
title={videoData.title}
width="560"
height="315"
src={`https://www.youtube.com/embed/${videoData.src}`}
frameBorder="0"
allowFullScreen
></iframe>
</div>
</div>
))}
Expand Down

0 comments on commit d8fc586

Please sign in to comment.