How to integrate your own video content to Galaxie Blog
Galaxie Blog supports the following video types: .mp3 , .mp4, .ogg, .ogv and .webm. If you have the video in another legacy format, you'll need to convert it to a modern format to play it in Galaxie Blog.
If you have a supported video format, you can either upload the video by clicking on the Add Enclosure, or by using the file uploader in the Galaxie Blog administrative interface. However, the Add Enclosure method will only work if the video is smaller than around 3MB.. You can use your own FTP tools to upload the video if that is what you prefer.
You can also host videos that are stored on a different server, but you'll need to specify the cross-origin true argument using a Galaxie Blog Post Directive.
Though completely optional, if you want the video's to be optimized for different client devices, just like responsive images, you can use up to three videos with different sizes. Galaxie Blog supports 576p, 720p, and High Definition 1080p video formats.
Once you have the video(s) on a server, you will need to use the proper URL xml post directives
The following Galaxie Blog Post XML Directives were used to play the video that you see on top of this blog post.
- The videoType directive is necessary. Here I set it to ".mp4"
- The videoPosterImageUrl directive completely optional. This is used to 'cover' the video with an image until it is played. I used an image of the video to cover the video and specified the URL.
- Since my video format is 720p, I used the mediumVideoSourceUrl directive.
- You can use one argument, two, or all three to have a responsive video. You will need at least one argument for the video to play
- Use smallVideoSourceUrl for 576p
- Use mediumVideoSourceUrl for 720p
- Use largeVideoSourceUrl for 1080p
- Or use all three arguments if you want the video to be responsive
- This video is hosted on the same domain, so I used false for the cross-origin argument. If you are integrating a video that is hosted on another server, set the videoCrossOrigin to true.
This snippet of code will initialize our Plyr and it will play the 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.
As with all Galaxie Blog video's, the video will automatically play when your looking at an individual post, and requires the user to click on the play button when your looking at the post from the main blog page. You can easily change this behavior by editing the code, or by making a suggestion here.
Note: the xml post directives will be deprecated in a later version
This entry was posted on December 16, 2019 at 1:32 PM and has received 481 views.