Sanzhi303's picture
Buatkan aplikasi panggilan vidio fake swap bisa di hubungkan ke whatsapp langsung bisa di gunakan - Initial Deployment
eb357f3 verified
Raw History Blame Contribute Delete
17.6 kB
<!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>