[call-me] - add toggleFullScreen
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "call-me",
|
"name": "call-me",
|
||||||
"version": "1.0.15",
|
"version": "1.0.16",
|
||||||
"description": "Your Go-To for Instant Video Calls",
|
"description": "Your Go-To for Instant Video Calls",
|
||||||
"author": "Miroslav Pejic - miroslav.pejic.85@gmail.com",
|
"author": "Miroslav Pejic - miroslav.pejic.85@gmail.com",
|
||||||
"license": "AGPLv3",
|
"license": "AGPLv3",
|
||||||
|
|||||||
@@ -158,6 +158,8 @@ signInBtn.addEventListener('click', handleSignInClick);
|
|||||||
callBtn.addEventListener('click', handleCallClick);
|
callBtn.addEventListener('click', handleCallClick);
|
||||||
hideBtn.addEventListener('click', toggleLocalVideo);
|
hideBtn.addEventListener('click', toggleLocalVideo);
|
||||||
hangUpBtn.addEventListener('click', handleHangUpClick);
|
hangUpBtn.addEventListener('click', handleHangUpClick);
|
||||||
|
localVideoContainer.addEventListener('click', toggleFullScreen);
|
||||||
|
remoteVideo.addEventListener('click', toggleFullScreen);
|
||||||
|
|
||||||
// Handle sign-in button click
|
// Handle sign-in button click
|
||||||
function handleSignInClick() {
|
function handleSignInClick() {
|
||||||
@@ -204,6 +206,12 @@ function handleHangUpClick() {
|
|||||||
handleLeave();
|
handleLeave();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Toggle video full screen mode
|
||||||
|
function toggleFullScreen(e) {
|
||||||
|
if (!e.target.srcObject) return;
|
||||||
|
document.fullscreenElement ? document.exitFullscreen() : e.target.requestFullscreen?.();
|
||||||
|
}
|
||||||
|
|
||||||
// Handle ping message from the server
|
// Handle ping message from the server
|
||||||
function handlePing(data) {
|
function handlePing(data) {
|
||||||
const { iceServers } = data;
|
const { iceServers } = data;
|
||||||
|
|||||||
@@ -80,10 +80,18 @@ video {
|
|||||||
border: none;
|
border: none;
|
||||||
border-radius: var(--border-radius);
|
border-radius: var(--border-radius);
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
video:hover {
|
||||||
|
filter: contrast(105%);
|
||||||
|
}
|
||||||
|
video::-webkit-media-controls {
|
||||||
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Local Video Styles */
|
/* Local Video Styles */
|
||||||
#localVideoContainer {
|
#localVideoContainer {
|
||||||
|
z-index: 1;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 10px;
|
top: 10px;
|
||||||
left: 20px;
|
left: 20px;
|
||||||
@@ -105,6 +113,7 @@ video {
|
|||||||
|
|
||||||
/* Remote Video Styles */
|
/* Remote Video Styles */
|
||||||
#remoteVideo {
|
#remoteVideo {
|
||||||
|
z-index: 2;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
background: rgba(0, 0, 0, 0.5);
|
background: rgba(0, 0, 0, 0.5);
|
||||||
|
|||||||
Reference in New Issue
Block a user