|
1 | 1 | import { ExampleLinkType } from '../types/exampleLinkType'; |
| 2 | +import { ExampleLinkName } from './ExampleLinkNames'; |
2 | 3 |
|
3 | 4 | /** |
4 | 5 | * Array of all the examples pages names and links on ESM import page. |
5 | 6 | */ |
6 | 7 | export const ESM_LINKS: ExampleLinkType[] = [ |
7 | | - { name: 'Adaptive Streaming', endpoint: 'adaptive-streaming' }, |
8 | | - { name: 'Analytics', endpoint: 'analytics' }, |
9 | | - { name: 'API and Events', endpoint: 'api' }, |
10 | | - { name: 'Audio Player', endpoint: 'audio' }, |
11 | | - { name: 'Autoplay on Scroll', endpoint: 'autoplay-on-scroll' }, |
12 | | - { name: 'Chapters', endpoint: 'chapters' }, |
13 | | - { name: 'Cloudinary Analytics', endpoint: 'cloudinary-analytics' }, |
14 | | - { name: 'Codecs and formats', endpoint: 'codec-formats' }, |
15 | | - { name: 'Colors API', endpoint: 'colors' }, |
16 | | - { name: 'Components', endpoint: 'components' }, |
17 | | - { name: 'Custom Errors', endpoint: 'custom-cld-errors' }, |
18 | | - { name: 'Display Configurations', endpoint: 'ui-config' }, |
19 | | - { name: 'Debug', endpoint: 'debug' }, |
20 | | - { name: 'Floating Player', endpoint: 'floating-player' }, |
21 | | - { name: 'Fluid Layouts', endpoint: 'fluid' }, |
22 | | - { name: 'Force HLS Subtitles', endpoint: 'force-hls-subtitles' }, |
23 | | - { name: 'Highlights Graph', endpoint: 'highlights-graph' }, |
24 | | - { name: 'Interaction Area', endpoint: 'interaction-area' }, |
25 | | - { name: 'Multiple Players', endpoint: 'multiple-players' }, |
26 | | - { name: 'Playlist', endpoint: 'playlist' }, |
27 | | - { name: 'Playlist by Tag', endpoint: 'playlist-by-tag' }, |
28 | | - { name: 'Poster Options', endpoint: 'poster' }, |
29 | | - { name: 'Profiles', endpoint: 'profiles' }, |
30 | | - { name: 'Raw URL', endpoint: 'raw-url' }, |
31 | | - { name: 'Recommendations', endpoint: 'recommendations' }, |
32 | | - { name: 'Seek Thumbnails', endpoint: 'seek-thumbs' }, |
33 | | - { name: 'Shoppable Videos', endpoint: 'shoppable' }, |
34 | | - { name: 'Subtitles & Captions', endpoint: 'subtitles-and-captions' }, |
35 | | - { name: 'Video Transformations', endpoint: 'transformations' }, |
36 | | - { name: 'UI Config', endpoint: 'ui-config' }, |
37 | | - { name: 'VAST & VPAID Support', endpoint: 'vast-vpaid' }, |
38 | | - { name: 'VR/360 Videos', endpoint: '360' }, |
| 8 | + { name: ExampleLinkName.AdaptiveStreaming, endpoint: 'adaptive-streaming' }, |
| 9 | + { name: ExampleLinkName.Analytics, endpoint: 'analytics' }, |
| 10 | + { name: ExampleLinkName.APIAndEvents, endpoint: 'api' }, |
| 11 | + { name: ExampleLinkName.AudioPlayer, endpoint: 'audio' }, |
| 12 | + { name: ExampleLinkName.AutoplayOnScroll, endpoint: 'autoplay-on-scroll' }, |
| 13 | + { name: ExampleLinkName.Chapters, endpoint: 'chapters' }, |
| 14 | + { name: ExampleLinkName.CloudinaryAnalytics, endpoint: 'cloudinary-analytics' }, |
| 15 | + { name: ExampleLinkName.CodecsAndFormats, endpoint: 'codec-formats' }, |
| 16 | + { name: ExampleLinkName.ColorsAPI, endpoint: 'colors' }, |
| 17 | + { name: ExampleLinkName.Components, endpoint: 'components' }, |
| 18 | + { name: ExampleLinkName.CustomErrors, endpoint: 'custom-cld-errors' }, |
| 19 | + { name: ExampleLinkName.DisplayConfigurations, endpoint: 'ui-config' }, |
| 20 | + { name: ExampleLinkName.ESMDebugMode, endpoint: 'debug' }, |
| 21 | + { name: ExampleLinkName.FloatingPlayer, endpoint: 'floating-player' }, |
| 22 | + { name: ExampleLinkName.FluidLayouts, endpoint: 'fluid' }, |
| 23 | + { name: ExampleLinkName.ForceHLSSubtitles, endpoint: 'force-hls-subtitles' }, |
| 24 | + { name: ExampleLinkName.HighlightsGraph, endpoint: 'highlights-graph' }, |
| 25 | + { name: ExampleLinkName.InteractionArea, endpoint: 'interaction-area' }, |
| 26 | + { name: ExampleLinkName.MultiplePlayers, endpoint: 'multiple-players' }, |
| 27 | + { name: ExampleLinkName.Playlist, endpoint: 'playlist' }, |
| 28 | + { name: ExampleLinkName.PlaylistByTag, endpoint: 'playlist-by-tag' }, |
| 29 | + { name: ExampleLinkName.PosterOptions, endpoint: 'poster' }, |
| 30 | + { name: ExampleLinkName.Profiles, endpoint: 'profiles' }, |
| 31 | + { name: ExampleLinkName.RawURL, endpoint: 'raw-url' }, |
| 32 | + { name: ExampleLinkName.Recommendations, endpoint: 'recommendations' }, |
| 33 | + { name: ExampleLinkName.SeekThumbnails, endpoint: 'seek-thumbs' }, |
| 34 | + { name: ExampleLinkName.ShoppableVideos, endpoint: 'shoppable' }, |
| 35 | + { name: ExampleLinkName.SubtitlesAndCaptions, endpoint: 'subtitles-and-captions' }, |
| 36 | + { name: ExampleLinkName.VideoTransformations, endpoint: 'transformations' }, |
| 37 | + { name: ExampleLinkName.UIConfig, endpoint: 'ui-config' }, |
| 38 | + { name: ExampleLinkName.VASTAndVPAIDSupport, endpoint: 'vast-vpaid' }, |
| 39 | + { name: ExampleLinkName.VR360Videos, endpoint: '360' }, |
39 | 40 | ]; |
| 41 | + |
| 42 | +/** |
| 43 | + * Retrieves an example link object from the `ESM_LINKS` array based on a given name. |
| 44 | + */ |
| 45 | +export function getEsmLinkByName(name: ExampleLinkName): ExampleLinkType { |
| 46 | + return ESM_LINKS.find((link) => link.name === name); |
| 47 | +} |
0 commit comments