Dynamic content via RSS feed (custom version)

Материал из SmartPlayer

Description of the Situation

Periodically, users have the need to display some additional text information on the device along with the main broadcast. To do this, dynamic content can be launched through the RSS feed in the broadcast.

'What It Can Be Used For

Such content is well suited for several formats::

  • Displaying static text content on devices
  • Displaying dynamic content (running lines) on devices
  • Creating "content" similar to an information board and subsequently displaying it on devices

Workflow Logic

  1. First, the system administrator sets up the user's application through RSS.
  2. Next, the user needs to create a suitable type of content described above in their personal account.
  3. The next step is "Creating a broadcast".
  4. The penultimate action will be creating a schedule for the broadcast.
  5. Displaying the necessary content on devices.
Functional logic

Working Principle

Initially, it is necessary for the client-side system administrator to set up the correct operation of the server with RSS and the ability to connect to our server via API.

After the client's system administrator has set up the client's application to work with RSS, the user can start preparing content to be displayed on the device.
To do this, they need to go to the "Content" section in their personal account and view the available content options. They need to choose text content.
By clicking on the "Add new text" button, a new page with parameters that need to be configured will open.

Path to text content

"Text" Content Setup

Preparation

Location ID - Company

To start, the system administrator on the user's side should have already set up the operation using an RSS request and sent the URL for API connection.
The URL will look something like this:
https://rc-api.smartplayer.org/v2/company-rss/feed/54
In this case, instead of the last digit (54) in the request, it is the Company ID. It can be viewed in the personal account on the user icon.

Working with "Text" Type Content"

First, you need to find the "Content" section and select the appropriate type of content in it. In our case, it's text.

Block "Content" in your personal account

The next step is for the user to create new text content using the button.

Text content

After clicking the "Add New Text" button, a settings window will open.

Text settings window

Inside the window, the first thing to pay attention to is the line - "Choose source type". In this line, we choose the "URL-source" option. After the performed manipulations, we insert our Swagger URL into the "RSS source" section and click the preview icon.

Source options
Swagger (or OpenAPI) is a tool for creating, documenting, and testing web APIs. It helps developers easily understand and work with APIs by providing a visual representation and automatically generated documentation.

Next, the SmartPlayer server parses the URL. The data from the parsed link will look something like this:

Example of a parsed URL


The next step is to choose the right line to create a query template from it.

An example of the required string for the template


After clicking on the highlighted line, a template with parameters will be formed. It will be displayed in the empty line at the top. Before the parameters, in the line, you need to specify in text what information will be displayed.

Example template

As a result, inside the template, there will be a static part of the line - which the user specifies, and a dynamic part of the line - which is the template.

Additional Features

If the user wishes, they can change the appearance of the content. The parameters that can be set are:

  • Update frequency (how often the SmartPlayer client application will contact the server for new data)
  • Font
  • Font size
  • Font color
  • Text alignment
  • "Bold" text
  • Italic text
  • Underlined text
List of settings for text editing

The last step is to click the "Save" button

Creating a Broadcast

The next step is to create a broadcast.
The user needs to go to the "Broadcasts" section.

Section "Broadcast" in your personal account

Next, they need to divide the "content window" into zones and fill them with the necessary content.

Content Zones

They substitute the content they need into a certain zone. Apart from the text with the information we set up above, the rest of the content can be anything.
Next, the user renames the broadcast and saves the settings by clicking on the save icon to the right of the title.

String to rename the broadcast

Creating a Schedule for the Device

To create a schedule, the user needs to find their device in the "Device" section. After selecting their device, they find the "Schedule" section in the list.

Path to schedule

Upon entering the pop-up window, the user will see a calendar where they will need to select a date and click "Add New".

Adding a schedule

Next, a window with basic schedule parameters will open.

Standard schedule options

Additional schedule parameters can be seen by clicking on the "More" button.

Expanded schedule parameters

After setting all the parameters, the "Save" button must be pressed.
After all the manipulations, the necessary information should be displayed on the device according to the schedule.

Final Result

The information necessary for the user is displayed on the devices and is automatically updated, without additional settings and manipulations.