WordPress.org

Ready to get started?Download WordPress

Forums

Video.js - HTML5 Video Player for WordPress
[resolved] [Plugin: VideoJS - HTML5 Video Player for WordPress] Corrections to HTML markup in method add_videoj (2 posts)

  1. mophilly
    Member
    Posted 1 year ago #

    While working with the product, I found three errors of the HTML in the method add_videojs_header found in the video.js file. I don't know the proper way to submit suggested code fixes, so here it is.

    19: /* Include the script and css file in the page <head> */
    function add_videojs_header(){
    20:	$options = get_option('videojs_options');
    21:	if($options['videojs_cdn'] == 'on') { //use the cdn hosted version
    22:		echo "";
    23:		// 09-22-2012 mophilly; added script type on line 27 and tag terminating slash on lines 26 and 31
    24:		echo '
    25:		<link href="http://vjs.zencdn.net/c/video-js.css" rel="stylesheet" />
    26:		<script type="text/javascript" src="http://vjs.zencdn.net/c/video.js"></script>
    27:		';
    28:	} else { //use the self hosted version
    29:		echo '
    30:		<link href="' . plugins_url( 'videojs/video-js.min.css' , __FILE__ ) . '" rel="stylesheet" />
    31:		<script src="' . plugins_url( 'videojs/video.min.js' , __FILE__ ) . '"></script>
    32:		';
    33:	}
    34: }

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

  2. Dustin Lammiman
    Member
    Plugin Author

    Posted 1 year ago #

    Hi mophilly. Thanks for the feedback. As of HTML5, the type attribute and tag terminating slash are not required. Since video.js uses the HTML5 video tag, I'm assuming people using the plugin are using HTML5.

    Having said that, I am using the terminating slash elsewhere in the code, so for the sake of consistency, and possible increased backwards compatibility (?), I will probably implement these changes in the next version.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic