Video.js - HTML5 Video Player for WordPress
[resolved] [Plugin: VideoJS - HTML5 Video Player for WordPress] Mixed content on HTTPS pages (8 posts)

  1. Ian Dunn
    Posted 4 years ago #

    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="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" />
            <param name="allowfullscreen" value="true" />
            <param name="flashvars" value='config={"playlist":[$flow_player_poster{"url": "$mp4" $flow_player_autoplay $flow_player_preload }]}' />


  2. Ian Dunn
    Posted 4 years ago #

    It looks like releases.flowplayer.org doesn't have SSL enabled, so you can't just link to https://releases.flowplayer.org/swf/flowplayer-3.2.1.swf or //releases.flowplayer.org/swf/flowplayer-3.2.1.swf. 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.

  3. Ian Dunn
    Posted 3 years ago #

  4. Ian Dunn
    Posted 3 years ago #

    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__ ) .'";
  5. Dustin Lammiman
    Plugin Author

    Posted 3 years ago #

    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).

  6. Dustin Lammiman
    Plugin Author

    Posted 3 years ago #

    Fixed in the latest update.

  7. Ian Dunn
    Posted 3 years ago #

    Awesome, thanks :)

  8. skd_sam
    Posted 3 years ago #

    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', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js');
    wp_deregister_script( 'myjqueryscript' ); // remove the script.

    Might help not sure...

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Video.js - HTML5 Video Player for WordPress
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic