From ed6bf7f0d8cf6ba9552b6bbafdbbea8c9f20e0f6 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 8 Jul 2021 14:30:19 -0400 Subject: Add the libraries built in ui for trimming. Try to figure out its features - very broken and very poor code. For testing purposes. --- src/screens/profile/CaptionScreen.tsx | 44 +++++++++++++++++++++++++++++++---- 1 file changed, 39 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/screens/profile/CaptionScreen.tsx b/src/screens/profile/CaptionScreen.tsx index fac00f21..c6cf767f 100644 --- a/src/screens/profile/CaptionScreen.tsx +++ b/src/screens/profile/CaptionScreen.tsx @@ -43,6 +43,7 @@ import {RootState} from '../../store/rootReducer'; import {MomentTagType} from '../../types'; import {SCREEN_WIDTH, StatusBarHeight} from '../../utils'; import {mentionPartTypes} from '../../utils/comments'; +import {Trimmer, VideoPlayer} from 'react-native-video-processing'; /** * Upload Screen to allow users to upload posts to Tagg @@ -197,6 +198,11 @@ const CaptionScreen: React.FC = ({route, navigation}) => { } }; + const [currentTime, setCurrentTime] = useState(0); + const [startTime, setStartTime] = useState(0); + // todo: update with vid times + const [endTime, setEndTime] = useState(60); + return ( {loading ? : } @@ -223,11 +229,39 @@ const CaptionScreen: React.FC = ({route, navigation}) => { {...{title: moment ? moment.moment_category : title ?? ''}} /> {isMediaAVideo ? ( -