JWPlayer and mediaelement conflicting on WordPress

enter image description here

I was hoping somebody would be able to help me. Written a shortcode for my videos using JWPlayer, but I get “double” styling with JW and mediaelements. Any ideas?

<div id="verboPlayer"></div>
     <?php
          $vimeo_id = $atts['file'];
          $url = 'https://player.vimeo.com/video/' . $vimeo_id . '/config';
          $str = file_get_contents($url);
          $json = json_decode($str, true);
          $hls_url = $json['request']['files']['hls']['cdns']['akfire_interconnect_quic']['url'];
          $thumb_url = $json['video']['thumbs']['base'];
          $media_id = $json['video']['id'];
     ?>
     <script type="text/javascript">
          var playerInstance = jwplayer("verboPlayer");

          playerInstance.setup({
               file: "<?php echo $hls_url; ?>",
               image: "<?php echo $thumb_url; ?>",
               title: "<?php echo vibe_get_title($id); ?>",
               mediaid: "<?php echo $media_id; ?>"
          });
      </script>

Read more here:: JWPlayer and mediaelement conflicting on WordPress

Leave a Reply

Your email address will not be published. Required fields are marked *