如何學習 websocket ?git
使用 HTML https://github.com/phoboslab/jsmpeg MPEG1 進行播放github
https://w3c.github.io/media-source/ 使用原始 APIweb
使用 canvas 繪製圖像,經過 API URL.createObjectURL(Blob or ArrayBuffer) 拿到數據
ArrayBuffer
Blobcanvas
使用 https://socket.io/ 傳輸視頻瀏覽器
// 檢測瀏覽器是否支持 websocket window.onload=function(){ window.WebSocket = window.WebSocket || window.MozWebSocket; if (!window.WebSocket){ alert("WebSocket not supported by this browser"); }else{ alert("WebSocket supported by this browser"); } }
simplechat
簡單的一對多 websocket 例子
一個服務端和多個客戶端websocket
sslechoclient
wss://socket
chatclient學習
qmlwebsocketserverthis
standalonesocket.io
WebRTC 直接和攝像頭進行交互
https://github.com/webrtc
HTTP Live Streaming