A video and audio player for iOS with DRM support.
View Demo
·
Report Bug
·
Request Feature
Tuna Player is an easy to use video player supports DRM. The purpose of the project is to simplify the development process of the video parts for the iOS apps which do not have video-first properties.
Features:
- HLS video and audio streaming
- Control Bar
- Digital Rights Management
- Reverse Proxy and Caching
Using Tuna Player for HLS playback is pretty easy.
- Create an instance of Tuna Player.
- For the first time use the player should be created.
- The player should be added to a UIView.
- Before playing a content the corresponding URL must be set. The playback won't start automatically.
var tunaPlayer = TunaPlayer()
tunaPlayer.createPlayer { [weak self] in
guard let player = self?.tunaPlayer.getPlayer() else {
return
}
playerView.addSubview(player)
tunaPlayer.setUrl(contentUrl)
tunaPlayer.play()
}
DRM support is also pretty easy.
tunaPlayer.setLicenseUrl(licenseUrl)
tunaPlayer.setCertificateData(certificateData)
The backend requirements for DRM
- The license server should accept body keys as "spc" and "assetid".
- The response from the license server should have the key "ckc".
- SPM
https://github.com/onurtuna/TunaPlayer.git
- Manual
Just copy and paste the XCFramework. Make sure the path is correct for framework search paths.
Distributed under the MIT License. See LICENSE
for more information.
Onur Tuna - @onurtuna
Project Link: https://github.com/onurtuna/TunaPlayer