I want to add file transfer feature in my project, how can I do it with data channel in webRTC Flutter i didn't find any proper documentation for it

265 views Asked by At

Can anyone give proper sample code for how to implement file transfer in flutter using webRTC. I have learnt how to communicate real time. I am unable to find proper documentation regarding data channels for flutter webRTC.

I tried it just like for media stream but failed.

1

There are 1 answers

0
jch On

The WebRTC samples collection contains a file transfer sample: https://webrtc.github.io/samples/src/content/datachannel/filetransfer/

For another example, you may also want to have a look at the file transfer code in Galene (disclaimer, I'm the author), which is here: https://github.com/jech/galene/blob/master/static/protocol.js#L1516