From 301723b6e46c7c63d16ef27986c95425a186cc8e Mon Sep 17 00:00:00 2001 From: Tim Fischbach Date: Thu, 19 Oct 2023 07:06:45 +0200 Subject: [PATCH] Remove unused sectionProps prop from inline video and audio Used to be needed to change player controls color for inverted section. Has long been removed. --- .../src/contentElements/inlineAudio/InlineAudio.js | 3 +-- .../src/contentElements/inlineVideo/InlineVideo.js | 13 ++++--------- .../package/src/frontend/MediaPlayerControls.js | 3 +-- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/entry_types/scrolled/package/src/contentElements/inlineAudio/InlineAudio.js b/entry_types/scrolled/package/src/contentElements/inlineAudio/InlineAudio.js index f1325d337a..58aa2f12eb 100644 --- a/entry_types/scrolled/package/src/contentElements/inlineAudio/InlineAudio.js +++ b/entry_types/scrolled/package/src/contentElements/inlineAudio/InlineAudio.js @@ -16,7 +16,7 @@ import { useAudioFocus } from 'pageflow-scrolled/frontend'; -export function InlineAudio({contentElementId, sectionProps, configuration}) { +export function InlineAudio({contentElementId, configuration}) { const audioFile = useFile({collectionName: 'audioFiles', permaId: configuration.id}); const posterImageFile = useFile({collectionName: 'imageFiles', permaId: configuration.posterId}); @@ -68,7 +68,6 @@ export function InlineAudio({contentElementId, sectionProps, configuration}) { playerActions={playerActions} standAlone={!posterImageFile} configuration={configuration} - sectionProps={sectionProps} onPlayerClick={onPlayerClick}> diff --git a/entry_types/scrolled/package/src/contentElements/inlineVideo/InlineVideo.js b/entry_types/scrolled/package/src/contentElements/inlineVideo/InlineVideo.js index 8db893d5f3..f4c17bebe0 100644 --- a/entry_types/scrolled/package/src/contentElements/inlineVideo/InlineVideo.js +++ b/entry_types/scrolled/package/src/contentElements/inlineVideo/InlineVideo.js @@ -24,7 +24,7 @@ import { getPlayerClickHandler } from './handlers'; -export function InlineVideo({contentElementId, sectionProps, configuration}) { +export function InlineVideo({contentElementId, configuration}) { const videoFile = useFile({collectionName: 'videoFiles', permaId: configuration.id}); const posterImageFile = useFile({collectionName: 'imageFiles', @@ -46,7 +46,6 @@ export function InlineVideo({contentElementId, sectionProps, configuration}) { landscapePosterImageFile={posterImageFile} portraitPosterImageFile={portraitPosterImageFile} contentElementId={contentElementId} - sectionProps={sectionProps} configuration={configuration} /> ); } @@ -55,7 +54,6 @@ export function InlineVideo({contentElementId, sectionProps, configuration}) { ) } @@ -64,7 +62,7 @@ export function InlineVideo({contentElementId, sectionProps, configuration}) { function OrientationAwareInlineVideo({ landscapeVideoFile, portraitVideoFile, landscapePosterImageFile, portraitPosterImageFile, - contentElementId, sectionProps, configuration + contentElementId, configuration }) { const portraitOrientation = usePortraitOrientation(); const videoFile = portraitOrientation && portraitVideoFile ? @@ -77,14 +75,13 @@ function OrientationAwareInlineVideo({ videoFile={videoFile} posterImageFile={posterImageFile} contentElementId={contentElementId} - sectionProps={sectionProps} configuration={configuration} /> ); } function OrientationUnawareInlineVideo({ videoFile, posterImageFile, - contentElementId, sectionProps, configuration + contentElementId, configuration }) { const [playerState, playerActions] = usePlayerState(); @@ -106,7 +103,6 @@ function OrientationUnawareInlineVideo({ playerState={playerState} playerActions={playerActions} contentElementId={contentElementId} - sectionProps={sectionProps} configuration={configuration} /> @@ -119,7 +115,7 @@ function OrientationUnawareInlineVideo({ function Player({ videoFile, posterImageFile, playerState, playerActions, - contentElementId, sectionProps, configuration + contentElementId, configuration }) { const {isEditable, isSelected} = useContentElementEditorState(); @@ -174,7 +170,6 @@ function Player({ configuration.playbackMode === 'loop'} hideBigPlayButton={configuration.playbackMode === 'loop'} configuration={configuration} - sectionProps={sectionProps} onPlayerClick={onPlayerClick}>