diff --git a/Browser/FormBrowser.cs b/Browser/FormBrowser.cs index d4ff2ef3..1ce62f5a 100644 --- a/Browser/FormBrowser.cs +++ b/Browser/FormBrowser.cs @@ -2,6 +2,7 @@ using System.Diagnostics; using System.Drawing; using System.IO; +using System.Text.RegularExpressions; using System.Threading.Tasks; using System.Windows.Forms; using CefSharp; @@ -455,6 +456,10 @@ public void SaveVideo(string url, string username) { } public void PlayVideo(string videoUrl, string tweetUrl, string username, IJavascriptCallback callShowOverlay) { + if (Arguments.HasFlag(Arguments.ArgHttpVideo)) { + videoUrl = Regex.Replace(videoUrl, "^https://", "http://"); + } + string playerPath = Config.VideoPlayerPath; if (playerPath == null || !File.Exists(playerPath)) { diff --git a/Configuration/Arguments.cs b/Configuration/Arguments.cs index 658e61a5..83ec2cee 100644 --- a/Configuration/Arguments.cs +++ b/Configuration/Arguments.cs @@ -7,6 +7,7 @@ static class Arguments { public const string ArgDataFolder = "-datafolder"; public const string ArgLogging = "-log"; public const string ArgIgnoreGDPR = "-nogdpr"; + public const string ArgHttpVideo = "-httpvideo"; public const string ArgFreeze = "-freeze"; // internal args