From 134ccf1bf916a31ad6928494f6933e98d21820dd Mon Sep 17 00:00:00 2001 From: Ravi Ranjan Date: Fri, 4 Oct 2019 14:21:16 +0100 Subject: [PATCH 1/5] modified regex to allow https and youtu.be URLs --- .../OpenLiveWriter.PostEditor/Video/VideoProvidersB2.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/managed/OpenLiveWriter.PostEditor/Video/VideoProvidersB2.xml b/src/managed/OpenLiveWriter.PostEditor/Video/VideoProvidersB2.xml index f7c2f853..200f8623 100644 --- a/src/managed/OpenLiveWriter.PostEditor/Video/VideoProvidersB2.xml +++ b/src/managed/OpenLiveWriter.PostEditor/Video/VideoProvidersB2.xml @@ -111,7 +111,7 @@ [^&]*)|^http://(.+\.)?youtube.com/watch(\?|\#!)v=(?[^&]*)) + ((http|https)://www.youtube.com/user/[^#]*[^\n]*/(?[^&]*)|^(http|https)://(.+\.)?youtube.com/watch(\?|\#!)v=(?[^&]*)|^(http|https)://youtu.be/(?[^&]*)) ]]> From dc49d8042b42d4f6c3dcb840de55cb2bb604bb29 Mon Sep 17 00:00:00 2001 From: Ravi Ranjan Date: Fri, 4 Oct 2019 14:41:07 +0100 Subject: [PATCH 2/5] added and tags along with the meta attributes(content, http-equiv) removed the shockwave mime type from the embed tags (to take default HTML5 player) replaced /v/ with /embed/ in the Uri which has to be embedded, in order to preview and play youtube video in Insert Video from Web tab. --- .../Video/VideoProvidersB2.xml | 10 +++++----- .../OpenLiveWriter.PostEditor/Video/WebVideoSource.cs | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/managed/OpenLiveWriter.PostEditor/Video/VideoProvidersB2.xml b/src/managed/OpenLiveWriter.PostEditor/Video/VideoProvidersB2.xml index 200f8623..91dd1ba8 100644 --- a/src/managed/OpenLiveWriter.PostEditor/Video/VideoProvidersB2.xml +++ b/src/managed/OpenLiveWriter.PostEditor/Video/VideoProvidersB2.xml @@ -79,28 +79,28 @@ YouTube + ]]> + ]]> + ]]> + ]]> [^&\?]*) + http://www.youtube.com/embed/(?[^&\?]*) ]]> diff --git a/src/managed/OpenLiveWriter.PostEditor/Video/WebVideoSource.cs b/src/managed/OpenLiveWriter.PostEditor/Video/WebVideoSource.cs index 1514317a..90d90873 100644 --- a/src/managed/OpenLiveWriter.PostEditor/Video/WebVideoSource.cs +++ b/src/managed/OpenLiveWriter.PostEditor/Video/WebVideoSource.cs @@ -376,7 +376,7 @@ namespace OpenLiveWriter.PostEditor.Video private static string CreateHtml(string html, string color) { - return String.Format(CultureInfo.InvariantCulture, "{0}", html, color); + return String.Format(CultureInfo.InvariantCulture, "{0}", html, color); } private void lblService_SizeChanged(object sender, EventArgs e) From 94c29fdcfe24f1f83dad60e769d6797af075bd91 Mon Sep 17 00:00:00 2001 From: Ravi Ranjan Date: Thu, 10 Oct 2019 12:38:32 +0100 Subject: [PATCH 3/5] Changes made after review to make code cleaner and used ]]> - + - ]]> - - - - ]]> - - - + ]]> diff --git a/src/managed/OpenLiveWriter.PostEditor/Video/WebVideoSource.cs b/src/managed/OpenLiveWriter.PostEditor/Video/WebVideoSource.cs index 90d90873..6673df9f 100644 --- a/src/managed/OpenLiveWriter.PostEditor/Video/WebVideoSource.cs +++ b/src/managed/OpenLiveWriter.PostEditor/Video/WebVideoSource.cs @@ -376,7 +376,7 @@ namespace OpenLiveWriter.PostEditor.Video private static string CreateHtml(string html, string color) { - return String.Format(CultureInfo.InvariantCulture, "{0}", html, color); + return String.Format(CultureInfo.InvariantCulture, "{0}", html, color); } private void lblService_SizeChanged(object sender, EventArgs e) From b4b9d7046264775958e70dbad2529fbc12451505 Mon Sep 17 00:00:00 2001 From: Ravi Ranjan Date: Fri, 11 Oct 2019 09:03:05 +0100 Subject: [PATCH 4/5] removed element --- .../OpenLiveWriter.PostEditor/Video/VideoProvidersB2.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/managed/OpenLiveWriter.PostEditor/Video/VideoProvidersB2.xml b/src/managed/OpenLiveWriter.PostEditor/Video/VideoProvidersB2.xml index d7494b9c..b019e05a 100644 --- a/src/managed/OpenLiveWriter.PostEditor/Video/VideoProvidersB2.xml +++ b/src/managed/OpenLiveWriter.PostEditor/Video/VideoProvidersB2.xml @@ -84,7 +84,7 @@ + ]]> From 453d39cce83b6c349d972f6b433a7cd7137ee23c Mon Sep 17 00:00:00 2001 From: Ravi Ranjan Date: Fri, 11 Oct 2019 14:02:42 +0100 Subject: [PATCH 5/5] removed query parameter as it is not working with Google Blogger. --- .../OpenLiveWriter.PostEditor/Video/VideoProvidersB2.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/managed/OpenLiveWriter.PostEditor/Video/VideoProvidersB2.xml b/src/managed/OpenLiveWriter.PostEditor/Video/VideoProvidersB2.xml index b019e05a..ec45c226 100644 --- a/src/managed/OpenLiveWriter.PostEditor/Video/VideoProvidersB2.xml +++ b/src/managed/OpenLiveWriter.PostEditor/Video/VideoProvidersB2.xml @@ -84,7 +84,7 @@ + ]]>