Skip to content

Commit e2b5fc7

Browse files
authored
Merge pull request #14943 from guardian/doml/add-video-style-stories
Add missing argument to video stories
2 parents b45381b + ad4c1fa commit e2b5fc7

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

dotcom-rendering/src/components/SelfHostedVideo.stories.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ const meta = {
2020
export default meta;
2121
type Story = StoryObj<typeof SelfHostedVideo>;
2222

23-
export const Loop4to5: Story = {
24-
name: 'Looping video in 4:5 aspect ratio',
23+
export const Loop5to4: Story = {
24+
name: 'Looping video in 5:4 aspect ratio',
2525
args: {
2626
sources: [
2727
{
@@ -31,6 +31,7 @@ export const Loop4to5: Story = {
3131
],
3232
uniqueId: 'test-video-1',
3333
atomId: 'test-atom-1',
34+
videoStyle: 'Loop',
3435
height: 720,
3536
width: 900,
3637
posterImage:
@@ -59,7 +60,7 @@ export const Loop4to5: Story = {
5960
export const Loop16to9: Story = {
6061
name: 'Looping video in 16:9 aspect ratio',
6162
args: {
62-
...Loop4to5.args,
63+
...Loop5to4.args,
6364
sources: [
6465
{
6566
src: 'https://uploads.guim.co.uk/2024/10/01/241001HeleneLoop_2.mp4',
@@ -73,13 +74,13 @@ export const Loop16to9: Story = {
7374

7475
export const WithCinemagraph: Story = {
7576
args: {
76-
...Loop4to5.args,
77+
...Loop5to4.args,
7778
videoStyle: 'Cinemagraph',
7879
},
7980
};
8081

8182
export const PausePlay: Story = {
82-
...Loop4to5,
83+
...Loop5to4,
8384
name: 'Pause and play interaction',
8485
play: async ({ canvasElement }) => {
8586
const canvas = within(canvasElement);
@@ -100,7 +101,7 @@ export const PausePlay: Story = {
100101
};
101102

102103
export const UnmuteMute: Story = {
103-
...Loop4to5,
104+
...Loop5to4,
104105
name: 'Unmute and mute interaction',
105106
parameters: {
106107
test: {
@@ -127,7 +128,7 @@ function sleep(ms: number) {
127128
}
128129

129130
export const InteractionObserver: Story = {
130-
...Loop4to5,
131+
...Loop5to4,
131132
name: 'Interaction observer',
132133
render: (args) => (
133134
<div data-testid="test-container">

dotcom-rendering/src/components/SelfHostedVideoPlayer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ type Props = {
101101
sources: Source[];
102102
atomId: string;
103103
uniqueId: string;
104-
width: number;
105104
height: number;
105+
width: number;
106106
videoStyle: VideoPlayerFormat;
107107
FallbackImageComponent: ReactElement;
108108
isPlayable: boolean;
@@ -143,8 +143,8 @@ export const SelfHostedVideoPlayer = forwardRef(
143143
sources,
144144
atomId,
145145
uniqueId,
146-
width,
147146
height,
147+
width,
148148
videoStyle,
149149
FallbackImageComponent,
150150
posterImage,

0 commit comments

Comments
 (0)