740 lines
28 KiB
PHP
740 lines
28 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="csrf-token" content="{{ csrf_token() }}">
|
|
<title>{{ $meeting->title }} | Live Client Call Room</title>
|
|
<!-- Google Fonts: Outfit & Inter -->
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@500;700;800&display=swap" rel="stylesheet">
|
|
|
|
<style>
|
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
body {
|
|
font-family: 'Inter', sans-serif;
|
|
background-color: #0b0f19;
|
|
color: #f3f4f6;
|
|
height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* Top Header */
|
|
.call-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 0.75rem 1.5rem;
|
|
background: rgba(17, 24, 39, 0.75);
|
|
backdrop-filter: blur(14px);
|
|
-webkit-backdrop-filter: blur(14px);
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
|
z-index: 20;
|
|
flex-wrap: wrap;
|
|
gap: 10px;
|
|
}
|
|
.header-left {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
flex-wrap: wrap;
|
|
}
|
|
.live-tag {
|
|
background: #ef4444;
|
|
color: white;
|
|
font-size: 0.65rem;
|
|
padding: 2px 8px;
|
|
border-radius: 999px;
|
|
font-weight: 700;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
animation: pulse-live 2s infinite;
|
|
}
|
|
@keyframes pulse-live {
|
|
0% { opacity: 1; }
|
|
50% { opacity: 0.4; }
|
|
100% { opacity: 1; }
|
|
}
|
|
.meeting-title {
|
|
font-family: 'Outfit', sans-serif;
|
|
font-size: 1.1rem;
|
|
font-weight: 700;
|
|
color: #f3f4f6;
|
|
}
|
|
.call-timer {
|
|
font-family: monospace;
|
|
font-size: 0.85rem;
|
|
color: #9ca3af;
|
|
background: rgba(255, 255, 255, 0.06);
|
|
padding: 3px 8px;
|
|
border-radius: 6px;
|
|
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
}
|
|
|
|
/* Live Recording Status Badge */
|
|
.rec-badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
background: rgba(239, 68, 68, 0.2);
|
|
border: 1px solid rgba(239, 68, 68, 0.5);
|
|
color: #f87171;
|
|
padding: 3px 10px;
|
|
border-radius: 999px;
|
|
font-size: 0.75rem;
|
|
font-weight: 700;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
.rec-dot {
|
|
width: 8px;
|
|
height: 8px;
|
|
background: #ef4444;
|
|
border-radius: 50%;
|
|
animation: pulse-rec 1s infinite alternate;
|
|
}
|
|
@keyframes pulse-rec {
|
|
0% { opacity: 0.3; transform: scale(0.85); }
|
|
100% { opacity: 1; transform: scale(1.2); }
|
|
}
|
|
|
|
/* Real-Time Live Emotion Indicator Badge */
|
|
.emotion-live-indicator {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
background: rgba(255, 255, 255, 0.05);
|
|
border: 1px solid rgba(255, 255, 255, 0.12);
|
|
padding: 4px 12px;
|
|
border-radius: 999px;
|
|
font-size: 0.8rem;
|
|
font-weight: 600;
|
|
transition: all 0.3s ease;
|
|
}
|
|
.emotion-badge-happy { background: rgba(16, 185, 129, 0.2); border-color: rgba(16, 185, 129, 0.4); color: #34d399; }
|
|
.emotion-badge-neutral { background: rgba(59, 130, 246, 0.2); border-color: rgba(59, 130, 246, 0.4); color: #60a5fa; }
|
|
.emotion-badge-sad { background: rgba(245, 158, 11, 0.2); border-color: rgba(245, 158, 11, 0.4); color: #fbbf24; }
|
|
.emotion-badge-angry { background: rgba(239, 68, 68, 0.25); border-color: rgba(239, 68, 68, 0.5); color: #f87171; animation: pulse-angry 1.5s infinite; }
|
|
|
|
@keyframes pulse-angry {
|
|
0% { transform: scale(1); }
|
|
50% { transform: scale(1.05); }
|
|
100% { transform: scale(1); }
|
|
}
|
|
|
|
/* Main Video Stage */
|
|
.call-body {
|
|
flex: 1;
|
|
display: flex;
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.video-grid-container {
|
|
flex: 1;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
padding: 1rem;
|
|
overflow-y: auto;
|
|
position: relative;
|
|
}
|
|
|
|
.video-grid {
|
|
display: grid;
|
|
gap: 1rem;
|
|
width: 100%;
|
|
height: 100%;
|
|
max-height: 100%;
|
|
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
|
|
justify-items: center;
|
|
align-items: center;
|
|
}
|
|
|
|
.video-tile {
|
|
position: relative;
|
|
background: #1e293b;
|
|
border-radius: 16px;
|
|
width: 100%;
|
|
height: 100%;
|
|
min-height: 220px;
|
|
max-height: 540px;
|
|
overflow: hidden;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
.video-element {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
border-radius: 16px;
|
|
}
|
|
|
|
.video-overlay {
|
|
position: absolute;
|
|
bottom: 12px;
|
|
left: 12px;
|
|
background: rgba(0, 0, 0, 0.65);
|
|
backdrop-filter: blur(6px);
|
|
padding: 4px 10px;
|
|
border-radius: 8px;
|
|
font-size: 0.8rem;
|
|
font-weight: 600;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
color: white;
|
|
z-index: 10;
|
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
}
|
|
|
|
.video-avatar-placeholder {
|
|
width: 80px;
|
|
height: 80px;
|
|
border-radius: 50%;
|
|
background: linear-gradient(135deg, #4f46e5, #06b6d4);
|
|
color: white;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 2rem;
|
|
font-weight: 800;
|
|
font-family: 'Outfit', sans-serif;
|
|
box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
|
|
}
|
|
|
|
/* Collapsible Side Panel (AI Notes & Chat) */
|
|
.side-panel {
|
|
width: 360px;
|
|
background: #111827;
|
|
border-left: 1px solid rgba(255, 255, 255, 0.1);
|
|
display: flex;
|
|
flex-direction: column;
|
|
transition: width 0.3s ease;
|
|
z-index: 30;
|
|
}
|
|
.side-panel.collapsed {
|
|
display: none;
|
|
}
|
|
|
|
.panel-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 1rem 1.25rem;
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
|
|
}
|
|
.panel-title {
|
|
font-family: 'Outfit', sans-serif;
|
|
font-size: 1rem;
|
|
font-weight: 700;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
.panel-close-btn {
|
|
background: transparent;
|
|
border: none;
|
|
color: #9ca3af;
|
|
cursor: pointer;
|
|
font-size: 1.2rem;
|
|
width: 28px;
|
|
height: 28px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: 6px;
|
|
}
|
|
.panel-close-btn:hover {
|
|
color: white;
|
|
background: rgba(255, 255, 255, 0.1);
|
|
}
|
|
|
|
.panel-tabs {
|
|
display: flex;
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
|
|
}
|
|
.panel-tab {
|
|
flex: 1;
|
|
padding: 0.6rem;
|
|
text-align: center;
|
|
background: transparent;
|
|
border: none;
|
|
color: #9ca3af;
|
|
font-size: 0.8rem;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
}
|
|
.panel-tab.active {
|
|
color: #818cf8;
|
|
border-bottom: 2px solid #6366f1;
|
|
background: rgba(99, 102, 241, 0.06);
|
|
}
|
|
|
|
.panel-body {
|
|
flex: 1;
|
|
padding: 1rem;
|
|
overflow-y: auto;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1rem;
|
|
}
|
|
|
|
/* Transcript & Notes */
|
|
.transcript-feed {
|
|
flex: 1;
|
|
background: rgba(255, 255, 255, 0.03);
|
|
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
border-radius: 10px;
|
|
padding: 10px;
|
|
overflow-y: auto;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
font-size: 0.8rem;
|
|
max-height: 240px;
|
|
}
|
|
.transcript-line {
|
|
line-height: 1.4;
|
|
}
|
|
.transcript-speaker {
|
|
font-weight: 700;
|
|
color: #818cf8;
|
|
margin-right: 4px;
|
|
}
|
|
.transcript-text {
|
|
color: #d1d5db;
|
|
}
|
|
|
|
.notes-textarea {
|
|
width: 100%;
|
|
height: 110px;
|
|
background: rgba(255, 255, 255, 0.04);
|
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
border-radius: 8px;
|
|
padding: 8px 10px;
|
|
color: #f3f4f6;
|
|
font-size: 0.8rem;
|
|
outline: none;
|
|
resize: none;
|
|
}
|
|
.notes-textarea:focus {
|
|
border-color: #6366f1;
|
|
}
|
|
|
|
/* Chat messages */
|
|
.chat-feed {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
max-height: 380px;
|
|
}
|
|
.chat-msg {
|
|
background: rgba(255, 255, 255, 0.05);
|
|
border-radius: 8px;
|
|
padding: 8px 10px;
|
|
font-size: 0.8rem;
|
|
}
|
|
.chat-sender {
|
|
font-weight: 700;
|
|
color: #38bdf8;
|
|
font-size: 0.75rem;
|
|
margin-bottom: 2px;
|
|
}
|
|
|
|
.chat-input-box {
|
|
display: flex;
|
|
gap: 6px;
|
|
margin-top: auto;
|
|
}
|
|
.chat-input {
|
|
flex: 1;
|
|
background: rgba(255, 255, 255, 0.04);
|
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
border-radius: 8px;
|
|
padding: 8px 10px;
|
|
color: #f3f4f6;
|
|
font-size: 0.8rem;
|
|
outline: none;
|
|
}
|
|
.chat-input:focus {
|
|
border-color: #6366f1;
|
|
}
|
|
|
|
/* Bottom Controls Bar */
|
|
.call-footer {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
padding: 0.85rem 1.5rem;
|
|
background: rgba(17, 24, 39, 0.88);
|
|
backdrop-filter: blur(14px);
|
|
-webkit-backdrop-filter: blur(14px);
|
|
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
|
gap: 12px;
|
|
z-index: 20;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.ctrl-btn {
|
|
width: 48px;
|
|
height: 48px;
|
|
border-radius: 50%;
|
|
background: rgba(255, 255, 255, 0.08);
|
|
border: 1px solid rgba(255, 255, 255, 0.15);
|
|
color: white;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
}
|
|
.ctrl-btn:hover {
|
|
background: rgba(255, 255, 255, 0.18);
|
|
transform: translateY(-2px);
|
|
}
|
|
.ctrl-btn.active-off {
|
|
background: #ef4444 !important;
|
|
border-color: #ef4444 !important;
|
|
color: white !important;
|
|
}
|
|
.ctrl-btn.active-on {
|
|
background: #4f46e5 !important;
|
|
border-color: #4f46e5 !important;
|
|
}
|
|
.ctrl-btn.active-rec {
|
|
background: rgba(239, 68, 68, 0.25) !important;
|
|
border-color: #ef4444 !important;
|
|
color: #f87171 !important;
|
|
animation: pulse-rec-btn 1.5s infinite;
|
|
}
|
|
@keyframes pulse-rec-btn {
|
|
0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
|
|
70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
|
|
100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
|
|
}
|
|
|
|
.btn-end-call {
|
|
padding: 0 1.25rem;
|
|
height: 48px;
|
|
border-radius: 24px;
|
|
background: #ef4444;
|
|
color: white;
|
|
border: none;
|
|
font-weight: 700;
|
|
font-size: 0.875rem;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
transition: all 0.2s ease;
|
|
box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
|
|
}
|
|
.btn-end-call:hover {
|
|
background: #dc2626;
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 6px 16px rgba(239, 68, 68, 0.6);
|
|
}
|
|
|
|
/* Toast & Modal */
|
|
.toast-notify {
|
|
position: fixed;
|
|
bottom: 85px;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
background: rgba(17, 24, 39, 0.95);
|
|
border: 1px solid #4f46e5;
|
|
padding: 10px 20px;
|
|
border-radius: 10px;
|
|
color: white;
|
|
font-size: 0.85rem;
|
|
display: none;
|
|
z-index: 100;
|
|
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
|
}
|
|
|
|
/* Modal Overlay */
|
|
.modal-overlay {
|
|
position: fixed;
|
|
top: 0; left: 0; right: 0; bottom: 0;
|
|
background: rgba(11, 15, 25, 0.85);
|
|
backdrop-filter: blur(8px);
|
|
-webkit-backdrop-filter: blur(8px);
|
|
display: none;
|
|
justify-content: center;
|
|
align-items: center;
|
|
z-index: 120;
|
|
padding: 1.5rem;
|
|
}
|
|
.modal-card {
|
|
background: rgba(17, 24, 39, 0.96);
|
|
backdrop-filter: blur(20px);
|
|
border: 1px solid rgba(255, 255, 255, 0.12);
|
|
border-radius: 20px;
|
|
width: 100%;
|
|
max-width: 480px;
|
|
box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
|
|
padding: 1.75rem;
|
|
text-align: center;
|
|
}
|
|
|
|
/* Responsive Breakpoints */
|
|
@media (max-width: 768px) {
|
|
.call-header { padding: 0.5rem 1rem; }
|
|
.meeting-title { font-size: 0.95rem; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
.emotion-live-indicator { font-size: 0.72rem; padding: 3px 8px; }
|
|
.side-panel {
|
|
position: absolute;
|
|
top: 0; right: 0; bottom: 0;
|
|
width: 100%;
|
|
max-width: 320px;
|
|
background: rgba(17, 24, 39, 0.97);
|
|
backdrop-filter: blur(20px);
|
|
box-shadow: -10px 0 30px rgba(0, 0, 0, 0.7);
|
|
}
|
|
.ctrl-btn { width: 42px; height: 42px; }
|
|
.btn-end-call { height: 42px; font-size: 0.8rem; padding: 0 1rem; }
|
|
.call-footer { gap: 8px; padding: 0.65rem 0.75rem; }
|
|
.video-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|
|
@media (max-width: 480px) {
|
|
.meeting-title { max-width: 110px; }
|
|
.call-timer { font-size: 0.75rem; padding: 2px 6px; }
|
|
.ctrl-btn { width: 38px; height: 38px; }
|
|
.btn-end-call { height: 38px; font-size: 0.75rem; padding: 0 0.8rem; }
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<!-- Header -->
|
|
<header class="call-header">
|
|
<div class="header-left">
|
|
<span class="live-tag">LIVE</span>
|
|
<div class="meeting-title" title="{{ $meeting->title }}">{{ $meeting->title }}</div>
|
|
<div class="call-timer" id="callTimer">00:00</div>
|
|
|
|
<!-- Live Call Recording Status Indicator -->
|
|
<div id="recordingStatusBadge" class="rec-badge" style="display: none;" title="Call is currently being recorded">
|
|
<span class="rec-dot"></span>
|
|
<span id="recTimer">REC 00:00</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div style="display: flex; align-items: center; gap: 10px; flex-wrap: wrap;">
|
|
<!-- Live AI Emotion Indicator -->
|
|
<div id="liveEmotionBadge" class="emotion-live-indicator emotion-badge-neutral" title="AI Real-Time Emotion & Expression Intelligence">
|
|
<span id="emotionEmoji">😐</span>
|
|
<span id="emotionText">Client Emotion: Neutral</span>
|
|
</div>
|
|
|
|
<button class="ctrl-btn" style="width: 36px; height: 36px; border-radius: 8px;" onclick="copyMeetingLink()" title="Copy Meeting Link">
|
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg>
|
|
</button>
|
|
</div>
|
|
</header>
|
|
|
|
<!-- Call Body -->
|
|
<div class="call-body">
|
|
<!-- Video Grid -->
|
|
<div class="video-grid-container">
|
|
<div class="video-grid" id="videoGrid">
|
|
<!-- Local User Video Tile -->
|
|
<div class="video-tile" id="localVideoTile">
|
|
<video id="localVideo" class="video-element" autoplay playsinline muted></video>
|
|
<div class="video-overlay">
|
|
<span>{{ $participantName }} (You)</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Collapsible Side Panel -->
|
|
<div class="side-panel" id="sidePanel">
|
|
<div class="panel-header">
|
|
<div class="panel-title">
|
|
<span>✨</span> AI Meeting Assistant
|
|
</div>
|
|
<button class="panel-close-btn" onclick="toggleSidePanel()" title="Close side panel">×</button>
|
|
</div>
|
|
|
|
<div class="panel-tabs">
|
|
<button class="panel-tab active" onclick="switchSideTab('notesTab', this)">📝 AI Notes & MoM</button>
|
|
<button class="panel-tab" onclick="switchSideTab('chatTab', this)">💬 Chat</button>
|
|
</div>
|
|
|
|
<!-- TAB 1: AI Live Notes -->
|
|
<div id="notesTab" class="panel-body">
|
|
<div>
|
|
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px;">
|
|
<span style="font-size: 0.75rem; font-weight: 700; color: #818cf8; text-transform: uppercase;">Real-Time Speech Transcription</span>
|
|
<span id="sttStatus" style="font-size: 0.65rem; color: #34d399;">● Listening</span>
|
|
</div>
|
|
<div class="transcript-feed" id="transcriptFeed">
|
|
<div style="color: #6b7280; font-size: 0.75rem; font-style: italic;">Transcribing live spoken speech...</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<div style="font-size: 0.75rem; font-weight: 700; color: #818cf8; text-transform: uppercase; margin-bottom: 6px;">Live Meeting Notes</div>
|
|
<textarea id="liveNotesInput" class="notes-textarea" placeholder="Type manual notes, key discussion points, or deliverables agreed during call..."></textarea>
|
|
</div>
|
|
|
|
@if($isHost)
|
|
<button onclick="endMeetingAndGenerateMoM()" style="background: linear-gradient(135deg, #4f46e5, #06b6d4); color: white; border: none; padding: 10px; border-radius: 8px; font-weight: 700; font-size: 0.85rem; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);">
|
|
✨ Finish & Generate AI MoM
|
|
</button>
|
|
@endif
|
|
</div>
|
|
|
|
<!-- TAB 2: Chat -->
|
|
<div id="chatTab" class="panel-body" style="display: none;">
|
|
<div class="chat-feed" id="chatFeed">
|
|
<!-- Chat messages injected dynamically -->
|
|
</div>
|
|
<div class="chat-input-box">
|
|
<input type="text" id="chatInput" class="chat-input" placeholder="Type a message..." onkeydown="if(event.key==='Enter') sendChatMessage()">
|
|
<button onclick="sendChatMessage()" style="background: #4f46e5; color: white; border: none; border-radius: 8px; padding: 0 12px; cursor: pointer;">➤</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Bottom Controls Footer -->
|
|
<footer class="call-footer">
|
|
<!-- Mic Toggle -->
|
|
<button id="btnToggleMic" class="ctrl-btn" onclick="toggleAudio()" title="Mute / Unmute Microphone">
|
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line></svg>
|
|
</button>
|
|
|
|
<!-- Video Toggle -->
|
|
<button id="btnToggleVideo" class="ctrl-btn" onclick="toggleVideo()" title="Turn Camera On / Off">
|
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polygon points="23 7 16 12 23 17 23 7"></polygon><rect x="1" y="5" width="15" height="14" rx="2" ry="2"></rect></svg>
|
|
</button>
|
|
|
|
<!-- Screen Share -->
|
|
<button id="btnScreenShare" class="ctrl-btn" onclick="toggleScreenShare()" title="Share Screen">
|
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="2" y="3" width="20" height="14" rx="2" ry="2"></rect><line x1="8" y1="21" x2="16" y2="21"></line><line x1="12" y1="17" x2="12" y2="21"></line></svg>
|
|
</button>
|
|
|
|
<!-- Call Recording Feature Button -->
|
|
<button id="btnToggleRecord" class="ctrl-btn" onclick="toggleCallRecording()" title="Start / Stop Call Recording">
|
|
<svg id="recIconStart" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<circle cx="12" cy="12" r="10"></circle>
|
|
<circle cx="12" cy="12" r="4" fill="#ef4444"></circle>
|
|
</svg>
|
|
<svg id="recIconStop" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="display: none; color: #ef4444;">
|
|
<rect x="7" y="7" width="10" height="10" rx="2" fill="#ef4444"></rect>
|
|
</svg>
|
|
</button>
|
|
|
|
<!-- Toggle AI Assistant / Notes -->
|
|
<button id="btnToggleNotes" class="ctrl-btn active-on" onclick="toggleSidePanel()" title="Toggle AI Notes & Transcriber">
|
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline></svg>
|
|
</button>
|
|
|
|
<!-- End Call / Leave Button -->
|
|
@if($isHost)
|
|
<button class="btn-end-call" onclick="endMeetingAndGenerateMoM()">
|
|
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91"></path><line x1="23" y1="1" x2="1" y2="23"></line></svg>
|
|
End Call & Generate MoM
|
|
</button>
|
|
@else
|
|
<button class="btn-end-call" onclick="leaveCall()">
|
|
Leave Call
|
|
</button>
|
|
@endif
|
|
</footer>
|
|
|
|
<!-- Recording Saved / Download Modal -->
|
|
<div id="recordingSavedModal" class="modal-overlay">
|
|
<div class="modal-card">
|
|
<div style="font-size: 2.5rem; margin-bottom: 8px;">🎥</div>
|
|
<h3 style="font-size: 1.25rem; font-weight: 700; margin-bottom: 6px;">Call Recording Ready</h3>
|
|
<p style="color: #9ca3af; font-size: 0.875rem; margin-bottom: 1.5rem;">
|
|
The video recording has been captured and uploaded to the meeting profile. You can also save a copy to your device right now.
|
|
</p>
|
|
<div style="display: flex; gap: 10px; justify-content: center;">
|
|
<a id="btnDownloadSavedRec" href="#" class="btn-end-call" style="background: linear-gradient(135deg, #4f46e5, #06b6d4); text-decoration: none;">
|
|
📥 Download Recording
|
|
</a>
|
|
<button type="button" class="ctrl-btn" style="width: auto; height: 48px; border-radius: 24px; padding: 0 1.25rem;" onclick="document.getElementById('recordingSavedModal').style.display='none'">
|
|
Dismiss
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Hidden Canvas for Face Emotion Snapshots -->
|
|
<canvas id="emotionCanvas" style="display: none;"></canvas>
|
|
|
|
<!-- Toast Notification -->
|
|
<div id="toastNotification" class="toast-notify">Link copied to clipboard!</div>
|
|
|
|
<!-- Pass backend configurations to Javascript -->
|
|
<script>
|
|
window.CLIENT_CALL_CONFIG = {
|
|
meetingCode: '{{ $meeting->meeting_code }}',
|
|
clientId: {{ $client->id ?? $meeting->client_id }},
|
|
participantName: '{{ $participantName }}',
|
|
participantRole: '{{ $participantRole }}',
|
|
isHost: {{ $isHost ? 'true' : 'false' }},
|
|
isGuest: {{ $isGuest ? 'true' : 'false' }},
|
|
detectEmotionUrl: '{{ route('client-calls.detect-emotion', $meeting->meeting_code) }}',
|
|
uploadRecordingUrl: '{{ route('client-calls.upload-recording', $meeting->meeting_code) }}',
|
|
endCallUrl: '{{ route('client-calls.end-call', $meeting->meeting_code) }}',
|
|
heartbeatUrl: '{{ route('client-calls.heartbeat', $meeting->meeting_code) }}',
|
|
redirectUrl: '{{ $isGuest ? url('/') : route('client-calls.show', $client->id ?? $meeting->client_id) }}'
|
|
};
|
|
</script>
|
|
|
|
<!-- Load Client Call Script -->
|
|
<script type="module" src="{{ asset('js/client-call.js') }}"></script>
|
|
|
|
<script>
|
|
function showToast(msg) {
|
|
const toast = document.getElementById('toastNotification');
|
|
if (toast) {
|
|
toast.innerText = msg;
|
|
toast.style.display = 'block';
|
|
setTimeout(() => { toast.style.display = 'none'; }, 3500);
|
|
}
|
|
}
|
|
|
|
function copyMeetingLink() {
|
|
navigator.clipboard.writeText(window.location.href);
|
|
showToast('Meeting link copied to clipboard!');
|
|
}
|
|
|
|
function toggleSidePanel() {
|
|
const panel = document.getElementById('sidePanel');
|
|
if (panel) {
|
|
panel.classList.toggle('collapsed');
|
|
}
|
|
}
|
|
|
|
function switchSideTab(tabId, el) {
|
|
const nTab = document.getElementById('notesTab');
|
|
const cTab = document.getElementById('chatTab');
|
|
if (nTab) nTab.style.display = 'none';
|
|
if (cTab) cTab.style.display = 'none';
|
|
document.querySelectorAll('.panel-tab').forEach(b => b.classList.remove('active'));
|
|
const target = document.getElementById(tabId);
|
|
if (target) target.style.display = 'flex';
|
|
if (el) el.classList.add('active');
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|