MCPcopy Create free account
hub / github.com/Moebytes/Frame-Player / seek

Function seek

components/VideoPlayer.tsx:1044–1054  ·  view source on GitHub ↗
(position: number)

Source from the content-addressed store, hash-verified

1042 }
1043
1044 const seek = (position: number) => {
1045 const duration = getDuration()
1046 let progress = reverse ? (duration / 100) * (100 - position) :
1047 (duration / 100) * position
1048
1049 if (videoData && videoRef.current) progress = duration - progress
1050 if (videoRef.current) videoRef.current.currentTime = progress
1051 setProgress(progress)
1052 setDragging(false)
1053 setSeekTo(progress)
1054 }
1055
1056 const updateVolume = (value: number) => {
1057 if (value < 0) value = 0

Callers 1

VideoPlayerFunction · 0.85

Calls 1

getDurationFunction · 0.85

Tested by

no test coverage detected