Title: Tap to Unmute causing javascript errors
Last modified: June 15, 2018

---

# Tap to Unmute causing javascript errors

 *  Resolved [heydayhemmo](https://wordpress.org/support/users/heydayhemmo/)
 * (@heydayhemmo)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/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.
    -  This topic was modified 7 years, 11 months ago by [heydayhemmo](https://wordpress.org/support/users/heydayhemmo/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ftap-to-unmute-causing-javascript-errors%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [pushlabs](https://wordpress.org/support/users/pushlabs/)
 * (@pushlabs)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/tap-to-unmute-causing-javascript-errors/#post-10412184)
 * Hey heydayhemmo,
 * Thanks for using Video Background!
 * This is quite weird because I am not experiencing the same issues on my dev instance.
   The plugin uses single quotes to enqueue the JS plugin init. You can see so here:
   
   [https://plugins.trac.wordpress.org/browser/video-background/trunk/candide-vidbg.php#L498](https://plugins.trac.wordpress.org/browser/video-background/trunk/candide-vidbg.php#L498)
 * However, the code that you posted shows that the entire JS init is using double
   spaces. This leads me to believe that you may be possibly using a plugin/3rd 
   party code that is rendering those single quotes as double quotes.
 * Regardless, I am glad you found a solution. Have a great day 🙂
 * Blake

Viewing 1 replies (of 1 total)

The topic ‘Tap to Unmute causing javascript errors’ is closed to new replies.

 * ![](https://ps.w.org/video-background/assets/icon-256x256.png?rev=2774411)
 * [Video Background](https://wordpress.org/plugins/video-background/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/video-background/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/video-background/)
 * [Active Topics](https://wordpress.org/support/plugin/video-background/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/video-background/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/video-background/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [pushlabs](https://wordpress.org/support/users/pushlabs/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/tap-to-unmute-causing-javascript-errors/#post-10412184)
 * Status: resolved