How to mute an html5 video player using jQuery

后端 未结 3 1652
刺人心
刺人心 2020-11-27 17:23

I\'ve found how to pause and play the video using jquery

$(\"video\").get(0).play();
$(\"video\").get(0).pause();

But I can\'t find t

3条回答
  •  野性不改
    2020-11-27 17:45

    $("video").prop('muted', true); //mute
    

    AND

    $("video").prop('muted', false); //unmute
    

    See all events here

    (side note: use attr if in jQuery < 1.6)

提交回复
热议问题