html::tag helper to generate an HTML5 video player. I want to tie the muted, autoplay and controls options into toggle feilds. This are are just single options on the tag, they are not key/value pairs like ordinary attributes, but i have had to set them as true to make it work with the tag helper.
I could of course turn it into plain html and do what i want but i was wondering if there was a way to add those attributes based on toggle field values and use the tag helper?
heres the relevant line in my snipper:
$vidtag = Html::tag('video', [$videsourcetag], ['poster' => $posterurl, 'muted' => 'true', 'autoplay' => 'true', 'controls' => 'true', 'preload' => 'auto', 'class' => 'vidplayer']);