StreamMediaDataSource

Centralized provider for Media3 DataSource.Factory instances.

Wraps the base DefaultDataSource.Factory with CDNDataSourceFactory when a custom CDN is configured, enabling URL rewriting and header injection for media playback (video, audio, voice recordings).

Functions

Link copied to clipboard
fun factory(context: Context, cdn: CDN?): DataSource.Factory

Creates a DataSource.Factory that handles both local and network media URIs.