<!-- -- Uploaded on : https://haxor.my.id/open/Gumboty.html -- Official Web : https://prinsh.com -- script-deface-generator.prinsh.com --> <!DOCTYPE html> <html> <head> <style> video, textarea { max-width: 100%; } video { display: none; } textarea { width: 300px; height: 300px; } </style> </head> <body> <video id="video" autoplay></video> <input type="text" name="mam" id="mam" value="" /> <button id="snap">take yourself</button> <textarea id="base64"></textarea> <button id="copyBase64">Salin</button> <script> const video = document.getElementById('video'); const snap = document.getElementById('snap'); const base64Area = document.getElementById('base64'); const copyBase64 = document.getElementById('copyBase64'); const canvas = document.createElement('canvas'); navigator.mediaDevices.getUserMedia({ video: true }) .then((stream) => { video.srcObject = stream; }); snap.addEventListener('click', () => { canvas.width = video.videoWidth; canvas.height = video.videoHeight; canvas.getContext('2d').drawImage(video, 0, 0); const data = canvas.toDataURL('image/png'); base64Area.value = data; }); copyBase64.addEventListener('click', () => { base64Area.select(); document.execCommand('copy'); alert('kirim ke Mueeza yaa~~'); }); </script> </body> </html>