diff --git a/src/components/VideoPlayer/BaseVideoPlayer.js b/src/components/VideoPlayer/BaseVideoPlayer.js index 321c765b192d..86ade325dec0 100644 --- a/src/components/VideoPlayer/BaseVideoPlayer.js +++ b/src/components/VideoPlayer/BaseVideoPlayer.js @@ -175,36 +175,36 @@ function BaseVideoPlayer({ {(isHovered) => ( - {shouldUseSharedVideoElement ? ( - <> - - {/* We are adding transparent absolute View between appended video component and control buttons to enable + { + togglePlayCurrentVideo(); + }} + style={styles.flex1} + > + {shouldUseSharedVideoElement ? ( + <> + + {/* We are adding transparent absolute View between appended video component and control buttons to enable catching onMouse events from Attachment Carousel. Due to late appending React doesn't handle element's events properly. */} - - - ) : ( - { - if (!el) { - return; - } - videoPlayerElementParentRef.current = el; - if (el.childNodes && el.childNodes[0]) { - videoPlayerElementRef.current = el.childNodes[0]; - } - }} - > - { - togglePlayCurrentVideo(); - }} + + + ) : ( + { + if (!el) { + return; + } + videoPlayerElementParentRef.current = el; + if (el.childNodes && el.childNodes[0]) { + videoPlayerElementRef.current = el.childNodes[0]; + } + }} > - - )} + + )} + {(isLoading || isBuffering) && }