Seamless video playback like in TikTok or Youtube Shorts

This page summarizes the projects mentioned and recommended in the original post on /r/androiddev

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • samples

    Jetpack Compose based project, used to stress-testing compose features / integrations and explore non-trivial functionality (by Skyyo)

  • Hi, I was playing around with achieving exactly that, but have an issue - buffering happens even on pre-cached videos. In short - I use single ExoPlayer instance, and single playerView/surfaceView at a time. Would like to decrease buffering time from 100-200ms to 0. Hope someone here has relevant experience and might help answering the questions: 1) Do you absolutely must use 2 instances of ExoPlayer to achieve this? We can always assume which video will be next to play, thus we can send the "likely to be played video URL" to the non-playing player, so this definitely looks doable. Though there might be issue with this as well, didn't try it yet. Also would it make sense to pre-cache videos with this approach? I guess it would help, but wound't be mandatory. 2) Can anyone confirm that TikTok & Youtube Shorts use .mp4 format instead of adaptive streams? If yes, then are there any advantages for .mp4 for this type of feature, except the fact that pre-caching HLS videos might be a redundant job, if internet conditions change before playback happens? Link to the code folder. Link to ExoPlayer initialisation. Link to pre-caching mechanism for HLS videos. Video shows how it looks right now. The delay before video starts playing is basically time spent from Player.STATE_BUFFERING to Player.STATE_READY .

  • Exoplayer

    An extensible media player for Android

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts