Upgrade Storybook

Co-authored-by: Scott Nonnenberg <scott@signal.org>
This commit is contained in:
Jamie Kyle 2023-10-11 12:06:43 -07:00 committed by GitHub
parent 8c966dfbd8
commit 502ea174ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
328 changed files with 10863 additions and 12432 deletions

View file

@ -21,6 +21,8 @@ import {
} from '../types/Attachment';
import { getClassNamesFor } from '../util/getClassNamesFor';
import { isVideoTypeSupported } from '../util/GoogleChrome';
import * as log from '../logging/log';
import * as Errors from '../types/errors';
export type PropsType = {
readonly attachment?: AttachmentType;
@ -75,7 +77,12 @@ export function StoryImage({
videoRef.current.pause();
} else {
onMediaPlaybackStart();
void videoRef.current.play();
void videoRef.current.play().catch(error => {
log.error(
'StoryImage: Failed to play video',
Errors.toLogFormat(error)
);
});
}
}, [isPaused, onMediaPlaybackStart]);