Black Screen Detector (System Administrator)

Материал из SmartPlayer
Версия для печати больше не поддерживается и может содержать ошибки обработки. Обновите закладки браузера и используйте вместо этого функцию печати браузера по умолчанию.

Situation Description

Users are experiencing issues with broadcasts on their devices. When playing content on some devices, a "black" screen appears. This problem can be observed in the user's personal account or at the device's location.

Cause

On devices operating on-site, a "black screen" appears during content playback. Meanwhile, the broadcast in the personal account continues to run but only displays a "black" screen.
This situation arises due to various errors when starting the broadcast. The reasons for such problems can vary and are very difficult to detect.
Any of the following actions can be a cause:

  • A user uploads a video, but this video uses a codec unsupported by the system. As a result, the video simply cannot start and displays a black screen. There are issues related to the client application (a bug), leading to broadcast problems
  • As long as there is a consistent, stable network, everything works fine. However, as soon as the device loses network access (for any reason), the broadcast is interrupted, and a black screen appears.
An example of displaying a "Black" screen in the user's personal account

Frequency of the Problem

It's very easy to detect and visually confirm the "black" screen. In such cases, the personal account is very helpful.
The challenge with this situation is that it doesn't have a consistent frequency; it can occur once a month, or once every few days or even hours.
The period when the black screen appears is determined empirically and is confirmed on-site. The responsibility of finding the cause of the problem falls on technical specialists.

Solution Concept

To address the issue, it was decided to create an automatic "Black Screen Detector". It notifies of problems with content on the device and alerts about the occurred situation in the personal account.

This functionality is not available to the user in the personal account and needs to be activated separately.

Operating Principle

Every client/company has its own ID associated with the server. This ID is indicated in the personal account, and all the company's devices are linked to it.
After activating the functionality, the server sends an "event" to the devices at specific time intervals.
When initiating the "event", the device checks for the presence of a "black" screen using the detector, taking a screenshot during the launch.
After launching the detector, two specific results can be obtained:

  • After initiating the "event", no black screen is detected - the system continues to operate in normal mode.
  • After initiating the "event", a black screen is detected - the server sends a secondary, verification "event".

The interval for resending the "event" is 10 seconds.
If a black screen is detected again during the second check, the server sends an email alerting about the issue.

The specified email should be linked to the server.

Preparation

The system administrator must configure the server application based on two parameters:

  • Launch and operation of the "black screen" detector
  • Setting up email alerts for detected errors

Operating Principle

If the server application detects a black screen, it sends an email. The result of this check will be an email notification about the issue.
To confirm the functionality check via the personal account, the system administrator can set a black picture. The server continues to send notifications until the problem is resolved or the functionality is turned off.
Subsequently, the system administrator must take measures to resolve the issue.

Nuances and Subtleties in Functional Operation

1. For correct operation, it is necessary for the placeholder with a white dot to be perceived as a black screen. Therefore, an absolute check is not used.
2. It's relevant only during video playback. If there are root rights on the device, the detector works fine. However, if there are no root rights on the device, the detector won't be able to take a screenshot.
Exceptions:
Screenshot is available:

  • If the application is signed with the "developer's signature" (rights level – Signage).
  • Some devices (Vestel, Hikvision, Phillips) can take a screenshot without root rights due to firmware features.

3. If a user tries to take a screenshot without root rights, an "empty screenshot" is created with the inscription "Video is playing. No rights to take a screenshot".
4. Information from the server to the developers is sent through an "event". Inside the sent "event", the server awaits a callback from the developers.
5. The default "Callback" timeout on the server is 30 seconds.

Implementation

Activation

By default, the detector for all companies is turned off on the server, as it places too much load on it.

The detector is activated only upon request from a company that has encountered the black screen issue.

Action Algorithm

All work will be carried out in two stages.
The first stage is the launch of the detector itself..
When launching the detector, you need to use the company ID, which is indicated in the personal account.

Location of the company ID in the personal account

To do this, you need to go to the profile and expand detailed user information. The system administrator needs to connect to the server via the Command Line Interface (CLI).

When enabling the CLI, the server receives specific data for configuration:
This:

  • Company ID for which the detector is activated.
  • You can specify a platform (or multiple platforms) for which monitoring needs to be initiated.

For example: if you pass the "ANDROID" parameter, monitoring will be activated only for "ANDROID" devices.

  • E-mail address or multiple addresses to which a notification should be sent in case of an emergency.
  • Specified screenshot storage time (default is 3 days).

Next, you need to go to the server application and execute the command: docker exec -it smartplayer_backend_i bash. docker exec -it smartplayer_backend_i bash

Executable command "docker exec -it smartplayer_backend_i bash"

At this stage, we enter our container with the server application.
Next, execute the command:

Enable screen - screen monitor

Executable command"docker exec -it smartplayer_backend_i bash"

After the next step, the system displays the following line:

System message: Input company ID and press Enter

System message "Input company ID and press Enter:"

The executed command will display a line prompting you to input the company's ID.
After entering the ID, a request to monitor all of the company's platforms appears. In this case, choose "YES/Y".

Here you need to start platform monitoring by clicking "ДА/Y"

Subsequently, the console will require you to specify an e-mail address to which notifications about problems will be sent. This is done in the line:
Input_email and press enter

Here, you need to initiate platform monitoring by pressing "YES/Y".
The specified email must be linked to the server.

You can also specify the interval at which screenshots will be sent (for example, 1 minute). The line looks like this:
Input check interval in minutes (m) or seconds (s) and press "Enter"

Here, you need to specify the time in minutes with the prefix (m) or in seconds with the prefix (s).

Next, specify the time either in seconds with the prefix (s) following the numeric value, or in minutes with the prefix (m), and apply this setting by pressing "Enter". The result of all these manipulations will be the status:br> Company screen monitoring enabled - highlighted in gree. This means that the black screen detector is activated.

Detector launch notification is highlighted in green

Email Notifications

The second stage is setting up the notifications that come to the email. Notification settings are detailed in a separate instruction,Настройка отправки писем через серверное приложение SmartPlayer.

When receiving a problem notification via email, it's impossible to directly perform any actions from this alert. For instance, actions like "Screen Reboot" or "Stopping the broadcast" are not available.

Preliminary Actions

Depending on the result, the system administrator can accurately determine the cause and take specific actions to resolve the situation. If he is unable to solve the problem within his environment or if the problem is on our end, he should contact the SmartPlayer team.
This approach is convenient for everyone. It will help resolve issues whether they are on our side (e.g., an application bug) or on the user's side (e.g., the user incorrectly initiated the broadcast).

Important Information to Remember

To restart the broadcast, you need to log into the personal account and restart everything manually.
The black screen detector currently only works on Android version 1.63.1.

Final Outcome:

The client's system administrator will be able to launch and set up the black screen detector functionality and start resolving the problem. Having Having the detector allows monitoring the problematic situation with the "Black" screen and promptly work on its correction. This is relevant both for us and for the client's employees. The SmartPlayer team and the client-side employee team will be able to interact quickly to solve the problem.
Ordinary users will minimize the negative experience of interacting with our product.