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.
|
|
<html><head> <title>Streamer</title></head><body>https://github.com/mpromonet/webrtc-streamerhttps://medium.com/@alexcambose/webcam-live-streaming-with-websockets-and-base64-64b1b4992db8chrome://flags/#unsafely-treat-insecure-origin-as-securehttps://developer.mozilla.org/en-US/docs/Web/API/Media_Streams_APIhttps://www.tutorialspoint.com/webrtc/webrtc_media_stream_apis.htmhttps://webrtc.github.io/samples/https://phoboslab.org/log/2013/09/html5-live-video-streaming-via-websocketshttps://github.com/phoboslab/jsmpeghttps://stackoverflow.com/questions/4241992/video-streaming-over-websockets-using-javascripthttps://chromium.googlesource.com/chromium/src/+/master/net/server/web_socket_encoder.cchttps://tools.ietf.org/html/rfc7692#page-12https://tools.ietf.org/html/rfc6455#section-4.2.2https://habr.com/ru/company/ruvds/blog/342346/https://github.com/liwf616/awesome-live-streamhttps://github.com/auscaster/webrtc-native-to-browser-peerconnection-example/blob/master/peerconnection/server/main.cc <video autoplay></video> <script> // get video dom element const video = document.querySelector('video'); // request access to webcam navigator.mediaDevices.getUserMedia({video: {width: 426, height: 240}}).then((stream) => video.srcObject = stream); // returns a frame encoded in base64 const getFrame = () => { const canvas = document.createElement('canvas'); canvas.width = video.videoWidth; canvas.height = video.videoHeight; canvas.getContext('2d').drawImage(video, 0, 0); const data = canvas.toDataURL('image/png'); return data; } const WS_URL = 'ws://192.168.0.115:8080'; const FPS = 3; const ws = new WebSocket(WS_URL); ws.onopen = () => { console.log(`Connected to ${WS_URL}`); setInterval(() => { ws.send(getFrame()); }, 1000 / FPS); } </script></body></html>
|