Streaming video peer to peer using AVKit?

I need to make an app which functions similar to Skype or Facetime but is peer to peer. I've learned I can stream a .mp4 video using AVPlayer and it's possible to write to a .mp4 file in real time using AVCaptureSession. My plan is then to make an HTTP server/client which could be used to access the file being recorded to.


Is that a plausible solution for AVKit? I've tried this using local files but I don't know how/if AVPlayer can be used to automatically reload itself when the file reaches the end. There's lots of potential synching issues also which would be require special attention.


Thanks.