I discovered the audio files are slowing down the loading of my home page a lot. I would like only the audio's metadata to be preloaded, instead of the whole file. I saw the preload attribute is set to auto in the audio files : where can I change that to metadata ?
Can you please offer more details? Are you talking about a particular page or Elementor widget?
Kind Regards, Alex
New to WordPress? Don't want to deal with all the setup process? We can help you! Please check our list of additional services and let us know if there's anything we can do to help you!
Thanks for details. The entire logic for the music player is implemented in slide/core/js/slide_swp.js
The "preload" attribute is added automatically, when the audio tag is created from JavaScript part.
So please edit the file above and add the following line of code:
audio.preload = 'metadata';
here:
Please let me know how it works. If everything is ok, I will add this change for the next theme update.
Kind Regards, Alex
New to WordPress? Don't want to deal with all the setup process? We can help you! Please check our list of additional services and let us know if there's anything we can do to help you!
No problem, thank you for noticing this! Let me know if you need more help from my side.
Kind Regards, Alex
New to WordPress? Don't want to deal with all the setup process? We can help you! Please check our list of additional services and let us know if there's anything we can do to help you!
Hello,
I discovered the audio files are slowing down the loading of my home page a lot. I would like only the audio's metadata to be preloaded, instead of the whole file. I saw the preload attribute is set to auto in the audio files : where can I change that to metadata ?
Thank you !
Hi,
Can you please offer more details? Are you talking about a particular page or Elementor widget?
Kind Regards,
Alex
New to WordPress? Don't want to deal with all the setup process? We can help you!
Please check our list of additional services and let us know if there's anything we can do to help you!
SmartWPress - Envato Elite Author
It's the payer called “swp_music_player” in html and “Slide Music Player” in dashboard's page constructor (I use WPBakery)
Hi,
Thanks for details. The entire logic for the music player is implemented in slide/core/js/slide_swp.js
The "preload" attribute is added automatically, when the audio tag is created from JavaScript part.
So please edit the file above and add the following line of code:
here:
Please let me know how it works. If everything is ok, I will add this change for the next theme update.
Kind Regards,
Alex
New to WordPress? Don't want to deal with all the setup process? We can help you!
Please check our list of additional services and let us know if there's anything we can do to help you!
SmartWPress - Envato Elite Author
Worked like a charm (divided loading time by almost 3 !), thank you !
No problem, thank you for noticing this! Let me know if you need more help from my side.
Kind Regards,
Alex
New to WordPress? Don't want to deal with all the setup process? We can help you!
Please check our list of additional services and let us know if there's anything we can do to help you!
SmartWPress - Envato Elite Author