Version 1.1 of the Subsplash Plugin for RockRMS now allows for one-way sync of videos from your Subsplash Media library to RockRMS. Any media item uploaded and published in the Subsplash dashboard will automatically be synced into Rock and become available to embed as a Media Element. Subsplash does not currently support Libraries or Folders so all media will be imported into a “Media Items” folder.
Setup in Rock
In your Rock admin (v13 or newer), go to the toolbox menu, and select “CMS Configuration” in the menu. Then select Media Accounts and click the “+” button to add a new account that will be synced with Subsplash. Set the Account Type to “Subsplash Media Account” and then enter the following fields from the information you received from Subsplash:
App Key
Client Id
Client Secret
Syncing Media
By default, Rock’s “Sync Media” job will run every 2 hours and is configured to run a Full Sync every 24 hours and a quick sync otherwise. The quick sync will sync any media items that have been created or updated since the last time the job ran. This can be adjusted by updating the “Sync Media” job in the toolbox menu by navigating to System Settings → Job Administration → Sync Media.
There are two manual ways to sync media:
A full sync can be triggered manually using the download icon button in the Media Account configuration
Any place where a Media Element field type is used, both Folders and Media Elements can be synced using the refresh button.
Embedding Media
There are a couple of different ways to embed media. Using Subsplash’s media embed within a Content Channel is simple and easy but will require fetching a CustomUrl from Subsplash Dashboard. To find/change the Custom URL, follow these instructions:
Login to the dashboard: https://dashboard.subsplash.com/
Using the menu, navigate as follows: Web → Web App
In the “Basic Info” section, copy the Custom URL setting into the code below:
{% assign CustomUrl = '[Fetch from Subsplash Dashboard]' %} {% assign MediaItemShortCode = Item | Attribute:'MediaItem','SourceKey' %} <div class="sap-embed-player"> <iframe src="<https://subsplash.com/+{{AppShortCode}}/embed/mi/+{{MediaItemShortCode}}?audio&video&logoWatermark"frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> </div> <style type="text/css"> div.sap-embed-player{position:relative;width:100%;height:0;padding-top:56.25%;} div.sap-embed-player>iframe{position:absolute;top:0;left:0;width:100%;height:100%;} </style>
Using the default Rock short code, in a content channel is also possible by fetching the attribute’s raw value (guid) and passing it to the shortcode:
{% assign mediaElement = Item | Attribute:'MediaItem','RawValue' %} {[ mediaplayer media:'{{ mediaElement }}' autoresumeindays:'14' combineplaystatisticsindays:'14' width:'100%' ]}{[ endmediaplayer ]}
Syncing Analytics
Analytics for the Rock embed will be captured in Rock and then synced to Subsplash automatically when the Sync Media job runs. This sync is one-way and will show up in the Subsplash Dashboard as a Web Embed view: