Videos

Play DynTube Videos in Native Mobile Apps

Native applications can play supported DynTube HLS output with a platform media component or maintained library. The playback URL alone is only one part of the integration: private content also needs server-side viewer authorization, a short-lived playback credential, and a protection mode supported by the target devices.

Obtain playback information safely

  1. Have your trusted backend authenticate the app user.
  2. Authorize that user for the requested video.
  3. Fetch the current video or mobile-playback data through the DynTube API.
  4. Issue or return the short-lived HLS access needed for that viewer.
  5. Pass the resulting URL to the native player without logging its token.

Keep the DynTube API key and signing key on your backend. A mobile binary can be inspected, so embedding either secret in the app lets an attacker request playback outside your authorization flow.

Choose a player by maintained capability

  • iOS and tvOS: begin with AVPlayer and verify required HLS and protection behavior.
  • Android: begin with AndroidX Media3 ExoPlayer and test the intended devices.
  • React Native or Flutter: choose a maintained wrapper that exposes required native HLS features and lifecycle hooks.
  • For every platform, verify backgrounding, network changes, captions, audio tracks, seeking, and error reporting.

Protection compatibility

AES-128 and DRM are alternative project protection modes with different client requirements. Extra Security can intentionally restrict ordinary third-party player key access. Confirm the project mode, plan entitlement, and native integration before promising device support. Allowed origins are browser-oriented and should not be treated as native-app identity.

Analytics and customer identity

DynTube's supported web player emits the platform analytics events. A custom native player does not automatically provide identical analytics. Verify the supported native or API analytics contract and supply customer identity only through a documented integration before relying on per-viewer reports.

Test the full mobile flow

  • Authorized user, unauthorized user, and expired playback credential.
  • Wi-Fi to mobile-data transitions and constrained bandwidth.
  • Foreground, background, lock screen, interruption, and resume.
  • Supported captions, alternate audio, seeking, rotation, and casting.
  • Token redaction in logs, crash reports, and analytics tools.

Something missing or wrong here? Tell us and we will correct it. New to DynTube? Start with uploading and embedding.