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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Fake Video Call Swap</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        .video-container {
            position: relative;
            width: 100%;
            height: 0;
            padding-bottom: 56.25%; /* 16:9 aspect ratio */
            background-color: #000;
            border-radius: 12px;
            overflow: hidden;
        }
        
        .video-feed {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .preview-video {
            position: absolute;
            bottom: 20px;
            right: 20px;
            width: 25%;
            height: 25%;
            border-radius: 8px;
            border: 2px solid white;
            z-index: 10;
        }
        
        .call-controls {
            position: absolute;
            bottom: 20px;
            left: 0;
            right: 0;
            display: flex;
            justify-content: center;
            gap: 20px;
            z-index: 10;
        }
        
        .control-btn {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .end-call {
            background-color: #ff0000;
            color: white;
        }
        
        .swap-effect {
            animation: swap 0.5s ease-in-out;
        }
        
        @keyframes swap {
            0% { opacity: 1; }
            50% { opacity: 0; }
            100% { opacity: 1; }
        }
        
        .whatsapp-btn {
            background-color: #25D366;
            color: white;
        }
        
        .video-options {
            position: absolute;
            top: 20px;
            right: 20px;
            z-index: 10;
        }
        
        .dropdown-content {
            display: none;
            position: absolute;
            right: 0;
            background-color: rgba(0,0,0,0.7);
            min-width: 200px;
            border-radius: 8px;
            padding: 10px;
            z-index: 1;
        }
        
        .dropdown:hover .dropdown-content {
            display: block;
        }
        
        .video-option-item {
            padding: 8px 12px;
            color: white;
            cursor: pointer;
            border-radius: 4px;
        }
        
        .video-option-item:hover {
            background-color: rgba(255,255,255,0.2);
        }
    </style>
</head>
<body class="bg-gray-100 min-h-screen flex flex-col items-center justify-center p-4">
    <div class="w-full max-w-4xl bg-white rounded-xl shadow-xl overflow-hidden">
        <!-- Header -->
        <div class="bg-gray-800 text-white p-4 flex items-center justify-between">
            <div class="flex items-center">
                <i class="fas fa-video mr-2"></i>
                <h1 class="text-xl font-bold">Fake Video Call</h1>
            </div>
            <div class="flex items-center space-x-2">
                <span id="call-timer" class="text-sm">00:00</span>
                <div class="w-3 h-3 bg-red-500 rounded-full animate-pulse"></div>
            </div>
        </div>
        
        <!-- Video Container -->
        <div class="relative p-4">
            <div class="video-container">
                <!-- Main video feed -->
                <video id="main-video" class="video-feed" autoplay muted loop>
                    <source src="https://sample-videos.com/video123/mp4/720/big_buck_bunny_720p_1mb.mp4" type="video/mp4">
                </video>
                
                <!-- Preview video -->
                <video id="preview-video" class="preview-video" autoplay muted loop>
                    <source src="https://sample-videos.com/video123/mp4/720/big_buck_bunny_720p_1mb.mp4" type="video/mp4">
                </video>
                
                <!-- Caller info -->
                <div class="absolute top-4 left-4 bg-black bg-opacity-50 text-white p-2 rounded-lg">
                    <div class="flex items-center">
                        <img src="https://randomuser.me/api/portraits/women/65.jpg" alt="Profile" class="w-10 h-10 rounded-full mr-2">
                        <div>
                            <h3 class="font-bold">Sarah Johnson</h3>
                            <p class="text-xs">Calling...</p>
                        </div>
                    </div>
                </div>
                
                <!-- Video options dropdown -->
                <div class="video-options dropdown">
                    <button class="control-btn bg-gray-700 text-white">
                        <i class="fas fa-ellipsis-v"></i>
                    </button>
                    <div class="dropdown-content">
                        <div class="video-option-item" onclick="changeVideo('beach')">
                            <i class="fas fa-umbrella-beach mr-2"></i> Beach Background
                        </div>
                        <div class="video-option-item" onclick="changeVideo('office')">
                            <i class="fas fa-building mr-2"></i> Office Background
                        </div>
                        <div class="video-option-item" onclick="changeVideo('nature')">
                            <i class="fas fa-tree mr-2"></i> Nature Background
                        </div>
                        <div class="video-option-item" onclick="changeVideo('city')">
                            <i class="fas fa-city mr-2"></i> City Background
                        </div>
                        <div class="video-option-item" onclick="uploadCustomVideo()">
                            <i class="fas fa-upload mr-2"></i> Upload Custom Video
                        </div>
                    </div>
                </div>
                
                <!-- Call controls -->
                <div class="call-controls">
                    <button id="mute-btn" class="control-btn bg-gray-700 text-white" onclick="toggleMute()">
                        <i class="fas fa-microphone"></i>
                    </button>
                    <button id="video-btn" class="control-btn bg-gray-700 text-white" onclick="toggleVideo()">
                        <i class="fas fa-video"></i>
                    </button>
                    <button id="swap-btn" class="control-btn bg-blue-600 text-white" onclick="swapVideos()">
                        <i class="fas fa-exchange-alt"></i>
                    </button>
                    <button id="whatsapp-btn" class="control-btn whatsapp-btn" onclick="shareOnWhatsApp()">
                        <i class="fab fa-whatsapp"></i>
                    </button>
                    <button id="end-call-btn" class="control-btn end-call" onclick="endCall()">
                        <i class="fas fa-phone"></i>
                    </button>
                </div>
            </div>
        </div>
        
        <!-- Video selection panel -->
        <div class="p-4 bg-gray-50">
            <h3 class="font-bold mb-2">Select Video to Swap:</h3>
            <div class="grid grid-cols-2 sm:grid-cols-4 gap-3">
                <div class="cursor-pointer" onclick="selectSwapVideo('https://sample-videos.com/video123/mp4/720/big_buck_bunny_720p_1mb.mp4')">
                    <video class="w-full h-24 object-cover rounded-lg" loop>
                        <source src="https://sample-videos.com/video123/mp4/720/big_buck_bunny_720p_1mb.mp4" type="video/mp4">
                    </video>
                    <p class="text-xs mt-1 text-center">Sample 1</p>
                </div>
                <div class="cursor-pointer" onclick="selectSwapVideo('https://sample-videos.com/video123/mp4/480/night_sky.mp4')">
                    <video class="w-full h-24 object-cover rounded-lg" loop>
                        <source src="https://sample-videos.com/video123/mp4/480/night_sky.mp4" type="video/mp4">
                    </video>
                    <p class="text-xs mt-1 text-center">Night Sky</p>
                </div>
                <div class="cursor-pointer" onclick="selectSwapVideo('https://sample-videos.com/video123/mp4/480/city_traffic.mp4')">
                    <video class="w-full h-24 object-cover rounded-lg" loop>
                        <source src="https://sample-videos.com/video123/mp4/480/city_traffic.mp4" type="video/mp4">
                    </video>
                    <p class="text-xs mt-1 text-center">City Traffic</p>
                </div>
                <div class="cursor-pointer" onclick="selectSwapVideo('https://sample-videos.com/video123/mp4/480/beach.mp4')">
                    <video class="w-full h-24 object-cover rounded-lg" loop>
                        <source src="https://sample-videos.com/video123/mp4/480/beach.mp4" type="video/mp4">
                    </video>
                    <p class="text-xs mt-1 text-center">Beach</p>
                </div>
            </div>
        </div>
    </div>
    
    <!-- Upload Modal -->
    <div id="upload-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center hidden z-50">
        <div class="bg-white rounded-lg p-6 w-full max-w-md">
            <h2 class="text-xl font-bold mb-4">Upload Custom Video</h2>
            <input type="file" id="video-upload" accept="video/*" class="mb-4 w-full">
            <div class="flex justify-end space-x-3">
                <button onclick="closeUploadModal()" class="px-4 py-2 bg-gray-300 rounded-lg">Cancel</button>
                <button onclick="processUpload()" class="px-4 py-2 bg-blue-600 text-white rounded-lg">Upload</button>
            </div>
        </div>
    </div>
    
    <script>
        // Timer functionality
        let seconds = 0;
        let timerInterval;
        
        function startTimer() {
            timerInterval = setInterval(() => {
                seconds++;
                const minutes = Math.floor(seconds / 60);
                const remainingSeconds = seconds % 60;
                document.getElementById('call-timer').textContent = 
                    `${minutes.toString().padStart(2, '0')}:${remainingSeconds.toString().padStart(2, '0')}`;
            }, 1000);
        }
        
        // Toggle mute
        function toggleMute() {
            const btn = document.getElementById('mute-btn');
            const icon = btn.querySelector('i');
            
            if (icon.classList.contains('fa-microphone')) {
                icon.classList.remove('fa-microphone');
                icon.classList.add('fa-microphone-slash');
                btn.classList.add('bg-red-500');
            } else {
                icon.classList.remove('fa-microphone-slash');
                icon.classList.add('fa-microphone');
                btn.classList.remove('bg-red-500');
            }
        }
        
        // Toggle video
        function toggleVideo() {
            const btn = document.getElementById('video-btn');
            const icon = btn.querySelector('i');
            
            if (icon.classList.contains('fa-video')) {
                icon.classList.remove('fa-video');
                icon.classList.add('fa-video-slash');
                btn.classList.add('bg-red-500');
                document.getElementById('preview-video').style.display = 'none';
            } else {
                icon.classList.remove('fa-video-slash');
                icon.classList.add('fa-video');
                btn.classList.remove('bg-red-500');
                document.getElementById('preview-video').style.display = 'block';
            }
        }
        
        // Swap videos
        function swapVideos() {
            const mainVideo = document.getElementById('main-video');
            const previewVideo = document.getElementById('preview-video');
            
            // Get current sources
            const mainSrc = mainVideo.querySelector('source').src;
            const previewSrc = previewVideo.querySelector('source').src;
            
            // Add swap effect
            mainVideo.classList.add('swap-effect');
            previewVideo.classList.add('swap-effect');
            
            // Swap sources after a delay
            setTimeout(() => {
                mainVideo.querySelector('source').src = previewSrc;
                previewVideo.querySelector('source').src = mainSrc;
                
                // Reload videos
                mainVideo.load();
                previewVideo.load();
                
                // Remove swap effect
                setTimeout(() => {
                    mainVideo.classList.remove('swap-effect');
                    previewVideo.classList.remove('swap-effect');
                }, 500);
            }, 250);
        }
        
        // Select video for swapping
        function selectSwapVideo(videoSrc) {
            document.getElementById('preview-video').querySelector('source').src = videoSrc;
            document.getElementById('preview-video').load();
        }
        
        // Change main video background
        function changeVideo(type) {
            const mainVideo = document.getElementById('main-video');
            let newSrc = '';
            
            switch(type) {
                case 'beach':
                    newSrc = 'https://sample-videos.com/video123/mp4/480/beach.mp4';
                    break;
                case 'office':
                    newSrc = 'https://sample-videos.com/video123/mp4/480/office.mp4';
                    break;
                case 'nature':
                    newSrc = 'https://sample-videos.com/video123/mp4/480/nature.mp4';
                    break;
                case 'city':
                    newSrc = 'https://sample-videos.com/video123/mp4/480/city.mp4';
                    break;
                default:
                    newSrc = 'https://sample-videos.com/video123/mp4/720/big_buck_bunny_720p_1mb.mp4';
            }
            
            mainVideo.querySelector('source').src = newSrc;
            mainVideo.load();
        }
        
        // Upload custom video
        function uploadCustomVideo() {
            document.getElementById('upload-modal').classList.remove('hidden');
        }
        
        function closeUploadModal() {
            document.getElementById('upload-modal').classList.add('hidden');
        }
        
        function processUpload() {
            const fileInput = document.getElementById('video-upload');
            if (fileInput.files.length > 0) {
                const file = fileInput.files[0];
                const videoURL = URL.createObjectURL(file);
                
                // Set as preview video
                document.getElementById('preview-video').querySelector('source').src = videoURL;
                document.getElementById('preview-video').load();
                
                closeUploadModal();
                alert('Video uploaded successfully! Now you can swap it to the main view.');
            } else {
                alert('Please select a video file first.');
            }
        }
        
        // Share on WhatsApp
        function shareOnWhatsApp() {
            const mainVideo = document.getElementById('main-video');
            const videoSrc = mainVideo.querySelector('source').src;
            
            // In a real app, you would need to upload the video somewhere first
            // For this demo, we'll just share a message
            const message = "Check out this fake video call I created!";
            const whatsappUrl = `https://wa.me/?text=${encodeURIComponent(message)}`;
            window.open(whatsappUrl, '_blank');
        }
        
        // End call
        function endCall() {
            clearInterval(timerInterval);
            alert('Call ended. Duration: ' + document.getElementById('call-timer').textContent);
            window.location.reload();
        }
        
        // Start timer when page loads
        window.onload = function() {
            startTimer();
            
            // Autoplay videos (muted)
            document.getElementById('main-video').play();
            document.getElementById('preview-video').play();
            
            // Play all video thumbnails
            document.querySelectorAll('.grid video').forEach(video => {
                video.play();
            });
        };
    </script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Sanzhi303/https-www-mukabaleo-com" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>