Chapter 6. Adding File Sharing
This chapter shows you how to extend the video chat application we developed in the second and fourth chapters to add support for file sharing between the two users. After reading this chapter, you will have a clear understanding of:
Extending the existing HTML for supporting file sharing
Adding JavaScript for enabling file sharing
Adding files through the standard file selector user interface
Enabling users to drag-and-drop files into the browser window
Adding JavaScript for transferring files over the WebSocket connection
Extending the signaling server for supporting file transfer
Sending thumbnails before sending the whole file
Providing progress updates during the transfer
Using RTCDataChannel connections between two users
Adding JavaScript for transferring files over the RTCDataChannel connection
Other file sharing related ideas and options