HTML5 Web Component for Embedding YouTube Videos

HTML5, CSS3 and JavaScript

The Fine Art of Web Development by Martin Ivanov

Continuing the experiments with HTML5 Web Components I started a few weeks ago, I am happy to present my latest endeavor – HTML5 Web Component, which can be used to embed YouTube videos as a custom tags:

[sourcecode language=”xml”]
<acidjs-youtube videoid="wvHsX2lSW64"></acidjs-youtube>
[/sourcecode]

youtube-video-html5-web-component

The component utilizes YouTube’s embedding API, and all of the parameters are supported as HTML attributes. Only videoid is required, the rest in the list are optional:

Here’s a link to the demo and to the code in case you want to play with it. If you are interested in the relatively new technology of HTML5 Web Components you may want to check my other posts related to this topic.

Enjoy and thanks for stopping by!

Categories and Tags
Links

© 2006 - 2023 Martin Ivanov