How do I add a youtube video to my site's meta tag? - meta-tags

This post says it is easy to add a youtube video but I could not find any tips.
How to add facebook video into og:video meta tag?
Google says you should not add iframe tags to the head as on:
"Don't use invalid elements in the
No element other than the aforementioned is permitted by the HTML specification in the head. Common elements that appear in the head, rendering it invalid are:
iframe
img
We strongly recommend that you don't use these invalid elements in the head, but if you must, place these invalid elements after the ones you want Google to see. Once Google detects one of these invalid elements, it assumes the end of the head and stops reading any further elements in the head."
https://developers.google.com/search/docs/crawling-indexing/valid-page-metadata
I do see search results that indicate a site a video alongside. How can I do that?

just use the iframe tag and copy the youtube url into src it should look something like this
<iframe width="420" height="315"
src="https://www.youtube.com/embed/tgbNymZ7vqY">
</iframe>

Related

Youtube videos being rendered in MVC

Using K12SP and its MVC model, I would like adding embedded YouTube videos in my views. I saw that in the CKEditor, there is a widget for doing so and it adds corresponding customized HTMl tags such as :
{^widget|(name)YouTubeVideo|(VideoURL)https%3a%2f%2fwww.youtube.com%2fwatch%3fv%3diwqgcxc0r5gfTzgw%26list%3dPLKeH-azh54PWS4kozV421JGVhCd5yw9Ia|(Width)425|(Height)355|(AutoPlay)False|(widget_displayname)YouTube+video^}
However, in my view, I now need to process theis syntax to actually embed the video as for the time being, it is just showing the raw code. How can I do this? I searched for some tutorial but didn't find any.
Is there a place where front-end code for these default widgets of the rich editor is made available?
Thank you for your help
Sylvain
Why don't you use regular embed markup? E.g.
<iframe width="560" height="315" src="https://www.youtube.com/embed/GkagBXZQvOI" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
HTML is the same for all the videos, you'll need to inject video URL into it.
The inline widgets are not supported in the MVC approach. You still have the toolbar buttons in the CKEditor on the Content tab - but this is because you can also have a portal engine site in the same instance. So, this means, if you want to use the inline widgets, you will need to parse the text value when getting it from Kentico, extract the Youtube URL and basically replace the widget code with the HTML markup mentioned by Roman. It may be just easier to hide the toolbar buttons for widgets for your editors and let them just to insert the URL directly.

How to add "video element" in the template html in Weebly

I am out after adding a video element in the template level as it is possible to add a button element like the following;
{action:button}
Is there any way of doing it like this;
{media:video}
I am building a custom template, that's why I should statically give such elements in the HTML so that user can see that there is a video element in the content (it is mandatory) and s/he will edit the source of with the desired URL.
Unfortunately video is not a valid tag.
See:: https://dev.weebly.com/create-the-html-layout-templates.html
The only real option would be to use Weebly's built-in Sections feature, which allows the user to add a video as a background (if that was your intention).
The only other options would be to have them hardcode the URL of the video, in your Theme, have them use the Video Element or point them in the direction of the App Center so they can use an app that provides the feature.

how to get rid of MS Azure Media Services logo overlay (water mark)

How do you get rid of or replace the Microsoft Azure Media Services logo overlay (water mark) that is put onto dynamic packaged video? The following link shows the topic area:
https://azure.microsoft.com/en-us/documentation/articles/media-services-dynamic-packaging-overview/
My html contains embedded code taken from http://amsplayer.azurewebsites.net/azuremediaplayer.html
It seems that you are attempting to use the iframe embed code on the "get embed code" section of the player. Please note that this is currently under development, as it is listed on the site: "this embed code is for demo purposes only. Do not use in production."
For your player needs in production, especially if you want to use the large amounts of API's available, you should create your own player page following the instructions in the documentation and by using the samples provided.
Specifically for the question regarding the logo, there is an API available to remove to logo and can be found in the logo option section of the documentation. This is the correct way to remove to logo using the APIs provided.
It might be helpful to post some of the HTML that you are using when you say "My html contains embedded code taken from..."
It looks like the code on that page has the following div:
<div class="amp-logo" style="opacity: 0.5;"></div>
This appears to be what is placing the logo on the page you reference. Not know what HTML is actually in your page, I don't know if this is the HTML they are generating for you as embedded or whether you cut and paste the HTML from the given page.
You may be able to remove it from your HTML. If not, try creating a style that overrides the amp-logo class.

How to tell Microsoft Edge what it should display in reading mode

Reading mode in Spartan/Edge seems to choose, somehow, which div on the site to display in reading mode. In many pages, it does not find the appropriate div (like bbc.co.uk).
However, on our site, it enables reading mode, but then displays the completely wrong part of the page.
So - how can I tell it to take the right part or at least how to disable it on those pages
You can find information on how to optimize reading view, as well as how to opt-out, here: http://dev.modern.ie/testdrive/demos/readingview/
07/10: Edit to include specific information
Specifically, you may be interested in optimizing your title, body, and image markup to ensure a good reading mode experience.
Title
Your page should include a <title> element in the header. In addition, you should include a <meta title=""> tag that matches your main heading in your content section.
Body text
Ensure your main content does not include a lot of deeply nested elements and that font-sizes and other styles are uniform. Style variations for things like pull quotes, etc. should still be fine.
Images
The first eligible image becomes the dominant image of the article. The dominant image is rendered as the first piece of content and given full column width. All following images are rendered as inline images within the article.
Images are recommended to be wrapped in <figure> tags with no more than two <figcaption> tags.
Opting out
Including this meta tag will disable reading mode in IE11 and, currently, Microsoft Edge.
<meta name="IE_RM_OFF" content="true">
Add the following Tag
<meta name="IE_RM_OFF" content="true">
Check the Below for more details
http://dev.modern.ie/testdrive/demos/readingview/

How does browser detect embedded web content from a HTML page?

Once a browser gets the main html page, how does it know which are the embedded content should be request again from web server, and which are only external links? Is it based on type of tags, e.g ?
If so, could someone give me a reference of what these tags are?
Thanks.
The HTML5 spec defines the element category "Embedded content":
Embedded content is content that imports another resource into the document, or content from another vocabulary that is inserted into the document.
It lists the following elements:
audio
canvas
embed
iframe
img
math
object
svg
video
Elements like link or script (both in Metadata category) can also refer to other ressources that user-agents (browsers, screen-readers, …) are free to link to or include or do whatever they want to do with it. For example, browsers like Firefox or Chromium will (by default) load and "apply" CSS that is linked within the link element, that has the rel value = stylesheet. Browsers like Lynx or w3m won't do that. They simply ignore that link.
For link, HTML5 states which link types "are links to resources that are to be used to augment the current document, generally automatically processed by the user agent":
Two categories of links can be created using the link element: Links to external resources and hyperlinks. The link types section defines whether a particular link type is an external resource or a hyperlink.
Maybe also consider the style attribute (for inline CSS), which could include a background-image url.
Yes, the tags help browser identify the resources to load. After downloading/retrieving the content the browser determines what to do with the content based on the content-type header in the response.

Resources