This repository was archived by the owner on Jan 15, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/common/components/video-upload-threespeak Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ export const VideoUpload = (props: Props & React.HTMLAttributes<HTMLDivElement>)
46
46
const [ videoUrl , setVideoUrl ] = useState ( "" ) ;
47
47
const [ thumbUrl , setThumbUrl ] = useState ( "" ) ;
48
48
const [ duration , setDuration ] = useState ( "" ) ;
49
+ const [ durationForApiCall , setDurationForApiCall ] = useState ( 0 ) ;
49
50
const [ showRecorder , setShowRecorder ] = useState ( false ) ;
50
51
51
52
const canUpload = videoUrl ;
@@ -68,6 +69,7 @@ export const VideoUpload = (props: Props & React.HTMLAttributes<HTMLDivElement>)
68
69
setVideoPercentage ( 0 ) ;
69
70
setThumbnailPercentage ( 0 ) ;
70
71
setShowRecorder ( false ) ;
72
+ setDurationForApiCall ( 0 ) ;
71
73
}
72
74
} , [ props . show ] ) ;
73
75
@@ -78,6 +80,7 @@ export const VideoUpload = (props: Props & React.HTMLAttributes<HTMLDivElement>)
78
80
const seconds = Math . floor ( duration % 60 ) ;
79
81
const videoDuration = `${ minutes } :${ seconds } ` ;
80
82
setDuration ( videoDuration ) ;
83
+ setDurationForApiCall ( duration ) ;
81
84
}
82
85
} ;
83
86
@@ -205,7 +208,7 @@ export const VideoUpload = (props: Props & React.HTMLAttributes<HTMLDivElement>)
205
208
videoUrl,
206
209
thumbUrl,
207
210
activeUser : activeUser ! . username ,
208
- duration
211
+ duration : durationForApiCall ,
209
212
} ) ;
210
213
props . setShow ( false ) ;
211
214
setStep ( "upload" ) ;
You can’t perform that action at this time.
0 commit comments