Skip to content

Commit 8cc8886

Browse files
committed
fix codacy issues
1 parent b452184 commit 8cc8886

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

Classes/Controller/MediaPlayerController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@ private function collectAdditionalVideoUrls(AbstractDocument $doc, int $pageNo,
195195

196196
$showAudioLabelImage = $this->settings['constants']['showAudioLabelImage'] ?? null;
197197
$audioLabelImageFiles = $this->findFiles($doc, $pageNo, $imageUseGroups);
198-
if (!empty($audioLabelImageFiles)
199-
&& (int) $showAudioLabelImage === 1
198+
if (!empty($audioLabelImageFiles)
199+
&& (int) $showAudioLabelImage === 1
200200
&& Helper::filterFilesByMimeType($audioLabelImageFiles[0], ['image'], ['JPG'], 'mimeType')
201201
) {
202202
$videoUrl['audioLabelImage'] = $audioLabelImageFiles[0];

Classes/Controller/ToolboxController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,15 +242,15 @@ private function renderAnnotationTool(): void
242242
* @return void
243243
*/
244244
private function renderAudioVideoTool(): void
245-
{
245+
{
246246
if (
247247
$this->isDocMissingOrEmpty()
248248
|| empty($this->useGroupsConfiguration->getImage())
249249
) {
250250
// Quit without doing anything if required variables are not set.
251251
return;
252252
}
253-
253+
254254
$this->setPage();
255255
$page = $this->requestData['page'] ?? 0;
256256
$audioLabelImage = $this->getImage($page);

Resources/Private/JavaScript/SlubMediaPlayer/components/equalizer/EqualizerPlugin.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
import { blobToDataURL, e, filterNonNull } from 'lib/util';
44
import { parsePreset } from 'SlubMediaPlayer/components/equalizer/preset';
55
import DlfMediaPlugin from 'DlfMediaPlayer/DlfMediaPlugin';
6+
import eqPreviewImage from 'Assets/Images/equalizer-preview.png';
67
import Equalizer from 'SlubMediaPlayer/components/equalizer/Equalizer';
78
import EqualizerView from 'SlubMediaPlayer/components/equalizer/EqualizerView';
89
import registerMultiIirProcessor from 'SlubMediaPlayer/components/equalizer/MultiIirProcessor.no-babel';
9-
import eqPreviewImage from 'Assets/Images/equalizer-preview.png';
1010

1111
/**
1212
* @typedef {import('DlfMediaPlayer/DlfMediaPlayer').default} DlfMediaPlayer
@@ -218,7 +218,7 @@ export default class EqualizerPlugin extends DlfMediaPlugin {
218218
*/
219219
async resumeAudioContext() {
220220
// Do NOT create or resume the AudioContext here synchronously.
221-
// Instead show a resume UI and create/resume the context inside the user gesture handlers (pointerdown/keydown).
221+
// Instead show a resume UI and create/resume the context inside the user gesture handlers (pointerdown/keydown).
222222
// This avoids browsers blocking the action because it's not triggered by a user gesture.
223223

224224
// If we already have a context and it's running, immediately resolve.
@@ -230,16 +230,16 @@ export default class EqualizerPlugin extends DlfMediaPlugin {
230230

231231
// Show resume hint once - accessible button
232232
if (!this.resumeHintEl_) {
233-
// outer wrapper that holds the blurred background and an overlaid button
233+
// Outer wrapper that holds the blurred background and an overlaid button
234234
const wrapper = e('div', { className: 'dlf-equalizer-resume', role: 'group', ariaLabel: this.env.t('control.sound_tools.equalizer.resume_context') }, []);
235-
// background element (will show via CSS var and be blurred)
235+
// Background element (will show via CSS var and be blurred)
236236
const bgDiv = e('div', { className: 'dlf-equalizer-resume-bg', ariaHidden: 'true' }, []);
237-
// visible button
237+
// Visible button
238238
const btn = e('button', { className: 'dlf-equalizer-resume-btn', type: 'button', ariaLabel: this.env.t('control.sound_tools.equalizer.resume_context') }, [
239239
this.env.t('control.sound_tools.equalizer.resume_context'),
240240
]);
241241

242-
// set preview image from public images folder
242+
// Set preview image from public images folder
243243
wrapper.style.setProperty('--equalizer-bg-url', `url("${eqPreviewImage}")`);
244244

245245
// Clicking either wrapper or btn should resume

Resources/Private/Less/SlubMediaPlayer/components/EqualizerView.less

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,11 @@
4545
& .dlf-equalizer-resume-bg {
4646
filter: blur(4px);
4747
}
48+
4849
& .dlf-equalizer-resume-btn {
4950
box-shadow: 0 8px 22px rgba(0,0,0,0.22);
5051
}
52+
5153
& .dlf-equalizer-resume-btn:focus {
5254
box-shadow: 0 8px 22px rgba(0,0,0,0.28), 0 0 0 4px rgba(176, 176, 176, 0.16);
5355
}

0 commit comments

Comments
 (0)