Skip to content

Commit d417e07

Browse files
authored
Merge pull request #97 from netgen/NGSTACK-672-fix-resource-rendering
NGSTACK-672 Add possibility to disable controls on video
2 parents 87cd7de + d7a939a commit d417e07

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

bundle/RemoteMedia/Provider/Cloudinary/CloudinaryProvider.php

+8-1
Original file line numberDiff line numberDiff line change
@@ -320,10 +320,17 @@ public function generateVideoTag(Value $value, $contentTypeIdentifier, $format =
320320

321321
$finalOptions = [
322322
'fallback_content' => 'Your browser does not support HTML5 video tags',
323-
'controls' => true,
324323
'poster' => $transformationOptions,
325324
];
326325

326+
if (!array_key_exists('controls', $format) || $format['controls']) {
327+
$finalOptions['controls'] = true;
328+
}
329+
330+
if (array_key_exists('controls', $transformationOptions)) {
331+
unset($transformationOptions['controls']);
332+
}
333+
327334
$finalOptions = $finalOptions + $transformationOptions;
328335

329336
$enableAudioWaveform = $this->enableAudioWaveform;

0 commit comments

Comments
 (0)