Enable subtitle and audio track switching in FastPix Player for multi-language support.
Subtitle switching and multi-track audio are key features of the FastPix Player that enhance user experience by offering flexible subtitle options and customizable audio track selections. This guide will walk you through how these functionalities work, how to integrate them, and best practices for implementation.
How it works:
Default subtitle selection
The FastPix Player is designed to select the first subtitle track listed in the manifest and
display it automatically when playback begins.
The subtitle switching feature consists of two main components that make it user-friendly:

To implement subtitle switching, a few important steps need to be followed:
1. Manifest configuration: Ensure that your HLS manifest includes correctly formatted entries for subtitle tracks. This includes details like the language, whether the track is the default, and the URI for the subtitles.
Example HLS manifest entry:
EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID=“subs”,LANGUAGE=“en”,NAME=“English”,DEFAULT=YES,AUTOSELECT=YES,URI=“subtitles/eng/prog_index.m3u8”
2. Player integration: When initializing the FastPix Player, make sure it’s configured to parse the HLS manifest and detect subtitle tracks so that the subtitle button can be activated.
3. User interface updates: The subtitle button should be enabled, and the subtitle menu should be populated with the detected tracks, including an “Off” option for easy subtitle management.
4. Event handling: Set up event listeners to handle user interactions with the subtitle menu:
Example implementation:
Here’s a basic example of how to configure the FastPix Player to support subtitle switching:
The disable-hidden-captions feature enhances subtitle behavior by ensuring only the selected or active caption is visible, preventing overlapping or hidden captions from rendering.
The default-audio-track attribute sets the initial audio track by label or name (case-insensitive) when the player loads.
If the attribute is not provided, or if no matching track is found, the player falls back to the manifest default track or the first available track.
The default-subtitle-track attribute sets the initial subtitle or caption track by label or name (case-insensitive) when the player loads.
If the attribute is not provided, or if no matching track is found, the player follows the existing subtitle initialization behavior.
In addition to subtitle switching, FastPix Player’s support for multi-track audio gives viewers the option to switch between different audio tracks. When the FastPix Player processes an HLS stream, it incorporates any additional audio tracks embedded in the stream URL. This feature is especially useful for videos available in multiple languages.
This is straightforward and user-friendly. Here’s what users can do:
Example integration: To set up FastPix Player with multi-track audio support, use the following configuration:
PLEASE NOTE
If you have multiple audio tracks in your media, it will automatically get added when you use the media’s playback Id in FastPix player. Also, in the example above, the
tokenattribute is optional. You can use it to protect videos with private streams .

Cache busting is a beta feature designed to ensure your player always fetches the latest updated manifest when tracks are dynamically added. This helps prevent stale content from being loaded due to browser caching.
When the enable-cache-busting attribute is present, the player automatically appends a unique query parameter to the manifest URL. This forces the browser and CDN to retrieve the latest version instead of serving a cached copy.
To enable cache busting, simply add the enable-cache-busting attribute to your <fastpix-player> element:
PLEASE NOTE
⚠️ Beta feature: This feature is still in experimental mode and may not work consistently across all browsers and CDN configurations.
⚠️ Performance impact: Since the manifest is always fetched fresh, repeated requests may slightly increase bandwidth usage.
⚠️ CDN considerations: Some CDNs may override cache-busting parameters. Ensure your CDN settings allow query parameter-based cache invalidation.
If you face any issues, please provide feedback to us so we can continue refining this feature.