<acidjs-youtube videoid="wvHsX2lSW64"></acidjs-youtube>
[/sourcecode]
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:
videoid
– ID of the video (required), as in the url: https://www.youtube.com/watch?v=wvHsX2lSW64width
– Player width (optional). Default: 640height
– Player height (optional). Default: 390theme
– Player theme (optional) “dark” or “light”. Default: “dark”showinfo
– Display author and uploader info (optional) – 0 or 1. Default: 1loop
– Continuously play the video (optional) – 0 or 1. Default: 0end
– The time, measured in seconds from the start of the video, when the player should stop playing the video (optional). Default: 0autoplay
– Video auto play (optional) – 0 or 1. Default: 0autohide
– Indicates whether the video controls will automatically hide after a video begins playing (optional) 0 or 1 or 2. Default: 2rel
– Show related videos when playback of the initial video ends (optional) – 0 or 1. Default: 0.enablejsapi
– Make the JavaScript API available (optional) – 0 or 1. Default: 1Here’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!
© 2006 - 2023 Martin Ivanov