diff --git a/TelegramBotBase/Sessions/DeviceSession.cs b/TelegramBotBase/Sessions/DeviceSession.cs
index bbe4e5a..059d040 100644
--- a/TelegramBotBase/Sessions/DeviceSession.cs
+++ b/TelegramBotBase/Sessions/DeviceSession.cs
@@ -453,7 +453,7 @@ namespace TelegramBotBase.Sessions
///
/// Sends an video
///
- ///
+ ///
///
///
///
@@ -480,6 +480,78 @@ namespace TelegramBotBase.Sessions
}
}
+ ///
+ /// Sends an video
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public async Task SendVideo(String filename, byte[] video, ButtonForm buttons = null, int replyTo = 0, bool disableNotification = false, ParseMode parseMode = ParseMode.Markdown)
+ {
+ if (this.ActiveForm == null)
+ return null;
+
+ InlineKeyboardMarkup markup = buttons;
+
+ try
+ {
+ MemoryStream ms = new MemoryStream(video);
+
+ InputOnlineFile fts = new InputOnlineFile(ms, filename);
+
+ var t = API(a => a.SendVideoAsync(this.DeviceId, fts, parseMode: parseMode, replyToMessageId: replyTo, replyMarkup: markup, disableNotification: disableNotification));
+
+ var o = GetOrigin(new StackTrace());
+ OnMessageSent(new MessageSentEventArgs(await t, o));
+
+ return await t;
+ }
+ catch
+ {
+ return null;
+ }
+ }
+
+ ///
+ /// Sends an local file as video
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public async Task SendLocalVideo(String filepath, ButtonForm buttons = null, int replyTo = 0, bool disableNotification = false, ParseMode parseMode = ParseMode.Markdown)
+ {
+ if (this.ActiveForm == null)
+ return null;
+
+ InlineKeyboardMarkup markup = buttons;
+
+ try
+ {
+ FileStream fs = new FileStream(filepath, FileMode.Open);
+
+ var filename = Path.GetFileName(filepath);
+
+ InputOnlineFile fts = new InputOnlineFile(fs, filename);
+
+ var t = API(a => a.SendVideoAsync(this.DeviceId, fts, parseMode: parseMode, replyToMessageId: replyTo, replyMarkup: markup, disableNotification: disableNotification));
+
+ var o = GetOrigin(new StackTrace());
+ OnMessageSent(new MessageSentEventArgs(await t, o));
+
+ return await t;
+ }
+ catch
+ {
+ return null;
+ }
+ }
+
///
/// Sends an document
///