I’m creating an audio participant for iOS utilizing Swift. At present, the participant can play DRM-protected movies, helps subtitles, and lets you change the audio observe. All these options are additionally obtainable when utilizing ChromeCast.
I want to add help for taking part in DRM protected movies by way of AirPlay. Regular movies work with out issues with AirPlay.
Regardless of intensive analysis, I’ve been unable to search out related or present data on this matter and the iOS documentation has not been useful.
Can anybody present steerage or sources on the best way to allow DRM protected video playback over AirPlay?
func launchAirPlay() {
let rect = CGRect(x: -100, y: 0, width: 0, top: 0)
let airplayVolume = MPVolumeView(body: rect)
airplayVolume.showsVolumeSlider = false
self.view.addSubview(airplayVolume)
for view: UIView in airplayVolume.subviews {
if let button = view as? UIButton {
button.sendActions(for: .touchUpInside)
break
}
}
airplayVolume.removeFromSuperview()
pause()
}