diff --git a/apps/mobile/package.json b/apps/mobile/package.json index b806063f..7eb65fff 100644 --- a/apps/mobile/package.json +++ b/apps/mobile/package.json @@ -75,6 +75,7 @@ "expo": "~51.0.28", "expo-application": "^5.9.1", "expo-auth-session": "^5.5.2", + "expo-av": "~14.0.7", "expo-camera": "^15.0.16", "expo-clipboard": "~6.0.3", "expo-constants": "^16.0.2", diff --git a/apps/mobile/src/app/Router.tsx b/apps/mobile/src/app/Router.tsx index 05801894..a04dbd26 100644 --- a/apps/mobile/src/app/Router.tsx +++ b/apps/mobile/src/app/Router.tsx @@ -15,6 +15,8 @@ import GroupChatGroupRequest from '../modules/Group/memberAction/ViewRequest'; import GroupChat from '../modules/Group/message/GroupMessage'; import AuthSidebar from '../modules/Layout/auth-sidebar'; import Sidebar from '../modules/Layout/sidebar'; +import RightSidebar from '../modules/Layout/RightSideBar'; +import ShortVideosModule from '../modules/ShortVideos'; // import RightSidebar from '../modules/Layout/RightSideBar'; // Components @@ -305,6 +307,8 @@ const MainNavigator: React.FC = () => { + + ); diff --git a/apps/mobile/src/components/NostrVideo/index.tsx b/apps/mobile/src/components/NostrVideo/index.tsx new file mode 100644 index 00000000..f2f5e813 --- /dev/null +++ b/apps/mobile/src/components/NostrVideo/index.tsx @@ -0,0 +1,80 @@ +import {NostrEvent} from '@nostr-dev-kit/ndk'; +import {ResizeMode, Video} from 'expo-av'; +import React, {useEffect, useState} from 'react'; +import {Pressable, TouchableOpacity, View} from 'react-native'; + +import {BookmarkIcon, LikeIcon, RepostIcon} from '../../assets/icons'; +import {useStyles} from '../../hooks'; +import stylesheet from './styles'; + +const NostrVideo = ({item, shouldPlay}: {shouldPlay: boolean; item: NostrEvent}) => { + const video = React.useRef