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');
< / Html>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
propertysetting
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
ormute
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 forwallpaper.loaded
event.$ ('your selector'). Wallpapers ({// ... Initial parameter}). ('Wallpaper.loaded', function () {$ ('video', this) .prop ('mute', true);});
Comments
Post a Comment