From b4017dc5486af868de189c1284a7ea72014257dd Mon Sep 17 00:00:00 2001 From: Siobhan Bamber Date: Wed, 13 Mar 2024 21:21:41 +0000 Subject: [PATCH] [RNMobile] Prevent `react-native-video` crash that happens when an `src` changes quickly after first being set (#59841) Unlinked contributors: crazytonyli. Co-authored-by: SiobhyB Co-authored-by: jhnstn Co-authored-by: staskus --- packages/block-library/src/video/edit.native.js | 2 ++ packages/react-native-editor/CHANGELOG.md | 1 + 2 files changed, 3 insertions(+) diff --git a/packages/block-library/src/video/edit.native.js b/packages/block-library/src/video/edit.native.js index ffa6c80d60569c..f6960f0888617d 100644 --- a/packages/block-library/src/video/edit.native.js +++ b/packages/block-library/src/video/edit.native.js @@ -290,8 +290,10 @@ class VideoEdit extends Component { } ) => { const showVideo = isURL( src ) && + getProtocol( attributes.src ) !== 'file:' && ! isUploadInProgress && ! isUploadFailed; + const icon = this.getIcon( isUploadFailed ? ICON_TYPE.RETRY diff --git a/packages/react-native-editor/CHANGELOG.md b/packages/react-native-editor/CHANGELOG.md index a7980626ac3946..70c636da4dccbd 100644 --- a/packages/react-native-editor/CHANGELOG.md +++ b/packages/react-native-editor/CHANGELOG.md @@ -14,6 +14,7 @@ For each user feature we should also add a importance categorization label to i - [*] Gallery block items with in-progress, paused, or failed media uploads correctly display an highlight outline when selected [#59423] - [**] [internal] Upgrade React Native to version 0.73.3 [#58475] - [**] Add error boundary components and exception logging [#59221] +- [**] Fix crash occurring when the URL associated with a Video block is changed too quickly [#59841] ## 1.114.1 - [**] Fix a crash produced when the content of a synced pattern is updated [#59632]