Connection and integration in SmartPlayer using server events
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.
After clicking on the "Create" category, a new window will open, displaying the entire interface for creating a broadcast.
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.
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.
When creating a zone, a toolbar with zone settings will appear, allowing users to configure the zone's parameters.
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.
In the page settings, the user needs to find the line labeled "Event" and click on the "+" icon.
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:
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 |
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.
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.
Additional information can also be found on the page Как взаимодействовать пользователю с разделом "Обсуждения"