diff --git a/src/components/VideoPlayerContexts/VideoPopoverMenuContext.js b/src/components/VideoPlayerContexts/VideoPopoverMenuContext.js index 9c19ef8ed212..801c1b2f44ca 100644 --- a/src/components/VideoPlayerContexts/VideoPopoverMenuContext.js +++ b/src/components/VideoPlayerContexts/VideoPopoverMenuContext.js @@ -33,22 +33,7 @@ function VideoPopoverMenuContextProvider({children}) { }, [currentVideoPlayerRef]); const menuItems = useMemo(() => { - const items = [ - { - icon: Expensicons.Meter, - text: translate('videoPlayer.playbackSpeed'), - subMenuItems: [ - ..._.map(CONST.VIDEO_PLAYER.PLAYBACK_SPEEDS, (speed) => ({ - icon: currentPlaybackSpeed === speed ? Expensicons.Checkmark : null, - text: speed.toString(), - onSelected: () => { - updatePlaybackSpeed(speed); - }, - shouldPutLeftPaddingWhenNoIcon: true, - })), - ], - }, - ]; + const items = []; if (!isOffline) { items.push({ @@ -60,6 +45,21 @@ function VideoPopoverMenuContextProvider({children}) { }); } + items.push({ + icon: Expensicons.Meter, + text: translate('videoPlayer.playbackSpeed'), + subMenuItems: [ + ..._.map(CONST.VIDEO_PLAYER.PLAYBACK_SPEEDS, (speed) => ({ + icon: currentPlaybackSpeed === speed ? Expensicons.Checkmark : null, + text: speed.toString(), + onSelected: () => { + updatePlaybackSpeed(speed); + }, + shouldPutLeftPaddingWhenNoIcon: true, + })), + ], + }); + return items; }, [currentPlaybackSpeed, downloadAttachment, translate, updatePlaybackSpeed, isOffline]);