Skip to content

Instantly share code, notes, and snippets.

@rdpanek
Last active February 29, 2024 07:56
Show Gist options
  • Save rdpanek/29e2e99a0c361cf86c19952bed0b0e42 to your computer and use it in GitHub Desktop.
Save rdpanek/29e2e99a0c361cf86c19952bed0b0e42 to your computer and use it in GitHub Desktop.
RUM Client
<!DOCTYPE html>
<html>
<head>
<title>WebRTC Demo</title>
<script>
(function(w,d,u,a,o){
w=w[o]=w[o];w=document.createElement(u);w.async=1;w.id=o;w.src=a
o=d.getElementsByTagName(u)[0];o.parentNode.insertBefore(w,o)
})(window,document,'script','http://host.docker.internal:3000/rum','CRUM')
CRUM = {
samplingRate: 1000,
viewId: 'WebRTC', // nastav libovolne jmeno stranky, kazda stranka musi mit unikatni jmeno.
labels: 'env=test, app=webrtc-demo'
}
</script>
</head>
<body>
<h2>WebRTC Video and Audio Chat</h2>
<video id="localVideo" autoplay muted></video>
<video id="remoteVideo" autoplay></video>
<button id="startButton">Start</button>
<button id="callButton">Call</button>
<button id="hangupButton">Hang Up</button>
<div id="statsOutput"></div>
<script src="app.js"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment