             
             NotificationCenter.default.addObserver(self, selector: #selector(self.playerDidFinishPlaying(note:)), name: NSNotification.Name.AVPlayerItemDidPlayToEndTime, object: item)
             
-             observerStatus = item.observe(\.status, changeHandler: { [weak self] (item, value) in
+            observerStatus?.invalidate()
+            observerStatus = item.observe(\.status, changeHandler: { [weak self] (item, value) in
                  switch item.status {
                  case .unknown:
                      debugPrint("status: unknown")
                  case .readyToPlay:
                      debugPrint("status: ready to play")
+
+                     
+                     let audioDurationSeconds = CMTimeGetSeconds(item.duration) //CMTimeGetSeconds(asset.duration)
+                     self?.channel.invokeMethod(Music.METHOD_CURRENT, arguments: ["totalDuration": audioDurationSeconds])
+                     
+
                      if(autoStart == true){
                         self?.play()
                      }

    
    let channel: FlutterMethodChannel
    let registrar: FlutterPluginRegistrar
    var didSendDuration = false
    var player: AVPlayer?
    
    var observerStatus: NSKeyValueObservation?

        //log("updateTimer");
        if let p = self.player {
            if let currentItem = p.currentItem {
                self.currentTime = CMTimeGetSeconds(currentItem.currentTime())
            }
        }
