()
| 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) { |
no test coverage detected