- IRPlayerUIShell is a powerful UI Shell framework for the video player(IRPlayer) for iOS.
- Objc version: https://github.com/irons163/IRPlayerUIShell
- Support customize UI for IRPlayer.
- Support some media controllers.
- Seek Bar
- Brightness
- Volume
- Full Screen
- Has a Demo
- Support Multi video player in one page(UITableView, UICollectionView, etc).
- More powerful custom UI design.
- Make a framework for this project.
- Add package:
https://github.com/irons163/IRPlayerUIShell-swift
-
See
IRPlayerUIShellViewControllerfor demo. -
Create a IRPlayer instance.
import IRPlayer
// Create the decoder and PlayerImp
let playerImp: IRPlayerImp = {
let p = IRPlayerImp.player()
p.decoder = IRPlayerDecoder.ffmpegDecoder()
// Single video example
if let url = URL(string: "https://example.com/video.mp4") {
p.replaceVideo(with: url)
}
return p
}()- Create
IRPlayerControllerwithplayerManagerandcontainerView, then set thecontrolView:
let containerView = UIView()
let controlView = IRPlayerControlView() // Adjust to your concrete control view type
let player = IRPlayerController.player(withPlayerManager: playerImp,
containerView: containerView)
player.controlView = controlView- Provide multiple video URLs — the first one will auto‑play:
let assetURLs: [URL] = [
URL(string: "https://example.com/video1.mp4")!,
URL(string: "https://example.com/video2.mp4")!
]
player.assetURLs = assetURLs- Keep playing when the app resigns active (background):
player.pauseWhenAppResignActive = false- Listen for orientation/fullscreen changes:
player.orientationWillChange = { [weak self] (_, _) in
self?.setNeedsStatusBarAppearanceUpdate()
}- Listen for when the player reaches the end of the current item:
player.playerDidToEnd = { [weak player, weak controlView] _ in
guard let player, let controlView else { return }
// Pause then play again (retains your original behavior)
player.currentPlayerManager.pause()
player.currentPlayerManager.play()
// Play next item
player.playTheNext()
if !player.isLastAssetURL {
let title = "title:\\(player.currentPlayIndex)"
controlView.showTitle(title,
coverURLString: kVideoCover,
fullScreenMode: .landscape)
} else {
player.stop()
}
}- More, coming soon...
| Play | Seek |
|---|---|
![]() |
![]() |
| Volume | Brightness |
![]() |
![]() |
| Full Screen | Lock Screen |
![]() |
![]() |






