Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
Correctly sets YouTube atom data attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
SHession committed Jun 3, 2021
1 parent 73cde00 commit f06bb55
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/YoutubeAtom.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ type Props = {
origin?: string;
eventEmitters: ((event: VideoEventKey) => void)[];
pillar: Theme;
atomId?: string;
};
declare global {
interface Window {
Expand Down Expand Up @@ -181,6 +182,7 @@ export const YoutubeAtom = ({
origin,
eventEmitters,
pillar,
atomId,
}: Props): JSX.Element => {
const embedConfig =
adTargeting && JSON.stringify(buildEmbedConfig(adTargeting));
Expand Down Expand Up @@ -294,8 +296,8 @@ export const YoutubeAtom = ({
allow="autoplay"
tabIndex={overrideImage || posterImage ? -1 : 0}
allowFullScreen
data-atom-id={`youtube-video-${assetId}`}
data-atom-type="youtube"
data-atom-id={atomId}
data-atom-type="media"
/>

{(overrideImage || posterImage) && (
Expand Down

0 comments on commit f06bb55

Please sign in to comment.