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:
parent
bf9a0226be
commit
b915488651
@ -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)) {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user