1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-04-09 06:15:49 +02:00

Add command line argument to use http:// for video playback in case WMP has issues with https://

This commit is contained in:
chylex 2022-01-08 13:54:04 +01:00
parent bf9a0226be
commit b915488651
Signed by: chylex
GPG Key ID: 4DE42C8F19A80548
2 changed files with 6 additions and 0 deletions
Browser
Configuration

View File

@ -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)) {

View File

@ -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