public function cookies($useCookies = true)
    {
        if (!$useCookies && $this->getType() == static::TYPE_PLAYLIST) {
            throw new AudioPlayerException('Can not disable cookies with playlists.  YouTube limitation.');
        }

        if ($useCookies) {
            $this->cookies = true;
        } else {
            $this->cookies = false;
        }

        return $this;
    }
public function cookies($useCookies = true)
    {
        if (!$useCookies && $this->getType() == static::TYPE_PLAYLIST) {
            throw new AudioPlayerException('Can not disable cookies with playlists.  YouTube limitation.');
        }

        if ($useCookies) {
            $this->cookies = true;
        } else {
            $this->cookies = false;
        }

        return $this;
    }
public function cookies ( $ useCookies = true ) { if ( ! $ useCookies && $ this -> getType ( ) == static :: TYPE_PLAYLIST ) { throw new AudioPlayerException ( 'Can not disable cookies with playlists.  YouTube limitation.' ) ; } if ( $ useCookies ) { $ this -> cookies = true ; } else { $ this -> cookies = false ; } return $ this ; }
Set Cookies
Choose whether or not to allow YouTube to collect cookies.

@param bool $useCookies

@throws AudioPlayerException

@return $this
Set Cookies Choose whether or not to allow YouTube to collect cookies .