WebRTC/WebSocket screen recording

前端 未结 3 1435
萌比男神i
萌比男神i 2021-01-19 01:53

In my use case I would like to record the screen activity and send it to server [not live]. I looked at few blogs/sample demos for this. But I couldn\'t find anything relate

3条回答
  •  清酒与你
    2021-01-19 02:22

    The solution can be divided into three parts:

    • getting hold of screen mediastream using getUserMedia, this falls under category of WebRTC, and since you are sharing screen, your site is gonna have to be https and your users probably going to need to use extensions( for both firefox and chrome), you could look for demo here

    • Recording the mediastream, firefox has been supporting this for a while through MediaRecorder and heard chrome started supporting it from 47. So with mediarecorder, you can get hold of blob of your recorded file.

    • How you post this blob to server is totally up to you, you could use any channel: websockets, http post, etc. You could make the server a WebRTC client, and send it through RTCDataChannel, but guessing that would be overkill for your use case.

提交回复
热议问题