Skip to content

Commit

Permalink
add id attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
gregrickaby committed Feb 13, 2024
1 parent 667bf48 commit b38d7b7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions components/Media.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export default function Media(post: RedditPost) {
alt={post.title || 'reddit image'}
data-hint="image"
decoding="async"
id={post.id}
height={mediumImageAsset?.height}
loading="lazy"
src={mediumImageAsset?.url}
Expand All @@ -56,6 +57,7 @@ export default function Media(post: RedditPost) {
{...hlsDefaults}
dataHint="hosted:video"
height={post.media?.reddit_video?.height}
id={post.id}
src={post.video_preview?.hls_url}
width={post.media?.reddit_video?.width}
>
Expand All @@ -78,6 +80,7 @@ export default function Media(post: RedditPost) {
{...hlsDefaults}
dataHint="rich:video"
height={post.preview.reddit_video_preview.height}
id={post.id}
src={post.preview.reddit_video_preview.hls_url}
width={post.preview.reddit_video_preview.width}
>
Expand All @@ -92,6 +95,7 @@ export default function Media(post: RedditPost) {
<iframe
allow="fullscreen"
data-hint="rich:video-iframe"
id={post.id}
loading="lazy"
referrerPolicy="no-referrer"
sandbox="allow-scripts allow-same-origin allow-presentation"
Expand All @@ -117,6 +121,7 @@ export default function Media(post: RedditPost) {
<HlsPlayer
{...hlsDefaults}
dataHint="link:gifv"
id={post.id}
poster={mediumImageAsset?.url}
src={post.video_preview?.hls_url}
>
Expand All @@ -128,6 +133,7 @@ export default function Media(post: RedditPost) {
{...hlsDefaults}
dataHint="link"
height={post.video_preview?.height}
id={post.id}
poster={mediumImageAsset?.url}
src={post.video_preview?.hls_url}
width={post.video_preview?.width}
Expand Down

0 comments on commit b38d7b7

Please sign in to comment.