Switch videos dynamically
Learn how to change the video source at runtime without reinitializing the FastPix Flutter Player.
You can switch to a different video, refresh a JWT token, or change the custom domain without rebuilding the player. Use the updateDataSource() method on the controller.
Update the data source
Create a new data source and pass it to the controller:
When to use this
- Play a different video after the current one finishes.
- Refresh an expired JWT token without interrupting the player lifecycle.
- Switch between on-demand and live content within the same player instance.
- Change the custom domain for playback delivery.