javascript - How to mute a looped background video -


I am using a video loop in the background of a div. The idea is to have a video loop in the background of a div on the hover, on the hover, the video will sound.

I could not find documents or methods of silence. any idea? I tried to mute adding the lines after the plug-in started -

  $ ("video"). Prop ('muted', true); $ ("Video"). Ether ('mute', 'mute');  

I did not see the volume reference in the document's video. However, in HTML compatible browsers, it can be easily muted by focusing on silence property

  • setting
    1. property 0

    You can do this on the video elements or on the jQuery cover.

      $ ('prop (' volume ', 0) $ (' video ') .prop (' mute ', true)  

    In the video elements plugin created by wallpaper, you should set the volume or mute property after which the DOM has been added. It should not be necessary, but the problems In the case you can try setting an event handler for wallpaper.loaded event.

      $ ('your selector'). Wallpapers ({// ... Initial parameter}). ('Wallpaper.loaded', function () {$ ('video', this) .prop ('mute', true);});  
  • < / Html>

    Comments

    Popular posts from this blog

    ios - How do I use CFArrayRef in Swift? -

    eclipse plugin - Run java code error: Workspace is closed -

    c - Error on building source code in VC 6 -