Can I use some sort of local storage as a temporary holding place for getUserMedia for near-RTC?

こ雲淡風輕ζ 提交于 2019-11-27 15:18:10

A buffer wont change WebRTC's realtime characteristics in the face of low bandwidth. With video for instance, WebRTC might degrade either frame rate or resolution to keep up, but no-one has proposed degrading delivery time (dropping realtime-ness). Yours is an interesting use case however.

You could use MediaRecorder. It would let you record locally and then send the data as blobs to the server with either websockets or data channels.

Here's a fiddle that works in Chrome (which does video only unfortunately) and Firefox:

https://jsfiddle.net/tmwLxjLy

It shows simple recording and then playback of the video 5 seconds later. I'll leave it as an exercise to modify it to cause a continuous 5-second delay.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!