D
D
DARKENN2020-03-16 18:27:00
Java
DARKENN, 2020-03-16 18:27:00

How to play m3u8 broadcast on android java?

I organized the playback of the live broadcast like this:

private void setupVideoView() {
        // Make sure to use the correct VideoView import
        videoView = findViewById(R.id.video_view);
        videoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
            @Override
            public void onPrepared(MediaPlayer mp) {
                videoView.start();
            }
        });

        //For now we just picked an arbitrary item to play
        videoView.setVideoURI(Uri.parse(stream_key));
    }

But this turns out to be a huge delay (and different devices have different ones) from 20-45 seconds.
What can be used so that the delay is at least no more than 10 seconds? Or can something be done about it?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question