public function addTrack($track, int $position = null): QueueInterface
    {
        # If a simple uri has been passed then convert it to a Track instance
        if (is_string($track)) {
            $track = $this->trackFactory->createFromUri($track);
        }

        if (!$track instanceof UriInterface) {
            $error = "The first argument to addTrack() should be an object that implements " . UriInterface::class;
            throw new \InvalidArgumentException($error);
        }

        if ($position === null) {
            $position = $this->getNextPosition();
        }

        $this->soap("AVTransport", "AddURIToQueue", [
            "UpdateID" => 0,
            "EnqueuedURI" => $track->getUri(),
            "EnqueuedURIMetaData" => $track->getMetaData(),
            "DesiredFirstTrackNumberEnqueued" => $position,
            "EnqueueAsNext" => 0,
        ]);

        return $this;
    }