shinyoshiaki / werift-webrtc

WebRTC Implementation for TypeScript (Node.js), includes ICE/DTLS/SCTP/RTP/SRTP/WEBM/MP4
MIT License
469 stars 30 forks source link

set MediaRecorder.start as public method #317

Closed kolserdav closed 1 year ago

kolserdav commented 1 year ago

While building throw error:

src/addons/recordVideo.ts:359:45 - error TS2341: Property 'start' is private and only accessible within class 'MediaRecorder'.

359     this.mediaRecorders[roomId][recorderId].start();
                                                ~~~~~
shinyoshiaki commented 1 year ago

The start method is obsolete.

See the sample below for how to use the new API. https://github.com/shinyoshiaki/werift-webrtc/blob/3724152c9d303b019c667b6578e5811794cc508e/examples/save_to_disk/vp8.ts#L1