UNPKG

@glomex/integration-react

Version:

React component to integrate the glomex player

9 lines (8 loc) 889 B
import { jsx as _jsx } from "react/jsx-runtime"; import { ScriptType } from '@glomex/integration-web-component'; /** * React component to define an external media item. */ export const ExternalMediaItemReact = (mediaItem) => { return (_jsx("glomex-external-media-item", { id: mediaItem.id, poster: mediaItem.poster, duration: mediaItem.duration, "channel-name": 'channelName' in mediaItem ? mediaItem.channelName : undefined, "channel-logo": 'channelLogo' in mediaItem ? mediaItem.channelLogo : undefined, title: mediaItem.title, "aspect-ratio": mediaItem.aspectRatio, "minimum-age": mediaItem.minimumAge, "release-date": mediaItem.releaseDate, "has-product-placement": 'hasProductPlacement' in mediaItem ? mediaItem.hasProductPlacement : undefined, children: mediaItem ? (_jsx("script", { type: ScriptType.EXTERNAL_MEDIA_ITEM, children: JSON.stringify(mediaItem) })) : null })); };