Skip to main content

UI Customization

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 to disable the official UI and create a custom one:

// 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.