Build a custom player UI
Learn how to replace the default FastPix player controls with your own custom UI.
The FastPix iOS Player SDK lets you hide the default controls and build a fully custom video player interface. You can add your own play/pause button, seek bar, gesture-based interactions, and custom layouts while still using the FastPix engine for playback, buffering, analytics, and playlists.
Hide default controls
Disable the SDK’s built-in player UI:
Embed the player in a custom view
Place the FastPix player inside your own UIView so you can overlay custom controls on top:
Add a custom play/pause button
Create a play/pause button and connect it to the player. You can either use togglePlayPause() for automatic switching, or manually call play() and pause().
Auto-update the play/pause button
Observe the player’s timeControlStatus to keep the button icon in sync with the playback state:
Add tap-to-show/hide controls
Use a tap gesture to toggle the visibility of your custom controls:
Auto-hide controls after a delay
Automatically hide controls after a period of inactivity:
What’s next
- Add a custom seek bar for scrubbing through video.
- Add forward and rewind controls for seek buttons.
- Handle orientation changes to adapt layout for landscape mode.