TReactPlay videoNode.pause 조건문 추가

This commit is contained in:
고동영
2024-10-22 16:02:28 +09:00
parent 320cb795a7
commit cc49ae2d43

View File

@@ -65,7 +65,6 @@ export default function TReactPlayer({
} else if ( } else if (
!Object.prototype.hasOwnProperty.call(videoNode, "proportionPlayed") !Object.prototype.hasOwnProperty.call(videoNode, "proportionPlayed")
) { ) {
videoNode.play = videoNode.playVideo; videoNode.play = videoNode.playVideo;
videoNode.pause = videoNode.pauseVideo; videoNode.pause = videoNode.pauseVideo;
videoNode.seek = videoNode.seekTo; videoNode.seek = videoNode.seekTo;
@@ -141,7 +140,7 @@ export default function TReactPlayer({
useEffect(() => { useEffect(() => {
return () => { return () => {
const videoNode = playerRef.current?.getInternalPlayer(); const videoNode = playerRef.current?.getInternalPlayer();
if (videoNode) { if (videoNode && videoNode.pause) {
videoNode.pause(); videoNode.pause();
videoNode.src = ""; videoNode.src = "";
videoNode.srcObject = null; videoNode.srcObject = null;