Embedding a video from YouTube using Galaxie Blog Video Directives
Apr 21 |
Embedding YouTube videos using Galaxie Blog Directives
While it is recommended to insert YouTube videos with the media editor, you can also embed YouTube videos with Galaxie Blog Directives.
I intend to use the capabilities of the Galaxie Blog Directives in a new markdown editor that I will incorporate in a future version. Additionally, the video directives provide backward compatibility with previous versions of Galaxie blog.
To embed a YouTube URL to the enclosure, simply grab the video URL from YouTube, and copy and paste the URL into the YouTube URL xml post directive into the Post Header interface:
<youTubeUrl>https://www.youtube.com=watch?v=LXt-hDDiEAQ&feature=youtu.be</youTubeUrl>
This snippet of code will initialize our Plyr and it will play the YouTube video file within Galaxie Blog. The video will be lazy-loaded, and will only load once the page loads and the video is downloaded to the client.
This video features an amazing performance by Chris Botti and Carolyn Campbell playing Kashmir on the violin. The video source is YouTube at https://www.youtube.com/watch?v=LXt-hDDiEAQ&feature=youtu.be.
Related Entries
Tags
Media Player, XML Post Directives, Media PlayerThis entry was posted on April 21, 2022 at 10:12 PM and has received 961 views.