Connection and integration in SmartPlayer using server events

Материал из SmartPlayer

Situation Description

This page allows potential partners to connect and integrate into the SmartPlayer platform, as well as configure the ability to manage content using external events for broadcasts. By utilizing this functionality, the user can create more interactive and engaging broadcasts tailored to their needs.

Action Algorithm

Integration with the Server Application

Server Application Preparation:

  • Create a personal account on the required server application. When creating the account, set the role to "admin" with video analytics enabled.
  • Manually create a broadcast in the personal account and set up transitions for the necessary content and event values (actions for the events).

Programmatic Part:

  • When implementing the programmatic part, use "socket.io v.2." This solution is available at this link.

Personal Account:

  • Interaction with the personal account occurs via the protocols: http(s) and webSocket. Information about "socket.io v.2" is provided above.

Protocol Information:

  • restApi – used in most cases for authentication and file operations.
  • Socket.io – used by most methods for interacting with the personal account.

Authorization:

  • Information about obtaining the necessary tokens is available at this link.
  • Information on proper configuration for "join" is available at this link.

Fetching a Broadcast:

  • Using a specific event, you can retrieve a list of broadcasts. Information on retrieving the event is available at this link.

After receiving the data, you will need to select the desired event. From this object, take the ID, which will be used in the event described below.
Sending a Response Event:

  • The next step is to send another event, available at this link, with the necessary parameters.
    An event with the correct parameters should switch pages in the broadcast schedule.

Interaction with the Personal Account

After configuring the server-side, the user will be able to prepare events for broadcasting.
To begin working with events in the broadcast, the user must first log in to the personal account.
Next, the user should find the "Broadcasts" section in the personal account and select the "Create" category.

Example of the "Broadcasts" section and the "Create" category in the personal account

After clicking on the "Create" category, a new window will open, displaying the entire interface for creating a broadcast.

Example of the broadcast creation interface in the personal account

Next, the user must create the required number of pages based on their needs. This action is performed in the lower-left corner of the screen by clicking on the large "+" symbol.

Example of ready pages and the icon for adding new pages in the personal account

After creating the necessary pages, the user should select a zone for content on each page. This is done by clicking on the rectangular icon at the top of the screen.

Example of the content zone creation icon

When creating a zone, a toolbar with zone settings will appear, allowing users to configure the zone's parameters.

Example of the toolbar with settings for the zone

After selecting a zone for the content, the user can individually customize the zone based on their needs.
Once the above steps are completed, the user should select the content page and open the page settings by clicking on the icon in the lower-left part of the personal account. The page settings will also appear in the right-side toolbar, similar to the zone settings.

Example of the page settings icon

In the page settings, the user needs to find the line labeled "Event" and click on the "+" icon.

Example of the "Event" parameter line

This action will open a new window with a list of events for the page.

List of Events

Currently, three events are available, each with its own key parameter for activation:

Available Events
Event Keys Value
Face Recognition By Gender Gender Selection
RFID Tag By Identifier
By Payload
A value is specified in both cases
Server Application By Payload A value is specified
Example of the list of available events

After selecting the required parameter and its key, the user needs to click the "Save" button at the bottom of the window. The added events can be viewed under the "Events" parameter. All added events can be deleted using the trash can icon or edited using the pencil icon.

Example of icons for interacting with ready events for the page

Related Information

To fully utilize the functionality, the user must start a broadcast with a schedule and add the widget as content. To familiarize yourself with the steps previously described for creating a broadcast and schedule, it is recommended to review the following Wikipedia articles:

Video Instruction

Setting up a broadcast with events in the personal account

Additional Information

If this article does not help you use the functionality as intended or if you have any questions after reading it, you can ask them in the "Discussion" section at the top of the page.

Example of the "Discussion" tab on a wiki page

Additional information can also be found on the page Как взаимодействовать пользователю с разделом "Обсуждения"