Skip to content

Commit

Permalink
Merge pull request #97 from netgen/NGSTACK-672-fix-resource-rendering
Browse files Browse the repository at this point in the history
NGSTACK-672 Add possibility to disable controls on video
  • Loading branch information
iherak authored Jan 11, 2023
2 parents 87cd7de + d7a939a commit d417e07
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,17 @@ public function generateVideoTag(Value $value, $contentTypeIdentifier, $format =

$finalOptions = [
'fallback_content' => 'Your browser does not support HTML5 video tags',
'controls' => true,
'poster' => $transformationOptions,
];

if (!array_key_exists('controls', $format) || $format['controls']) {
$finalOptions['controls'] = true;
}

if (array_key_exists('controls', $transformationOptions)) {
unset($transformationOptions['controls']);
}

$finalOptions = $finalOptions + $transformationOptions;

$enableAudioWaveform = $this->enableAudioWaveform;
Expand Down

0 comments on commit d417e07

Please sign in to comment.