0
votes

I have a video asset downloaded from the Internet. I want to display this Video twice on the screen on a 2 different video layers (video playback is the same, both start and pause together).

Things I've tried:

  • 2 AVPlayers the same AVAsset, but the video was downloaded twice.
  • 1 AVPlayer with 2 AVPlayerLayer, only 1 video was shown on screen.

2 video players of the same video content

The video content is the same so the video should be downloaded once. The 2 video players should be sync.

What should I do?

2
Elad, did you find a solution? - Misha

2 Answers

0
votes

I needed to achieve 2 video playback, and I based it on the example here, though this doesn't involve downloading the video: http://iosguy.com/2012/01/11/multiple-video-playback-on-ios/

The source code is here: https://github.com/cezarsignori/MyVideoPlayer

Hopefully that helps a bit.

0
votes

You could try downloading or streaming the video to a local server running on another thread within the same app, and this localhost server might be able to serve up 2 video streams to 2 AVPlayers.