Streaming Your Sardius Feed to Your Wordpress Site
Wordpress is one of the most accessible ways to create a webpage. Whether you've built a site using Wordpress for your church, ministry, or organization, or a personal webpage (maybe for a senior pastor or a guest speaker for your conference), you can still embed the Sardius player to your site and direct your audience to it.
Setting Up Your Stream / Channel
The first thing you will want to do is download the Sardius Live plugin for Wordpress. This isn't available from the Wordpress store. A member of Sardius Support is happy to provide that plugin for you, or you can download it at the bottom of this page!
Next, login to your Wordpress site and navigate to the Plugins section. Add a new Plugin.
Next, click Upload Plugin.
Then follow the steps to install the plugin. Make sure the new plugin is activated.
Once that is done, navigate to the Pages tab in Wordpress and choose the page that you would like to add the video feed to. If necessary, go ahead and create a new page.
If needed, give the page a title. In the page editor field, simply type the following code: [sardius_live slug="slugGoesHere"]
"slugGoesHere" will be replaced with the subdomain of your Sardius Player URL.
For instance, in the picture below, the Sardius Player URL is yourchurchonlinepage.sardius.live. The slug here is yourchurchonlinepage. What you would post into your WordPress page would be [sardius_live slug="yourchurchonlinepage"]
Note: To determine your URL slug for your Channel Stream, simply log into the Sardius Control Panel, access the Channel you are wanting to stream to your Wordpress site, and click the Open Channel button. The URL in the window that appears will give you the URL. For more information on doing this, click here.
Once the code has been setup on your page, simply hit the Update button to update the WordPress page.
IMPORTANT: The styles from your Wordpress page may affect/override the styles on your Sardius Channel. To avoid this, you can choose to embed an iFrame of your video player to your page instead. An iFrame code can be found by clicking the Share button on your Calendar page within the Sardius Control Panel.
Note: The WordPress plug in will play the Channel Stream on your website. If no video is actively playing, what appears on your website will be dictated by what you have set up to display on your Channel, whether a countdown to the next service, a custom message, etc.
Using JavaScript
In order to add the Sardius Channel to any website, not just a WordPress site, using JavaScript, the coding is relatively easy, and the concept of changing out the URL slug is the same as above.
<div id="sardiusLiveApp" slug="slugGoesHere"></div>
<script> const slug=document.getElementById("sardiusLiveApp").getAttribute("slug"),init=async()=>{let t=await fetch("https://"+slug+".sardius.live?format=json"),s=await t.json();window.sardiusLive_site=s.site,window.sardiusLive_layout=s.layout;var e=document.createElement("script");e.setAttribute("type","text/javascript"),e.setAttribute("src","https://app.prod.sardius.media/app.min.js?ver=1"),document.head.appendChild(e)};init();
</script>
Simply replace "slugGoesHere" in the above block of code with your URL slug as outlined above and paste the code block into your website.