(position: number)
| 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 |
no test coverage detected