By fully customizing your native iOS player UI using the iOS Player SDK, you can create a unique and seamless playback experience for your users.
Step 1: Create a Custom UI
Follow the provided sample codes:
// Create a subclass of UIView class CustomView: UIView { init(player: Player, frame: CGRect) { super.init(frame: frame) // register the AVPlayerLayer of this view to the Player player.register(playerLayer) } var playerLayer: AVPlayerLayer { layer as! AVPlayerLayer } override class var layerClass: AnyClass { AVPlayerLayer.self } }
Step 2: Add Customized UI Components
Use the provided APIs to create controllers on your player UI for custom playback behavior.
What's More
- To ensure a smooth playback experience, check the compatible operating systems and browsers.
- To track the playback, refer to the Playback Event documentation.
- To enable advanced features, refer to the following guides: