VIDEOJS – Reproduce differente content using a main player and a pip player from videojs

I am new to react. Basically what I am trying to do is to have a main player and then through a button, enable a pip window to play the minute I set. That is, the same video but it plays at different times at the same time. Or also to be able to reproduce in the pip player other content that does not have to do with the main video.

This is my current code,this is a component ive created. Is it possible to do what I am trying to do? or do I have to create a new player that simulates a pip?
The error is that I can not simulate the pip as a new player, besides when I want to run the component 2 times it dies, it is as if after the dispose I can not use it anymore.

import React, { useEffect, useRef, useState } from 'react';
import videojs, { type VideoJsPlayer } from 'video.js';
import 'video.js/dist/video-js.css';

export interface PipVideoJSProps {
    videoSrc: string;
    startTime: number;
    pipDuration: number;
    muted?: boolean;
    controls?: boolean;
}

const PipVideoJS: React.FC<PipVideoJSProps> = ({
    videoSrc,
    startTime,
    pipDuration,
    muted = true,
    controls = false
}) => {
    const videoRef = useRef<HTMLVideoElement>(null);
    const [isPIPOn, setIsPIPOn] = useState(false);

    useEffect(() => {
        let player: VideoJsPlayer | null = null;

        // Initialize Video.js player
        if (videoRef.current != null) {
            player = videojs(videoRef.current, {
                autoplay: true,
                controls,
                muted, // Override the "muted" option to ensure it's muted in PIP mode
                sources: [
                    {
                        src: videoSrc,
                        type: 'video/mp4'
                    }
                ]
            });

            // Set the start time of the video
            player.currentTime(startTime * 30);

            // Enter Picture-in-Picture when the player is ready and metadata is loaded
            player.ready(() => {
                if (player != null && document.pictureInPictureEnabled) {
                    // Get the video element from the Video.js player
                    const videoElement = player.tech().el() as HTMLVideoElement;

                    // Add the event listener for loadedmetadata to ensure the metadata is loaded
                    videoElement.addEventListener('loadedmetadata', () => {
                        // Add the event listener for entering Picture-in-Picture
                        videoElement.addEventListener('enterpictureinpicture', () => {
                            setIsPIPOn(true);
                        });
                        // Add the event listener for leaving Picture-in-Picture
                        videoElement.addEventListener('leavepictureinpicture', () => {
                            setIsPIPOn(false);
                        });

                        // Request Picture-in-Picture after metadata is loaded
                        videoElement.requestPictureInPicture();
                    });
                }
            });
        }

        // Dispose the player when the component unmounts
        return () => {
            if (player != null) {
                player.dispose();
            }
        };
    }, [videoSrc, startTime, muted, controls]);

    useEffect(() => {
        // Exit Picture-in-Picture after the specified duration
        
        const closePIPAfterDuration = () => {
            setTimeout(() => {
                if (document.pictureInPictureElement != null) {
                    document.exitPictureInPicture();
                    setIsPIPOn(false);
                }
            }, pipDuration * 1000);
        };

        closePIPAfterDuration();
    }, [pipDuration]);

    return (
        <div className="pip-container">
            <video ref={videoRef} className="video-js" />
            {isPIPOn ? (
                <p>Picture-in-Picture is ON</p>
            ) : (
                <p>Picture-in-Picture is OFF</p>
            )}
        </div>
    );
};

export default PipVideoJS;