When the user pins their own video, the client detaches the video of both the user and the currently pinned participant (if any) from two containers: PIN_VIDEO_PLAYER_CONTAINER and PARTICIPANT_VIDEO_PLAYER_CONTAINER. The detached video elements are completely removed from the DOM.
The client then calls attachVideo(userId) to create a new video element for that user. We set the necessary attributes and styles (style.width and style.height to 100%) before appending this new video element to the pin container.
hi @vic.yang
In renderVideo, we use attachVideo to attach the video to the video-player-container element. When pinning, we call detachVideo followed by attachVideo to reattach it, but the video remains black until the browser is resized.