mirror of
https://github.com/mediacms-io/mediacms.git
synced 2026-02-09 00:43:02 -05:00
feat: add showRelated option to video player and embed UI
- Added 'showRelated' parameter to control related videos visibility at video end - Implemented UI toggle in MediaShareEmbed for the 'showRelated' option - Updated EndScreenHandler to honor the 'showRelated' setting - Modified EmbedPage and VideoJSEmbed to pass the parameter from URL to player
This commit is contained in:
@@ -59,9 +59,20 @@ export const EmbedPage: React.FC = () => {
|
||||
|
||||
{loadedVideo && (
|
||||
<SiteConsumer>
|
||||
{(site) => (
|
||||
<VideoViewer data={MediaPageStore.get('media-data')} siteUrl={site.url} containerStyles={containerStyles} />
|
||||
)}
|
||||
{(site) => {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const showTitle = urlParams.get('showTitle') !== '0';
|
||||
const showRelated = urlParams.get('showRelated') !== '0';
|
||||
return (
|
||||
<VideoViewer
|
||||
data={MediaPageStore.get('media-data')}
|
||||
siteUrl={site.url}
|
||||
containerStyles={containerStyles}
|
||||
showTitle={showTitle}
|
||||
showRelated={showRelated}
|
||||
/>
|
||||
);
|
||||
}}
|
||||
</SiteConsumer>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user