         output["album"] = data["album"].stringValue
         output["cover"] = data["cover"].stringValue
         output["url"] = url
+        output["currentTime"] = item.currentTime
+        output["duration"] = item.duration
         
         switch item.status {
         case .readyToPlay:
-        // Player item is ready to play.
+            // Player item is ready to play.
             output["status"] = 1
         case .failed:
-        // Player item failed. See error.
+            // Player item failed. See error.
             output["status"] = 2
         case .unknown:
             // Player item is not yet ready.

            avQueuePlayer.play();
        }

        

        pluginResult = CDVPluginResult(
            status: CDVCommandStatus_OK

            print("an error occurred when setting audio session category.\n \(error)")
        }

        // MPNowPlayingInfoCenter
        UIApplication.shared.beginReceivingRemoteControlEvents()

        NotificationCenter.default.addObserver(self, selector: #selector(self.updateSongStatus), name: NSNotification.Name.AVPlayerItemDidPlayToEndTime, object: self.avQueuePlayer.currentItem)

        self.commandDelegate!.send(
            pluginResult,
            callbackId: command.callbackId
        )
    }

    deinit {
        if avQueuePlayer != nil {
            NotificationCenter.default.removeObserver(self, name: NSNotification.Name.AVPlayerItemDidPlayToEndTime, object: self.radioPlayer.currentItem)
        }
    }

    @objc(clearPlaylist:)
