Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display Settings: webOS/Tizen should have multiple video decoder setting #2924

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion lib/Controller/DisplayProfileConfigFields.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2024 Xibo Signage Ltd
* Copyright (C) 2025 Xibo Signage Ltd
*
* Xibo - Digital Signage - https://xibosignage.com
*
Expand Down Expand Up @@ -47,7 +47,7 @@

$changedSettings = [];

switch ($displayProfile->getClientType()) {

Check failure on line 50 in lib/Controller/DisplayProfileConfigFields.php

View workflow job for this annotation

GitHub Actions / phpcs

Blank line found at start of control structure

case 'android':
if ($sanitizedParams->hasParam('emailAddress')) {
Expand Down Expand Up @@ -298,8 +298,8 @@
}

if ($sanitizedParams->hasParam('isRecordGeoLocationOnProofOfPlay')) {
$this->handleChangedSettings('isRecordGeoLocationOnProofOfPlay', ($ownConfig) ? $displayProfile->getSetting('isRecordGeoLocationOnProofOfPlay') : $display->getSetting('isRecordGeoLocationOnProofOfPlay'), $sanitizedParams->getCheckbox('isRecordGeoLocationOnProofOfPlay'), $changedSettings);

Check warning on line 301 in lib/Controller/DisplayProfileConfigFields.php

View workflow job for this annotation

GitHub Actions / phpcs

Line exceeds 120 characters; contains 309 characters
$displayProfile->setSetting('isRecordGeoLocationOnProofOfPlay', $sanitizedParams->getCheckbox('isRecordGeoLocationOnProofOfPlay'), $ownConfig, $config);

Check warning on line 302 in lib/Controller/DisplayProfileConfigFields.php

View workflow job for this annotation

GitHub Actions / phpcs

Line exceeds 120 characters; contains 172 characters
}

if ($sanitizedParams->hasParam('videoEngine')) {
Expand Down Expand Up @@ -494,12 +494,12 @@

if ($sanitizedParams->hasParam('authServerWhitelist')) {
$this->handleChangedSettings('authServerWhitelist', ($ownConfig) ? $displayProfile->getSetting('authServerWhitelist') : $display->getSetting('authServerWhitelist'), $sanitizedParams->getString('authServerWhitelist'), $changedSettings);
$displayProfile->setSetting('authServerWhitelist', $sanitizedParams->getString('authServerWhitelist'), $ownConfig, $config);

Check warning on line 497 in lib/Controller/DisplayProfileConfigFields.php

View workflow job for this annotation

GitHub Actions / phpcs

Line exceeds 120 characters; contains 144 characters
}

if ($sanitizedParams->hasParam('edgeBrowserWhitelist')) {
$this->handleChangedSettings('edgeBrowserWhitelist', ($ownConfig) ? $displayProfile->getSetting('edgeBrowserWhitelist') : $display->getSetting('edgeBrowserWhitelist'), $sanitizedParams->getString('edgeBrowserWhitelist'), $changedSettings);
$displayProfile->setSetting('edgeBrowserWhitelist', $sanitizedParams->getString('edgeBrowserWhitelist'), $ownConfig, $config);

Check warning on line 502 in lib/Controller/DisplayProfileConfigFields.php

View workflow job for this annotation

GitHub Actions / phpcs

Line exceeds 120 characters; contains 146 characters
}

if ($sanitizedParams->hasParam('embeddedServerAllowWan')) {
Expand All @@ -508,8 +508,8 @@
}

if ($sanitizedParams->hasParam('isRecordGeoLocationOnProofOfPlay')) {
$this->handleChangedSettings('isRecordGeoLocationOnProofOfPlay', ($ownConfig) ? $displayProfile->getSetting('isRecordGeoLocationOnProofOfPlay') : $display->getSetting('isRecordGeoLocationOnProofOfPlay'), $sanitizedParams->getCheckbox('isRecordGeoLocationOnProofOfPlay'), $changedSettings);

Check warning on line 511 in lib/Controller/DisplayProfileConfigFields.php

View workflow job for this annotation

GitHub Actions / phpcs

Line exceeds 120 characters; contains 309 characters
$displayProfile->setSetting('isRecordGeoLocationOnProofOfPlay', $sanitizedParams->getCheckbox('isRecordGeoLocationOnProofOfPlay'), $ownConfig, $config);

Check warning on line 512 in lib/Controller/DisplayProfileConfigFields.php

View workflow job for this annotation

GitHub Actions / phpcs

Line exceeds 120 characters; contains 172 characters
}

break;
Expand Down Expand Up @@ -655,7 +655,7 @@
break;

case 'lg':
case 'sssp':

Check failure on line 658 in lib/Controller/DisplayProfileConfigFields.php

View workflow job for this annotation

GitHub Actions / phpcs

The CASE body must start on the line following the statement

if ($sanitizedParams->hasParam('emailAddress')) {
$this->handleChangedSettings('emailAddress', ($ownConfig) ? $displayProfile->getSetting('emailAddress') : $display->getSetting('emailAddress'), $sanitizedParams->getString('emailAddress'), $changedSettings);
Expand All @@ -679,12 +679,12 @@

if ($sanitizedParams->hasParam('updateStartWindow')) {
$this->handleChangedSettings('updateStartWindow', ($ownConfig) ? $displayProfile->getSetting('updateStartWindow') : $display->getSetting('updateStartWindow'), $sanitizedParams->getString('updateStartWindow'), $changedSettings);
$displayProfile->setSetting('updateStartWindow', $sanitizedParams->getString('updateStartWindow'), $ownConfig, $config);

Check warning on line 682 in lib/Controller/DisplayProfileConfigFields.php

View workflow job for this annotation

GitHub Actions / phpcs

Line exceeds 120 characters; contains 140 characters
}

if ($sanitizedParams->hasParam('updateEndWindow')) {
$this->handleChangedSettings('updateEndWindow', ($ownConfig) ? $displayProfile->getSetting('updateEndWindow') : $display->getSetting('updateEndWindow'), $sanitizedParams->getString('updateEndWindow'), $changedSettings);
$displayProfile->setSetting('updateEndWindow', $sanitizedParams->getString('updateEndWindow'), $ownConfig, $config);

Check warning on line 687 in lib/Controller/DisplayProfileConfigFields.php

View workflow job for this annotation

GitHub Actions / phpcs

Line exceeds 120 characters; contains 136 characters
}

if ($sanitizedParams->hasParam('dayPartId')) {
Expand Down Expand Up @@ -770,8 +770,8 @@
}

if ($sanitizedParams->hasParam('serverPort')) {
$this->handleChangedSettings('serverPort', ($ownConfig) ? $displayProfile->getSetting('serverPort') : $display->getSetting('serverPort'), $sanitizedParams->getInt('serverPort'), $changedSettings);

Check warning on line 773 in lib/Controller/DisplayProfileConfigFields.php

View workflow job for this annotation

GitHub Actions / phpcs

Line exceeds 120 characters; contains 216 characters
$displayProfile->setSetting('serverPort', $sanitizedParams->getInt('serverPort'), $ownConfig, $config);

Check warning on line 774 in lib/Controller/DisplayProfileConfigFields.php

View workflow job for this annotation

GitHub Actions / phpcs

Line exceeds 120 characters; contains 123 characters
}

if ($sanitizedParams->hasParam('embeddedServerAllowWan')) {
Expand Down Expand Up @@ -907,6 +907,24 @@
// Encode option and save it as a string to the lock setting
$displayProfile->setSetting('lockOptions', json_encode($lockOptions), $ownConfig, $config);

// Multiple video decoders
if ($sanitizedParams->hasParam('isUseMultipleVideoDecoders')) {
$this->handleChangedSettings(
'isUseMultipleVideoDecoders',
($ownConfig)
? $displayProfile->getSetting('isUseMultipleVideoDecoders')
: $display->getSetting('isUseMultipleVideoDecoders'),
$sanitizedParams->getString('isUseMultipleVideoDecoders'),
$changedSettings
);
$displayProfile->setSetting(
'isUseMultipleVideoDecoders',
$sanitizedParams->getString('isUseMultipleVideoDecoders'),
$ownConfig,
$config
);
}

break;

case 'chromeOS':
Expand Down
4 changes: 3 additions & 1 deletion lib/Factory/DisplayProfileFactory.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2024 Xibo Signage Ltd
* Copyright (C) 2025 Xibo Signage Ltd
*
* Xibo - Digital Signage - https://xibosignage.com
*
Expand Down Expand Up @@ -347,6 +347,7 @@ public function loadForType($type)
['name' => 'updateEndWindow', 'default' => '00:00'],
['name' => 'embeddedServerAllowWan', 'default' => 0, 'type' => 'checkbox'],
['name' => 'serverPort', 'default' => 9696],
['name' => 'isUseMultipleVideoDecoders', 'default' => 'default', 'type' => 'string'],
],
'sssp' => [
['name' => 'emailAddress', 'default' => ''],
Expand Down Expand Up @@ -384,6 +385,7 @@ public function loadForType($type)
['name' => 'updateEndWindow', 'default' => '00:00'],
['name' => 'embeddedServerAllowWan', 'default' => 0, 'type' => 'checkbox'],
['name' => 'serverPort', 'default' => 9696],
['name' => 'isUseMultipleVideoDecoders', 'default' => 'default', 'type' => 'string'],
],
'chromeOS' => [
['name' => 'licenceCode', 'default' => ''],
Expand Down
8 changes: 8 additions & 0 deletions views/displayprofile-form-edit-soc.twig
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,14 @@
{% set title = "Embedded Web Server allow WAN?"|trans %}
{% set helpText = "Should we allow access to the Player Embedded Web Server from WAN? You may need to adjust the device firewall to allow external traffic"|trans %}
{{ forms.checkbox("embeddedServerAllowWan", title, displayProfile.getSetting("embeddedServerAllowWan"), helpText) }}

{% set title = "Use Multiple Video Decoders"|trans %}
{% set helpText = "Should the Player try to use Multiple Video Decoders when preparing and showing Video content."|trans %}
{% set options = [
{ id: "on", value: "On"|trans },
{ id: "off", value: "Off"|trans }
] %}
{{ forms.dropdown("isUseMultipleVideoDecoders", "single", title, displayProfile.getSetting("isUseMultipleVideoDecoders", "on"), options, "id", "value", helpText) }}
</div>

<div class="tab-pane" id="timers">
Expand Down
Loading