iOS low power mode video autoplay
Home Forums Support background video script for low power mode in apple safari
Viewing 8 posts - 1 through 8 (of 8 total)
|
tag.
Let me help you to understand it better:
Scripts are loaded in hierarchical manner, which means whichever script comes first in a webpage runs first.
The script needed to run the video is depending on other script(In our case, it is jQuery which should be loaded before this).
So, if you add the in the very end of the webpage,
it makes sure all the other dependent scripts are already loaded earlier in the webpage.
So which Hook do you recommend and priority??
Thanks,
Hi there,
1. Yes the code needs to be inside tags.
2. Use the WP_Footer hook you can set the Priority to 50 or higher it shouldnt really matter.
3. In your script you will need to change this:
$('body').on('click touchstart', function () {
to
jQuery('body').on('click touchstart', function () {
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
David,
Money.
For script use the WP_Footer hook and set the Priority to 50 or higher.
I assume thats working
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/