Play uploaded videos
Learn how to play a FastPix video in your iOS app using a playback ID.
The FastPix iOS Player SDK uses AVPlayerViewController to stream videos. You provide a playback ID (generated when you upload a video to FastPix), and the SDK handles the rest.
Prerequisites
- Install the FastPix iOS Player SDK in your project.
- A valid playback ID for a video uploaded to FastPix.
Set up the player
To play a video, create an AVPlayerViewController, attach it to your view hierarchy, and call the prepare method with your playback ID.
Key parameters
The prepare method accepts two parameters:
playbackId(required): A unique identifier for the video asset. Make sure you use the correct playback ID to load the intended video.streamType(optional): Specifies whether the content is"on-demand"or"live". Defaults to"on-demand"if not set.
What’s next
- Play live and on-demand streams to configure stream types.
- Secure video playback to protect private content with tokens.
- Build a custom player UI to replace the default controls.