Authorization Widget

Материал из SmartPlayer
Версия от 10:35, 14 мая 2024; N.Bloshkin (обсуждение | вклад) (Новая страница: «== '''Widget Setup''' == The authentication widget is set up by the user upon entry. The Google authentication page will be used as an example. === '''Obtaining the Widget''' === The user receives the widget in the form of an archive. This archive is integrated into the personal account. <br> To add the widget archive, go to the "Content" section and the "Widgets" tab. Embedding is done by dragging and dropping the archive from the repository where it is sto...»)

Situation Description

A user may want to use content from their own website as broadcast content. To incorporate this content into the broadcast, they will likely need to go through an authentication process on their site. To avoid manual authentication and fully automate the process, an authentication widget was created.

The widget is compatible with portals that have a Google-like authentication logic

Widget Operating Logic

The widget is designed for use in panels that utilize Full HD resolution (1920X1080) and supports all "image" formats (JPEG, PNG)
  • Prepare the broadcast
  • Copy the URL link from the required web page for authentication
  • Expand the login input window using the "F11" key and take a screenshot
  • Similarly, expand the password input window using the "F11" key and take a screenshot
  • Log into the SmartPlayer personal account and create a folder in the "Content" section for the screenshots
  • Launch the widget following the instructions and enter the necessary data
  • Authenticate using the widget and use the content from the site in your broadcast within SmartPlayer
Файл:Логика.png.png
Widget operating logic
If the user is using a laptop, pressing "F11" might not result in any action. This is because the operating system may have "Function key lock" enabled by default. In such cases, to expand the browser window, press "Fn + F11".

Widget Setup

The authentication widget is set up by the user upon entry. The Google authentication page will be used as an example.

Obtaining the Widget

The user receives the widget in the form of an archive. This archive is integrated into the personal account.
To add the widget archive, go to the "Content" section and the "Widgets" tab. Embedding is done by dragging and dropping the archive from the repository where it is stored into the personal account window.
After this, the widget will be stored within the user's personal account.

Example of dragging the widget into the personal account

Creating a Broadcast

Before using the widget, the user needs to create a broadcast into which the widget will be placed. Detailed information on creating a broadcast can be found on the Раздел "Трансляции" page.

Adding the Widget

Once the user has set up the broadcast, they need to add the widget.

  • The user clicks on the workspace and finds the "content" line on the right side of the screen. This line features several folders with sorted content and the main folder with all content uploaded to the system.
  • In the list, select the required widget. Using drag-and-drop, move it to the workspace.
  • In the "Content Settings" tab on the right side of the screen, set the duration to 10400 seconds.
Finding the widget in the "Content" section
Dragging the widget into the workspace

Preparing the Background

Open the Google authentication page in the browser and enable full-screen mode (default is F11). Then take a screenshot of the expanded screen.
The next step is to enter the login and go to the password entry page, similarly taking a screenshot of the screen.
Create a separate folder in the "Content" tab and add the created screenshots.

Screenshots should be taken in full-screen mode, capturing the entire screen area; otherwise, the authentication fields may not align.
Each time the authentication widget is added and used, the correctness of the field positioning within Google should be checked. Since the Google authentication page is frequently updated, the display of the fields may change.
Ready backgrounds for login and password on the example of Google

Работа с виджетом

Настройка виджета

Пример перехода в раздел настройки
Настройка виджета производится только после всех действий, указанных выше в статье.

Открыв виджет пользователь увидит области на экране, которые сможет перемещать.
Справа вверху пользователю нужно нажать на иконку "шестеренка/настройки" и открыть окно настройки параметров виджета.
В открывшемся списке настроек необходимо обязательно указать (все значения указаны в пикселях "px"):

  • Адрес страницы авторизации.
  • Заполнить строки "Значение поля логина" и "Значение поля пароль". Также можно воспользоваться альтернативным вариантом и заполнить данные на окне подложки.
  • Проскроллив вниз страницу настроек и пользователь выбирает папку, где хранятся скриншоты страницы авторизации с логином и пароелм. Обязательно нажимает кнопку "Сохранить" и кнопку "Применить настройки".
  • После сохранения настроек отобразятся сделанные скриншоты и их поля, в которых будут указаны данные прописанные в настройках.
  • Внизу слева появится переключатель скриншотов подложки.
Поля которые обязательно надо заполнить
Поля выбора источников с контентом и применения настроек

Взаимодействие с подложками

Пользователь выбирает скриншот с логином. Данный скриншот обычно идёт как "Scrennshot 1". В этом скриншоте совмещаем контуры окна "логин" и подставляем его в поле "логин" на скриншоте.
Следующим шагом совмещаем кнопку "Далее" с полем "Next".
Перейди на следующий скриншот "Scrennshot 2", пользователь также совмещает по контурам поле «пароль» с полем «пароль» на скриншоте.
Нажимаем на кнопку «далее» на скриншоте с паролем и подставляем «Authorize».
Далее нажимает на кнопку «Сохранить».
Финальным шагом пользователь дает название трансляции, сохраняет ее и запускает на устройстве.

Подложка где сопоставляют поля и переключают подложки

Внешний вид виджета

Виджет использует в качестве рабочего экрана область скриншота. Он состоит из четырёх блоков:

  1. Логин - прямоугольная область с данными. В эту строку вставляется электронная почта. Совмещаем с областью "логина" на скриншоте
  2. Пароль - прямоугольная область с данными. В данную строку прописывают пароль. Совмещаем с областью "пароля" на скриншоте.
  3. Authorize - прямоугольная область, которая производит нажатие кнопки (кликер). Совмещаем с кнопкой "авторизация" на скриншоте.
  4. Next - прямоугольная область, которая производит нажатие кнопки (кликер). Совмещаем с кнопкой "далее" на скриншоте
  5. Click - прямоугольная область, которая позволяет производить дополнительное действие клика на любой области виджета.
Пример отображения областей виджета авторизации

Видеоинструкция

Итоговый результат

Пользователь данной функциональности сможет автоматически проходит авторизацию на своем сайте и использовать нужный ему контент со своего сайта.