摘要: navigator.mediaDevices.enumerateDevices().then(devicelist => { // audiooutput 扬声器 // audioinput 麦克风 // audiooutput 摄像 console.log(devicelist) }).catch 阅读全文
posted @ 2022-01-10 18:12 诡道也 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 需要准备这几个东西electron框架ffmpeg.exe应用程序 链接:https://pan.baidu.com/s/1TyzYlWG0p7cxpqrzziVRCA 提取码:ofd2(也可自行去官网下载)fluent-ffmpeg插件一个rtmp流地址 首先要做以下几步操作1.将ffmpeg.e 阅读全文
posted @ 2022-01-10 18:05 诡道也 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 前言 “它(WebRTC)允许网络应用或者站点,在不借助中间媒介的情况下,建立浏览器之间点对点(Peer-to-Peer)的连接,实现视频流和(或)音频流或者其他任意数据的传输”。 这是 MDN 上对 WebRTC 的描述,初次接触时无法理解 WebRTC 为什么要和 WebSocket 搭配,明明 阅读全文
posted @ 2022-01-10 17:35 诡道也 阅读(380) 评论(0) 推荐(0) 编辑
摘要: onmessage(e) { const json = JSON.parse(e.data); const description = json.message; toUserId = json.userId; switch (description.type) { case "connect": 阅读全文
posted @ 2022-01-10 14:50 诡道也 阅读(51) 评论(0) 推荐(0) 编辑
摘要: const config = { iceServers: [{ urls: "stun:global.stun.twilio.com:3478?transport=udp" }], }; 采用穿透技术 localStream 存储本地视频源的地方 获取本地视频源 const constraints 阅读全文
posted @ 2022-01-10 14:49 诡道也 阅读(36) 评论(0) 推荐(0) 编辑