Fully end to end encrypted anonymous chat program. Server only stores public key lookup for users and the encrypted messages. No credentials are transfered to the server, but kept in local browser storage. This allows 100% safe chatting. https://safechat.ch
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.9 KiB

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width initial-scale=1" />
<link href="stylesheets/safechat.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="jquery/jquery.min.js"></script>
<link href="stylesheets/jquery.cssemoticons.css" media="screen" rel="stylesheet" type="text/css" />
<script src="javascripts/ext/jquery.cssemoticons.js" type="text/javascript"></script>
<title>WebRTC Test</title>
</head>
<body>
<h1>WebRTC test</h1>
<div id="status">
<div id="main">
<noscript>JavaScript is required!</noscript>
<video autoplay></video>
</div>
<script>
try {
var errorCallback = function(e) {
$('#status').html('ERROR: '+e)
console.log('ERROR:', e)
}
navigator.getUserMedia = navigator.getUserMedia ||
navigator.webkitGetUserMedia ||
navigator.mozGetUserMedia ||
navigator.msGetUserMedia
if (navigator.getUserMedia) {
// Not showing vendor prefixes.
navigator.getUserMedia({
video: true,
audio: true,
facingMode: "user"
}, function(localMediaStream) {
var video = document.querySelector('video')
video.src = window.URL.createObjectURL(localMediaStream)
// Note: onloadedmetadata doesn't fire in Chrome when using it with getUserMedia.
// See crbug.com/110938.
video.onloadedmetadata = function(e) {
// Ready to go. Do some stuff.
};
}, errorCallback)
} else {
$('#status').html('ERROR: WebRTC not fully supported in this browser')
}
} catch (e) {
$('#status').html('ERROR: '+e.message)
}
</script>
</body>
</html>