Login

Playback in HLS player

The specific process for integrating the HLS stream URL will vary depending on the chosen player. However, most HLS-compatible players provide a method to set the playback source.

Here's a general approach allowing you the flexibility to integrate your uploaded video content into any player that supports HLS playback. This lets you to choose the player that best suits your requirements and enhances your video accessibility.


1. Refer player documentation

Check the documentation or support resources offered by the player you're using. These resources should provide guidance on configuring the player to utilize an external HLS stream.


2. Defining the playback source

The process of defining the playback source might involve directly providing the HLS stream URL or utilizing an interface within the player that allows you to set the source URL.


3. Initiating video playback

Follow the specific instructions provided by your chosen player to begin playback of the video.




If you choose FastPix Player

If your preferred player is FastPix Player, the HLS stream configuration is already built-in. However, the advantage of acquiring the HLS stream URL lies in its versatility. It can serve as a backup option for you or for testing purposes if needed.


To playback in FastPix Player, locate the section responsible for video playback setup within your application code and insert the following code, replacing {PLAYBACK_ID} with the copied playbackId from the API response you get when uploading a video .


<script src="https://cdn.jsdelivr.net/npm/@fastpix/fp-player@latest/dist/player.js"></script>  
 
<fastpix-player  
    playback-id="{PLAYBACK_ID}"  
</fastpix-player> 

With the CDN link in place, whenever a web page loads, fastpix-player will be loaded automatically and ready to use, enabling seamless video playback.