androidvideoexoplayerandroid-video-player

Play video one after another smoothly without break


Please help me.I know a way with Exoplayar, but it is not smooth enough. The answers in stackoverflow are very old. Thanks


Solution

  • This is usually due to the need to load metadata and buffer the start of a video.

    One way to achieve your goal is to use two player instances, both displaying in the same place on your UI, but with only one visible at a time. While a video is playing on the first player instance, the other player instance is hidden from view and loads the next video and pauses at the start.

    When the first video ends the first player instance is hidden and the second player instance is unhidden and unpaused.

    It's a bit of a workaround and you may need to experiment with the timing to get it as smooth as you want.

    If you have the luxury of being able to make changes on the server side then you have more options - if you search for 'VOD to Live' video streaming you will see some examples - e.g. https://www.unified-streaming.com/solutions/vod2live