added <head> and <meta> 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.
This commit is contained in:
Ravi Ranjan 2019-10-04 14:41:07 +01:00
parent 134ccf1bf9
commit dc49d8042b
2 changed files with 6 additions and 6 deletions

View File

@ -79,28 +79,28 @@
<serviceName>YouTube</serviceName> <serviceName>YouTube</serviceName>
<editorFormat xpp:if="version lt 15.4.3104.0816"> <editorFormat xpp:if="version lt 15.4.3104.0816">
<![CDATA[ <![CDATA[
<embed src="http://www.youtube.com/v/{videoId}" type="application/x-shockwave-flash" wmode="transparent" width="{width}" height="{height}"></embed> <embed src="http://www.youtube.com/embed/{videoId}" wmode="transparent" width="{width}" height="{height}"></embed>
]]> ]]>
</editorFormat> </editorFormat>
<editorFormat xpp:if="version gte 15.4.3104.0816"> <editorFormat xpp:if="version gte 15.4.3104.0816">
<![CDATA[ <![CDATA[
<embed src="http://www.youtube.com/v/{videoId}?hd=1" type="application/x-shockwave-flash" wmode="transparent" width="{width}" height="{height}"></embed> <embed src="http://www.youtube.com/embed/{videoId}?hd=1" wmode="transparent" width="{width}" height="{height}"></embed>
]]> ]]>
</editorFormat> </editorFormat>
<embedFormat xpp:if="version lt 15.4.3104.0816"> <embedFormat xpp:if="version lt 15.4.3104.0816">
<![CDATA[ <![CDATA[
<object width="{width}" height="{height}"><param name="movie" value="http://www.youtube.com/v/{videoId}&hl=en"></param><embed src="http://www.youtube.com/v/{videoId}&hl=en" type="application/x-shockwave-flash" width="{width}" height="{height}"></embed></object> <object width="{width}" height="{height}"><param name="movie" value="http://www.youtube.com/embed/{videoId}&hl=en"></param><embed src="http://www.youtube.com/embed/{videoId}&hl=en" width="{width}" height="{height}"></embed></object>
]]> ]]>
</embedFormat> </embedFormat>
<embedFormat xpp:if="version gte 15.4.3104.0816"> <embedFormat xpp:if="version gte 15.4.3104.0816">
<![CDATA[ <![CDATA[
<object width="{width}" height="{height}"><param name="movie" value="http://www.youtube.com/v/{videoId}?hl=en&hd=1"></param><embed src="http://www.youtube.com/v/{videoId}?hl=en&hd=1" type="application/x-shockwave-flash" width="{width}" height="{height}"></embed></object> <object width="{width}" height="{height}"><param name="movie" value="http://www.youtube.com/embed/{videoId}?hl=en&hd=1"></param><embed src="http://www.youtube.com/embed/{videoId}?hl=en&hd=1" width="{width}" height="{height}"></embed></object>
]]> ]]>
</embedFormat> </embedFormat>
<embedPatterns> <embedPatterns>
<pattern name="src"> <pattern name="src">
<![CDATA[ <![CDATA[
http://www.youtube.com/v/(?<id>[^&\?]*) http://www.youtube.com/embed/(?<id>[^&\?]*)
]]> ]]>
</pattern> </pattern>
</embedPatterns> </embedPatterns>

View File

@ -376,7 +376,7 @@ namespace OpenLiveWriter.PostEditor.Video
private static string CreateHtml(string html, string color) private static string CreateHtml(string html, string color)
{ {
return String.Format(CultureInfo.InvariantCulture, "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\"><body style='margin: 0; padding: 0;background-color: #{1}'>{0}</body></html>", html, color); return String.Format(CultureInfo.InvariantCulture, "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\"><head><meta content='IE=Edge' http-equiv='X-UA-Compatible'/></head><body style='margin: 0; padding: 0;background-color: #{1}'>{0}</body></html>", html, color);
} }
private void lblService_SizeChanged(object sender, EventArgs e) private void lblService_SizeChanged(object sender, EventArgs e)