Title: Dynamically Load js exclude not work
Last modified: August 13, 2021

---

# Dynamically Load js exclude not work

 *  Resolved [Mr Saeed Miri](https://wordpress.org/support/users/saeedmiri/)
 * (@saeedmiri)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/dynamically-load-js-exclude-not-work/)
 * Hi
    i have problem with dynamic load js , this is very good options in your plugin,
   But when it is activated player cant play video 1 sec or 2 sec paly then stop.
 * i read your doc about performance-preferences-explained and web-components.esm.
   js , i use wp rocket last version and add your js to exclude but player break
   and not work after this. I had to disable this option to work properly. I like
   to use this option because of the small number of files loaded on the page. ..
 * Please advise what should be done to solve this problem.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fdynamically-load-js-exclude-not-work%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Thread Starter [Mr Saeed Miri](https://wordpress.org/support/users/saeedmiri/)
 * (@saeedmiri)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/dynamically-load-js-exclude-not-work/#post-14766749)
 * sorry, i forget say this, in mobile device video cant play smooth for example
   please see this video in this adress :
 * [https://ssa.co.ir/%D8%A8%D8%B1%D8%AC-%D8%B1%D9%88%D8%B4%D9%86%D8%A7%DB%8C%DB%8C/](https://ssa.co.ir/%D8%A8%D8%B1%D8%AC-%D8%B1%D9%88%D8%B4%D9%86%D8%A7%DB%8C%DB%8C/)
 * in desktop is ok in mobile have delay for play and sometimes stop.
    -  This reply was modified 4 years, 9 months ago by [Mr Saeed Miri](https://wordpress.org/support/users/saeedmiri/).
 *  Plugin Author [Andre Gagnon](https://wordpress.org/support/users/2winfactor/)
 * (@2winfactor)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/dynamically-load-js-exclude-not-work/#post-14767532)
 * Hi There!
 * Thanks for reaching out! I see you’re using mp4 files – it sounds like maybe 
   there are not optimized for web viewing. This can cause stuttering and start/
   stop issues (especially on mobile) since it likely means that your video is encoded
   with the header file at the end of the file. This means that in order to understand
   the video, your browser would first need to download the whole file to get to
   the header part.
 * In order to work around this, always make sure that when encoding your video,
   you use a web optimized presets. This will make sure your video file is prepared
   and optimized to be delivered in a web browser.
 * [https://prestoplayer.com/docs/how-to-optimize-video-for-smooth-website-playback-using-handbrake](https://prestoplayer.com/docs/how-to-optimize-video-for-smooth-website-playback-using-handbrake)
 * Let me know if you need any assistance with this.
 *  Thread Starter [Mr Saeed Miri](https://wordpress.org/support/users/saeedmiri/)
 * (@saeedmiri)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/dynamically-load-js-exclude-not-work/#post-14768066)
 * Hi Andre Gagnon
    Really Thank You For Reply , remake video with your json settings
   and now is ok. now we have dynamically load js and this error :
 * /wp-content/plugins/presto-player/dist/components/web-components/web-components.
   esm.js’ is found, but is not used because the request credentials mode does not
   match. Consider taking a look at crossorigin attribute.
 * after exclude web-components.esm.js in wp rocket complate player Stop.
 *  Plugin Author [Andre Gagnon](https://wordpress.org/support/users/2winfactor/)
 * (@2winfactor)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/dynamically-load-js-exclude-not-work/#post-14772497)
 * It may be related to the CDN. We preload a few of our dynamic javascript files,
   and if your CDN does not have CORS headers for javascript files, this can happen.
   Are you running a CDN?
 *  Thread Starter [Mr Saeed Miri](https://wordpress.org/support/users/saeedmiri/)
 * (@saeedmiri)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/dynamically-load-js-exclude-not-work/#post-14796794)
 * Hi again and Thank You For Reply. No I dont Use any CDN, Maybe My Host Use CDN
   in Some Service. For Improve Performance I like Use Dynamic Load JS …I am Sure
   You Will solve These Small Problems Well. Presto Player Has a Good Future and
   Congratulations.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Dynamically Load js exclude not work’ is closed to new replies.

 * ![](https://ps.w.org/presto-player/assets/icon-256x256.png?rev=2831276)
 * [Presto Player](https://wordpress.org/plugins/presto-player/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/presto-player/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/presto-player/)
 * [Active Topics](https://wordpress.org/support/plugin/presto-player/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/presto-player/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/presto-player/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Mr Saeed Miri](https://wordpress.org/support/users/saeedmiri/)
 * Last activity: [4 years, 9 months ago](https://wordpress.org/support/topic/dynamically-load-js-exclude-not-work/#post-14796794)
 * Status: resolved