Support » Plugin: Video.js - HTML5 Video Player for WordPress » [Plugin: VideoJS – HTML5 Video Player for WordPress] Mixed content on HTTPS pages

  • Resolved Ian Dunn


    You’re hard-coding http:// instead of generating it dynamically based on the current page protocal (see is_ssl()) or just using protocal-relative URLs. This causes mixed-content warnings on HTTPS pages.

    <!-- Flash Fallback. Use any flash video player here. Make sure to keep the vjs-flash-fallback class. -->
          <object class="vjs-flash-fallback" width="{$width}" height="{$height}" type="application/x-shockwave-flash"
            <param name="movie" value="" />
            <param name="allowfullscreen" value="true" />
            <param name="flashvars" value='config={"playlist":[$flow_player_poster{"url": "$mp4" $flow_player_autoplay $flow_player_preload }]}' />

Viewing 7 replies - 1 through 7 (of 7 total)
  • It looks like doesn’t have SSL enabled, so you can’t just link to or // I ended up having to host a local copy of Flowplayer on my server and modifying the plugin to link to it instead of the remote copy.

    The new self-hosting option is working really well, except that one part is left out. In Chrome, VideoJS loads an SWF file from the CDN, which causes mixed-content warnings on SSL pages. To fix it, you need to do something like this:

    } else { //use the self hosted version
    	echo '
    	<link href="' . plugins_url( 'videojs/video-js.min.css' , __FILE__ ) . '" rel="stylesheet">
    	<script src="' . plugins_url( 'videojs/video.min.js' , __FILE__ ) . '"></script>
    	<script type="text/javascript">
    		VideoJS.options.flash.swf = "'. plugins_url( 'videojs/video-js.swf' , __FILE__ ) .'";
    Plugin Author Dustin Lammiman


    Thanks for the heads up and fix, I’ll be sure to update this in the next version (not sure when that will be yet).

    Plugin Author Dustin Lammiman


    Fixed in the latest update.

    Awesome, thanks 🙂



    Would it be better to use wp_enqueue_script for adding your css/script files as its the corret way to do it in wordpress?

    wp_deregister_script( ‘jquery’ ); // or another custom added script
    wp_register_script( ‘jquery’, ‘’);
    wp_deregister_script( ‘myjqueryscript’ ); // remove the script.

    Might help not sure…

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: VideoJS – HTML5 Video Player for WordPress] Mixed content on HTTPS pages’ is closed to new replies.