init project
This commit is contained in:
commit
fdff4136af
7 files changed
+829
No files matched your search
@@ -0,0 +1,37 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>webRTC to stream</title>
|
||||
</head>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.1.1/socket.io.js"></script>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||
<script src="https://cdn.webrtc-experiment.com/ConcatenateBlobs.js"></script>
|
||||
<body>
|
||||
<video style="width: 100%; height: 100%;" id="videoPlayer" controls>
|
||||
</video>
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
var videoPlayer = $('#videoPlayer');
|
||||
var buffer =[];
|
||||
var socket = io('https://kurento.fishrungames.com/');
|
||||
|
||||
|
||||
socket.on('connect', (socket) => {
|
||||
console.log('connected to the socket');
|
||||
});
|
||||
|
||||
socket.on('newBlob', (data) => {
|
||||
console.log('blob');
|
||||
|
||||
buffer.push(new Blob([new Uint8Array(data)]));
|
||||
ConcatenateBlobs(buffer,'video/webm', (resultingBlob) => {
|
||||
// blob is immutabl!
|
||||
// let blob = new Blob([new Uint8Array(data)], { type: "video/webm" });
|
||||
//videoPlayer.src = URL.createObjectURL(blob);
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user