simple-webrtc-element-whep
Version:
Simple Webrtc Html Video Element Manager
31 lines (26 loc) • 763 B
HTML
<html>
<head>
<title>Test</title>
<!-- <script type="module" src="./index.js"></script> -->
</head>
<body>
<h1>Test</h1>
<p>Test</p>
<video muted controls autoplay playsinline></video>
<script type="module">
import WhepClient from './index.js';
const onOnline = () => {
console.log('online');
}
const onOffline = () => {
console.log('offline');
}
const video = document.querySelector('video');
const client = new WhepClient({
videoElement: video, whepUri: 'https://vpn0.devicesmng.kernel.online/slave_10.33.88.212_fakeh264flux2/whep', onOnline, onOffline,
});
console.log(client);
</script>
</body>
</html>