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

Function play

components/VideoPlayer.tsx:952–974  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

950 }, [videoLoaded])
951
952 const play = () => {
953 if (animation) {
954 if (animationData) {
955 const duration = getDuration()
956
957 if (progress >= duration) {
958 setProgress(0)
959 }
960 }
961 if (!paused) return setPaused(true)
962
963 lastTime = 0
964 acc = 0
965 return setPaused(false)
966 }
967 if (videoRef.current) {
968 if (videoRef.current.paused) {
969 videoRef.current.play()
970 } else {
971 videoRef.current.pause()
972 }
973 }
974 }
975
976 const updateReverse = useEffectEvent(async () => {
977 if (animation) {

Callers 3

keyDownFunction · 0.85
videoMouseUpFunction · 0.85
VideoPlayerFunction · 0.85

Calls 1

getDurationFunction · 0.85

Tested by

no test coverage detected