Skip to content

Commit

Permalink
Remove unused sectionProps prop from inline video and audio
Browse files Browse the repository at this point in the history
Used to be needed to change player controls color for inverted
section. Has long been removed.
  • Loading branch information
tf committed Oct 19, 2023
1 parent a7a352e commit 0f2aa93
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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});

Expand Down Expand Up @@ -68,7 +68,6 @@ export function InlineAudio({contentElementId, sectionProps, configuration}) {
playerActions={playerActions}
standAlone={!posterImageFile}
configuration={configuration}
sectionProps={sectionProps}
onPlayerClick={onPlayerClick}>
<PlayerEventContextDataProvider playerDescription="Inline Audio"
playbackMode={configuration.autoplay ? 'autoplay' : 'manual'}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -46,7 +46,6 @@ export function InlineVideo({contentElementId, sectionProps, configuration}) {
landscapePosterImageFile={posterImageFile}
portraitPosterImageFile={portraitPosterImageFile}
contentElementId={contentElementId}
sectionProps={sectionProps}
configuration={configuration} />
);
}
Expand All @@ -55,7 +54,6 @@ export function InlineVideo({contentElementId, sectionProps, configuration}) {
<OrientationUnawareInlineVideo videoFile={videoFile}
posterImageFile={posterImageFile}
contentElementId={contentElementId}
sectionProps={sectionProps}
configuration={configuration} />
)
}
Expand All @@ -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 ?
Expand All @@ -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();

Expand All @@ -106,7 +103,6 @@ function OrientationUnawareInlineVideo({
playerState={playerState}
playerActions={playerActions}
contentElementId={contentElementId}
sectionProps={sectionProps}
configuration={configuration} />
</FitViewport.Content>
</ContentElementFigure>
Expand All @@ -119,7 +115,7 @@ function OrientationUnawareInlineVideo({
function Player({
videoFile, posterImageFile,
playerState, playerActions,
contentElementId, sectionProps, configuration
contentElementId, configuration
}) {
const {isEditable, isSelected} = useContentElementEditorState();

Expand Down Expand Up @@ -174,7 +170,6 @@ function Player({
configuration.playbackMode === 'loop'}
hideBigPlayButton={configuration.playbackMode === 'loop'}
configuration={configuration}
sectionProps={sectionProps}
onPlayerClick={onPlayerClick}>
<PlayerEventContextDataProvider playerDescription="Inline Video"
playbackMode={configuration.playbackMode ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ export function MediaPlayerControls(props) {
};

MediaPlayerControls.defaultProps = {
configuration: {},
sectionProps: {}
configuration: {}
}

function getTextTracksMenuItems(textTracks, t) {
Expand Down

0 comments on commit 0f2aa93

Please sign in to comment.