parent
58a459a1dc
commit
d3a109a0cc
6 changed files with 163 additions and 15 deletions
|
|
@ -684,6 +684,19 @@ function renderVideo(peerId, displayName, stream, source) {
|
|||
<video id="${videoId}" autoplay playsinline ${peerId === state.me.id ? "muted" : ""}></video>
|
||||
<div class="video-label">${label}</div>
|
||||
`;
|
||||
container.onclick = () => {
|
||||
const isFullscreen = container.classList.contains('fullscreen');
|
||||
// Reset all
|
||||
document.querySelectorAll('.video-item').forEach(el => el.classList.remove('fullscreen'));
|
||||
|
||||
if (isFullscreen) {
|
||||
el.videoGrid.classList.remove('has-fullscreen');
|
||||
} else {
|
||||
container.classList.add('fullscreen');
|
||||
el.videoGrid.classList.add('has-fullscreen');
|
||||
}
|
||||
};
|
||||
|
||||
el.videoGrid.appendChild(container);
|
||||
videoEl = container.querySelector("video");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue