Tap to Unmute causing javascript errors
-
Hi,
there’s an issue with the Tap to Unmute feature when using shortcodes to create the video.
<script src="/wp-content/plugins/video-background/js/vidbg.min.js?ver=2.7.0"></script> <script type="text/javascript"> jQuery(function($){ // Source: Shortcode $( ".page-header" ).vidbg( { mp4: "https://kalevatravel.fi.seravo.com/wp-content/uploads/2018/06/frontpage_hero_720p.mp4", webm: "#", poster: "468", repeat: true, overlay: false, overlayColor: "#000", overlayAlpha: "0.3", tapToUnmute: false, tapToUnmuteText: "<img src="/wp-content/plugins/video-background/img/volume-icon.svg" width="20" height="20" /><span>Tap to Unmute</span>", }); }); </script>The main issue is this generated line:
tapToUnmuteText: "<img src="/wp-content/plugins/video-background/img/volume-icon.svg" width="20" height="20" /><span>Tap to Unmute</span>",As you can see it is using ” to start the string and then the contents are also using ” to refer to srcs etc. This of course breaks the string syntax.
It should be :
tapToUnmuteText: '<img src="/wp-content/plugins/video-background/img/volume-icon.svg" width="20" height="20" /><span>Tap to Unmute</span>',I was able to temporarily fix this by making $tap_to_unmute_button = “”; on line 484 of candide-vidbg.php
The feature is unnecessary for me as I am simply using a non-audio video.
The page I need help with: [log in to see the link]
The topic ‘Tap to Unmute causing javascript errors’ is closed to new replies.