Hi. I'm working on a magazine with a lot of videos in. Is there a way to add the tags "playsinline autoplay loop muted" to all <video>-elements in the exported hpub html code?
Right now I manually delete the controls="controls"-tag and add "playsinline autoplay loop muted" to the element on all pages and it gets very annoying when you have the edit the exported html-pages every time.
Example code for reference - I've made the text bold where I usually edit and add my own:
<video width="375" height="667" controls="controls" data-id="4771" poster="assets/images/item_4771.png" data-autoplay="1" data-autodelay="0" data-nopause="1" class="mejs-none">
<source src="assets/media/ThorCover2.mp4" type="video/mp4"/>
You can remove the controller using the Media Panel in InDesign (select None).
You can also set loop there.
Autoplay can be set in the Overlays panel.
You can try setting several properties at once in the output by attaching the following as a .js file in the Resources section of the in5 dialog:
The success of that code may depend on whether or not it executes before the media player elements are initialized (I haven't tested it).