Overview of RxPlayer Main Thread modules
devThe main_thread directory is composed of several specialized modules that manage the high-level orchestration of playback:
- API (
./api): Defines the public API and provides abstractions for implementation. - ContentInitializer (
./init): Handles playback initialization and connects various modules. - ContentDecryptor (
./decrypt): Manages content decryption negotiation for DRM-protected content. - CoreInterface (
./core_interface): Provides a communication interface to thecorelogic (which may reside in a separate thread). Its behavior adapts based on whether the environment is mono-threaded or multi-threaded. - TracksStore (
./tracks_store): Provides a simplified API for switching text, audio, and video tracks.- For contents played directly by the browser (via
srcon a media element), use the sister blockMediaElementTracksStore(./tracks_store/media_element_tracks_store.ts).
- For contents played directly by the browser (via
- TextDisplayer (
./text_displayer): Manages subtitle rendering, supporting either HTML elements or nativeHTMLTrackElement(<track>) methods.