WordPress.org

Ready to get started?Download WordPress

Forums

Video.js - HTML5 Video Player for WordPress
[resolved] Only load CSS and JS files when needed? (3 posts)

  1. Chris
    Member
    Posted 1 year ago #

    Thanks for this great plugin! I haven't run into any issues, I just have a feature request:

    Could you make it so that the CSS file, JS file, and inline CSS only gets loaded on posts/pages that have the [video] or [videojs] shortcodes?

    Also, they just updated to 4.1.0 last week:
    https://github.com/videojs/video.js/blob/master/CHANGELOG.md

    It would be nice if the Video.js folks provided a URL that always pointed to the latest CSS and JS files. That way the CDN hosted version would always be up to date, and wouldn't require a plugin update.

    Thanks again!

    http://wordpress.org/extend/plugins/videojs-html5-video-player-for-wordpress/

  2. Dustin Lammiman
    Member
    Plugin Author

    Posted 10 months ago #

    The new version should do this in WordPress 3.6+ using the new has_shortcode() - see https://github.com/zencoder/video-js-for-wordpress/issues/3

    I will also update to 4.2. While it might make some sense to always point to the newest version on the CDN, there is also the risk that it might break some things. I noticed when making changes to the plugin from using 4.0 to 4.2 that I did have to tweak some of the plugin specific CSS. Better to know that an update is made so that you can check for bugs than to have it automatic and not know of potential issues.

  3. Chris
    Member
    Posted 10 months ago #

    Cool! Looking forward to the update.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.