lygie2221 / embettyvideo4typo3

Data protection compliant Video Display for Youtube and Vimeo for TYPO3
Apache License 2.0
0 stars 0 forks source link

possibility to start video via JS func? #3

Closed toccamonium-fe closed 2 years ago

toccamonium-fe commented 2 years ago

Hi, thx for plugin. Is there a way to tigger the play button via JS instead of clicking on it?

lygie2221 commented 2 years ago

I am not absolutely sure if this works with all browsers. I tested it in Chrome and Firefox and it seems to work:

document.querySelector('embetty-video').shadowRoot.querySelector('#playbutton').click();

toccamonium-fe commented 2 years ago

great, works, thx!