AVPlayer displays error and not able to use avplayerdelegate
You must have to import the AVFoundation above the class like below.
import AVFoundation
class ViewController: UIViewController,AVAudioPlayerDelegate{
import AVFoundation
class ViewController: UIViewController,AVAudioPlayerDelegate{
}
If you want to use the AVplayer inside the app you must import the avfoundation and then use the avaudioplayerdelegate.Then you can access the avplayer delegate methods.You can hear the song in your app with melody or beat as per your mood.
Comments
Post a Comment