I have one player (in my case ExoPlayer) and I have one video URL. I want to play this video into multiple views at the same time as shown in the screenshot below. Here are some notes:
- I don't care if the 4 videos are in perfect sync. They can be slightly off-sync.
- I am not looking for a solution of have 4 player instances. But only one instance.
- One potential approach that I came across is described here. But I am not sure what is meant by "have the player output to a SurfaceTexture, and then having multiple views make use of the texture". I can output the player to a SurfaceTexture, but how can multiple views make use of the texture?
- A solution based on Views or Jetpack compose are welcome!


As you probably know the player can only render to a single surface (as mentioned in the issue).
A relatively simple way to overcome this limitation is to have the player render to one of the views and copy the frames to the rest of the views (assuming they all have equal size).
And in order to know when each frame is actually drawn we can extend the
MediaCodecVideoRenderer.Here's an example: