public function withAutoplay(bool $autoPlay): self
    {
        if ($this->autoPlay == $autoPlay) {
            return $this;
        }

        $url = clone $this;
        $url->autoPlay = $autoPlay;

        return $url;
    }
public function withAutoplay(bool $autoPlay): self
    {
        if ($this->autoPlay == $autoPlay) {
            return $this;
        }

        $url = clone $this;
        $url->autoPlay = $autoPlay;

        return $url;
    }
public function withAutoplay ( bool $ autoPlay ) : self { if ( $ this -> autoPlay == $ autoPlay ) { return $ this ; } $ url = clone $ this ; $ url -> autoPlay = $ autoPlay ; return $ url ; }
Override the player's autoplay setting for this URL.

@see https://docs.theplatform.com/help/player-player-autoplay

@param bool $autoPlay True to enable autoPlay, false otherwise.

@return Url
Override the player s autoplay setting for this URL .