use webkit-playsinline in javascript

后端 未结 2 947
忘掉有多难
忘掉有多难 2021-01-14 16:53

How do I use webkit-playsinline in javascript instead of in html5 video tag? I want to use it just like using video tag control/autoplay attribute in javascript or if you gu

2条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-14 17:33

    You need to attach it to the video element and set it as video's attribute

    such as :

    
    

    so you could do (with jQuery) :

    $('video').attr('webkit-playsinline', '');
    

提交回复
热议问题