3

I created IOS app for live streaming with use of AVPlayer. I add the airplay routes button with help of MPVolumeView.

After update of IOS 11, airplay routes button not coming up properly on screen. Sometime it show on screen sometimes not showing on screen

Anybody help me with it, is it IOS 11 issues or their some change need to MPVolumeView done in my code.

I am using AVPlayerViewController, in which i added MPVolumeView as subview.

self.airButton.frame = CGRect(x:0,y:0,width:45,height:45) 
 self.airButton.backgroundColor = UIColor.green  
 let volumeView = MPVolumeView(frame : self.airButton.frame )
 volumeView.showsVolumeSlider = false
 volumeView.showsRouteButton = true
 volumeView.backgroundColor = UIColor.red
 self.airButton.addSubview(volumeView)
 self.airButton.translatesAutoresizingMaskIntoConstraints = false
 self.controlView.addSubview(airButton)

Thanks

0 Answers0