Sorry I made title too long as I'm trying to accomplish a lot of things in an attempt to play audio file from an url using AVPlayer in a modal view controller. I've used Apple's foundation example - AVFoundationSimplePlayer, tweaked it and added few things. Player works fine but I've few challenges to solve as described below:
Here is the complete source code Source Code of my project
1) Refer to screenshot below, I want the background of modal vc to be transparent so that I can see the view which launched this modal view.
2) There is delay after loading the modal vc and before the popup view appears with controls highlighted. I'm not sure if this is normal to have delay? If it's normal and we can't do anything about it then I want to add activity control during this loading period. I'm not sure when to stop this activity control.
3) There are errors shown before player loads the control. Not sure what they are?
2018-09-05 13:32:56.519014+0100 AVFoundationSimplePlayer-Swift[44042:2403222] Task .<2> finished with error - code: -999 2018-09-05 13:32:57.607560+0100 AVFoundationSimplePlayer-Swift[44042:2403221] Task .<3> finished with error - code: -999