telegramBot::sendVideo PHP Method

sendVideo() public method

Send Video.
public sendVideo ( integer $chat_id, string $video, integer $duration = null, string $caption = null, integer $reply_to_message_id = null, KeyboardMarkup $reply_markup = null ) : Array
$chat_id integer
$video string
$duration integer
$caption string
$reply_to_message_id integer
$reply_markup KeyboardMarkup
return Array
    public function sendVideo($chat_id, $video, $duration = null, $caption = null, $reply_to_message_id = null, $reply_markup = null)
    {
        $data = compact('chat_id', 'video', 'duration', 'caption', 'reply_to_message_id', 'reply_markup');
        if (!is_dir($video) && filter_var($video, FILTER_VALIDATE_URL) === FALSE) {
            return $this->sendRequest('sendVideo', $data);
        }
        return $this->uploadFile('sendVideo', $data);
    }