()
| 43 | let skipLoad = false |
| 44 | |
| 45 | const VideoPlayer: React.FunctionComponent = () => { |
| 46 | const {originalSrc, forwardSrc, reverseSrc, subtitleSrc, reverse, speed, preservesPitch, |
| 47 | duration, prevVolume, volume, paused, subtitles, loop, abloop, loopStart, |
| 48 | loopEnd, savedLoop, progress, secondsProgress, seekTo, abDragging, originalStyle, |
| 49 | dragging, dragProgress, stepFlag, subtitleColor, outlineThickness, outlineColor, |
| 50 | subtitleSize, animation |
| 51 | } = usePlaybackSelector() |
| 52 | const {setOriginalSrc, setForwardSrc, setReverseSrc, setSubtitleSrc, setReverse, setSpeed, setPreservesPitch, |
| 53 | setDuration, setPrevVolume, setVolume, setPaused, setSubtitles, setLoop, setABLoop, setLoopStart, |
| 54 | setLoopEnd, setSavedLoop, setProgress, setSecondsProgress, setSeekTo, setDragging, setDragProgress, |
| 55 | setABDragging, setStepFlag, setSubtitleColor, setOutlineThickness, setOutlineColor, setSubtitleSize, |
| 56 | setAnimation, setOriginalStyle |
| 57 | } = usePlaybackActions() |
| 58 | const {brightness, contrast, hue, saturation, lightness, blur, sharpen, pixelate} = useFilterSelector() |
| 59 | const {videoDrag} = useActiveSelector() |
| 60 | const [showSpeedPopup, setShowSpeedPopup] = useState(false) |
| 61 | const [showSubtitlePopup, setShowSubtitlePopup] = useState(false) |
| 62 | const [showAudioPopup, setShowAudioPopup] = useState(false) |
| 63 | const [showChapterPopup, setShowChapterPopup] = useState(false) |
| 64 | const [hover, setHover] = useState(false) |
| 65 | const [hoverBar, setHoverBar] = useState(false) |
| 66 | const [backFrame, setBackFrame] = useState("") |
| 67 | const [videoLoaded, setVideoLoaded] = useState(false) |
| 68 | const [animationLoaded, setAnimationLoaded] = useState(false) |
| 69 | const [videoData, setVideoData] = useState(null as BitmapFrame[] | null) |
| 70 | const [animationData, setAnimationData] = useState(null as AnimationFrame[] | null) |
| 71 | const [subtitlesLoaded, setSubtitlesLoaded] = useState(false) |
| 72 | const [subtitleText, setSubtitleText] = useState("") |
| 73 | const [processing, setProcessing] = useState(false) |
| 74 | const [videoTracks, setVideoTracks] = useState([] as VideoTrack[]) |
| 75 | const [audioTracks, setAudioTracks] = useState([] as VideoTrack[]) |
| 76 | const [subtitleTracks, setSubtitleTracks] = useState([] as VideoTrack[]) |
| 77 | const [chapters, setChapters] = useState([] as VideoChapter[]) |
| 78 | const [currentVideoTrack, setCurrentVideoTrack] = useState(null as VideoTrack | null) |
| 79 | const [currentAudioTrack, setCurrentAudioTrack] = useState(null as VideoTrack | null) |
| 80 | const [currentSubtitleTrack, setCurrentSubtitleTrack] = useState(null as VideoTrack | null) |
| 81 | const [currentChapter, setCurrentChapter] = useState(null as VideoChapter | null) |
| 82 | const [zoomScale, setZoomScale] = useState(1) |
| 83 | const [draggingVideo, setDraggingVideo] = useState(false) |
| 84 | |
| 85 | const playerRef = useRef<HTMLDivElement>(null) |
| 86 | const videoRef = useRef<HTMLVideoElement>(null) |
| 87 | const animationRef = useRef<HTMLImageElement>(null) |
| 88 | const trackRef = useRef<HTMLTrackElement>(null) |
| 89 | const speedPopup = useRef<HTMLDivElement>(null) |
| 90 | const speedIcon = useRef<HTMLDivElement>(null) |
| 91 | const subtitlePopup = useRef<HTMLDivElement>(null) |
| 92 | const subtitleIcon = useRef<HTMLDivElement>(null) |
| 93 | const audioPopup = useRef<HTMLDivElement>(null) |
| 94 | const audioIcon = useRef<HTMLDivElement>(null) |
| 95 | const chapterPopup = useRef<HTMLDivElement>(null) |
| 96 | const chapterIcon = useRef<HTMLDivElement>(null) |
| 97 | const filterRef = useRef<HTMLDivElement>(null) |
| 98 | const lightnessRef = useRef<HTMLImageElement>(null) |
| 99 | const sharpnessRef = useRef<HTMLCanvasElement>(null) |
| 100 | const pixelateRef = useRef<HTMLCanvasElement>(null) |
| 101 | const assRef = useRef<any>(null) |
| 102 | const assContainerRef = useRef<HTMLDivElement>(null) |
nothing calls this directly
no test coverage detected