i'm using AVPlayerViewController for playing audios. Reason for using it is that it provides and handles basic controls i.e. play/pause/slider/volume.
Now, i need to set background image of this view. Image will be fetched from some network location. i debugged AVPlayerViewController's view hierarchy. There's an image view. I'm not sure how to access that or even if it's possible
I don't want to use AVPlayer or AVAudio player as in that case i'll have to handle all the controls.How can i do that?
Yes you can customize AVPlayerViewController by customizing it's contentOverlayView.
Add UIImageView as contentOverlayView.Add button etc also if you want custom design for them too.
controller.contentOverlayView.addsubview(myImageView)
To cahnge color etc:
controller.contentOverlayView.backgroundColor = UIColor(red: 178/255, green: 178/255, blue: 122/255, alpha: 1)
for more check following link
Change AVPlayerViewController background to album artwork objective-c iOS
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With