WordPress.org

Forums

Video.js - HTML5 Video Player for WordPress
[resolved] Responsive Option Breaks 2 or More Videos (And some Muted code) (2 posts)

  1. NynAcm
    Member
    Posted 1 year ago #

    Hi, after much troubleshooting I am experiencing the following:

    When Responsive Video is Turned on:
    If I am using the Shortcode twice on any section of the website [videojs] and/or [video] the first video breaks, does not show.

    When Responsive Video is Turned off:
    After some CSS fixes I have gotten all videos to appear and Fill the space (still some minor issues which I'm sure I can fix in jquery and css)

    What I am doing and have succeeded (until the above issues)

    • I've used videoJS to Create Responsive Video Banners
    • I'm using a Plug-in to let Shortcodes pass through Category Archive Descriptions and Widgets (Use Shortcodes in Sidebar Widgets)
    • I'm using Custom JQuery code to make videoJS banners fill any space
    • I'm using a Plug-in to Build Custom Shortcodes (Shortcode Exec PHP) However there are no issues here.
    • My Browser reports no errors

    Conclusion
    Something is happening to the wrapper and CSS when the Responsive option is turned on. I Prefer these settings then the default (non responsive) setting.

    I also added a Muted Option in the PHP so it can be added into the shortcode, (also no issues here that would conflict with the above).

    //Add Muted to the Array
    extract(shortcode_atts(array(
    'muted' => ''
    
    //Add Muted settings below the array section
    // Muted?
    	if ($muted == "true")
    		$muted_attribute = "";
    	else
    		$muted_attribute = " muted";
    
    //add the value to the shortcode parameter
    	<!-- Begin Video.js -->
    	<video id="{$id}" muted="{$muted}" ...............

    Keep up the great work!

    -acm

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

  2. Dustin Lammiman
    Member
    Plugin Author

    Posted 1 year ago #

    I will admit that the Responsive Video checkbox doesn't always work for responsive sites, depending on how they were implemented. Should work for the majority of sites though.

    I'll definitely look at including your muted code in the next version. Thanks for posting the code!

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