Learn how to play a FastPix video in your Flutter app using a playback ID.
Playing a video requires four steps: create a data source, define the player configuration, initialize the controller, and render the player widget.
The data source tells the player what to play. Provide your playbackId and optional metadata:
The configuration controls player behavior such as autoplay settings, quality preferences, and controls:
Connect your data source and configuration to the player:
Use the FastPixPlayer widget in your layout. You can control width, height, and aspect ratio:
Important: Always call
controller.dispose()in your widget’sdispose()method. Forgetting this can cause memory leaks, especially on Android.