Skip to content

Commit d7aff72

Browse files
authored
Merge pull request #10 from wisechimp/image-alt-text
Adding an alt text prop for accessibility purposes.
2 parents a8ea5ef + a7325b9 commit d7aff72

8 files changed

+23
-12
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ import { LiteYoutubeEmbed } from 'react-lite-yt-embed';
7575
| isMobile | false | false | `boolean` | Use in mobile device or not. |
7676
| mobileResolution | false | 'hqdefault' | 'hqdefault' \| 'sddefault' \| 'maxresdefault' | You can specify the resolution of the thumbnail image on the phone (default is hqdefault, which is a lower resolution). |
7777
| desktopResolution | false | 'maxresdefault' | 'hqdefault' \| 'sddefault' \| 'maxresdefault' | You can specify the resolution of the thumbnail image on the desktop (default is maxresdefault, which is the highest resolution). |
78-
| lazyImage | false | false | `boolean` | If true, set the img loading attribute to 'lazy', default is undefined. |
78+
| lazyImage | false | false | `boolean` | If true, set the img loading attribute to 'lazy', default is undefined. |
79+
| imageAltText | false | "YouTube's thumbnail for this video." | `string` | You can specify an alternative text description for the thumbnail image for accessibility purposes. |
7980

8081
## Run on local development environment
8182
- Clone the repo

dist/LiteYoutubeEmbed.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ interface ILiteYouTubeEmbedProps {
1212
mobileResolution?: ResolutionType;
1313
desktopResolution?: ResolutionType;
1414
lazyImage?: boolean;
15+
imageAltText?: string;
1516
}
16-
declare const LiteYoutubeEmbed: ({ id, params, defaultPlay, adLinksPreconnect, isPlaylist, noCookie, mute, isMobile, mobileResolution, desktopResolution, lazyImage, }: ILiteYouTubeEmbedProps) => React.ReactElement;
17+
declare const LiteYoutubeEmbed: ({ id, params, defaultPlay, adLinksPreconnect, isPlaylist, noCookie, mute, isMobile, mobileResolution, desktopResolution, lazyImage, imageAltText, }: ILiteYouTubeEmbedProps) => React.ReactElement;
1718
export default LiteYoutubeEmbed;

dist/react-lite-yt-embed.cjs.development.js

Lines changed: 6 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/react-lite-yt-embed.cjs.development.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)