Picture of Ailiniyazi Maimaiti
Re: Auto-play Media
by Ailiniyazi Maimaiti - Monday, 9 December 2019, 8:59 AM
 

Hi Russell,

I was working on a Project and there were some contents, which are build by Media Plugin, need to be autoplayed. Since there was no options for that, then I tried to get it done by changing source code of Media Plugin. After several times of try, I understood why there are no options for autoplay, because audio objects will be interrupted by the Autoplay Policy changes from Google Chrome, there is discription of this changes:

https://developers.google.com/web/updates/2017/09/autoplay-policy-changes

And, if you need only one media component in one page, you can try to edit the plugin's code. Open media.hbs file, replace the code at line 12 with this:

 <audio  autoplay src="{{_media.mp3}}" type="audio/mp3" style="width: 100%; height: 100%;"/>

I hope this helps.