How to integrate a short drama API into mobile apps

Use your backend to call ShortDramaAPI, then play HLS in the native or cross-platform player. API access is not the same as content rights — confirm territories and monetization before launch. This guide does not assume a vendor SDK.

Recommended architecture

  1. Your app asks your server for feed / episode metadata.
  2. Your server calls catalog → episodes → playback with a server-held API key.
  3. Your server returns a short-lived playback URL (and subtitle URLs) to the app.
  4. The app loads the .m3u8 in a vertical player (9:16).
Never ship production API keys inside the mobile binary or client-side JS.

iOS (AVPlayer)

AVPlayer plays HLS natively. Create an AVURLAsset / AVPlayerItem from the playback URL. Add AVMediaSelectionGroup handling for audio and legible (subtitle) options when the manifest exposes them. Prefer HTTPS URLs and handle expired links by re-requesting playback from your backend.

Android (ExoPlayer / Media3)

Use Media3 ExoPlayer with an HLS media source. Map audio and text tracks from the player’s track selector so users can switch language independently. Retry by refreshing the playback endpoint if the CDN URL expires.

React Native

Common pattern: fetch metadata via your API, then play with a community HLS-capable video component or a native module wrapping AVPlayer / ExoPlayer. Keep the ShortDramaAPI key on the server; the RN app only receives playback URLs.

Flutter

Flutter can play HLS through standard packages that wrap platform players. See the dedicated Flutter HLS guide. This guide does not assume a vendor SDK.

Checklist before store submit

Back to API quickstart View live demo