External servers host two multimedia files - audio and video. I need to disable them and play as an online stream through the MediaPlayer class.
The main problem is that I do not know if there is any possible solution for the continuous loading-multiplexing process. I saw examples of using the MediaMuxer class, but only with local files.
I am currently just launching two media players, such as:
//Setting up video MediaPlayer video = new MediaPlayer(); video.setDataSource("videurl"); video.prepare(); //Setting up audio MediaPlayer audio = new MediaPlayer(); video.setDataSource("audiourl"); video.prepare(); //Starting both players simultaneously video.start(); audio.start();
But of course, this gives terrible synchronization between audio and video. So the question is, is it even possible for online multiplexing streams, and if so, where to start research?
source share