AudioHardware.cpp:1200:AudioObjectRemovePropertyListener: AudioObjectRemovePropertyListener: no object with given ID 0

Working on a project in swift, where I’m trying to initiate the AVPlayer, and for some reason it trows me an exception saying

AudioHardware.cpp:1200:AudioObjectRemovePropertyListener: AudioObjectRemovePropertyListener: no object with given ID 0.

  • Setting AVMutableVideoComposition instruction causes handler not to be called
  • How do I parse a JSON object that has type-dependent sub-objects, in Swift?
  • How can I use Realm with Swift 4?
  • Encode/Decode Array of Types conforming to protocol with JSONEncoder
  • How to check internet connection in Swift 3 or Swift 4?
  • Failed to load optimized model - GoogleMaps SDK IOS
  • I guess the issue is with my URL. Here is my code

    func initPlayer() {
        let url:NSURL = NSURL(string:"https://purelight1-163000.appspot.com/api/user/v2/media/track/60/sample")!
        self.playerItem = AVPlayerItem(url: url as URL)
        self.player=AVPlayer(playerItem: self.playerItem!)
        let playerLayer=AVPlayerLayer(player: self.player!)
        playerLayer.frame = CGRect(x: 0, y: 0, width: 10, height: 50) // actually this player layer is not visible
        self.view.layer.addSublayer(playerLayer)
    }