We’re used to programs like Skype, where video chat is asynchronous, you’re constantly both receiving and transmitting video and audio. This is a great platform for communications, but a terrible platform for storage and bandwidth usage.
I was thinking about how this could be achieved within an app in the current browser and had the following thoughts:
- User A and User B connect to each other and establish a session where they are both short-polling new items within a shared mutable data list
- User A records a short video / audio segment using the MediaRecorder API.
- The frames from the video are extracted from the file stored locally by MediaRecorder and uploaded via the SAFE API to the mutable data list
- User B is short-polling for new data and a video segment is found, the segment is downloaded, stored locally as a file and then played.
- User B responds to User A using the same method