We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e74bd40 commit 00f5fe7Copy full SHA for 00f5fe7
dotcom-rendering/src/components/LoopVideo.importable.tsx
@@ -117,15 +117,15 @@ export const LoopVideo = ({
117
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- In earlier versions of the HTML specification, play() didn't return a value
118
if (startPlayPromise !== undefined) {
119
await startPlayPromise
120
+ .then(() => {
121
+ // Autoplay succeeded
122
+ setPlayerState('PLAYING');
123
+ })
124
.catch((error: Error) => {
125
// Autoplay failed
126
logAndReportError(src, error);
127
setPosterImage(image);
- setShowPlayIcon(true);
- })
- .then(() => {
- // Autoplay succeeded
128
- setPlayerState('PLAYING');
+ setPlayerState('PAUSED_BY_BROWSER');
129
});
130
}
131
}, [src, image]);
0 commit comments