Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3721

disable the double-tap to skip feature on YouTube mobile

$
0
0

I want to disable the double-tap to skip feature on YouTube mobile. Does the API support this functionality?

I have seen disabling double-click through a script, but it doesn't seem to work effectively in practice.

function onPlayerStateChange(event) {    if (event.data == YT.PlayerState.PLAYING) {        // 플레이어가재생중인경우화면두번터치방지        var videoWrapper = document.getElementById('player-wrapper');        videoWrapper.addEventListener('touchstart', function(event) {            var currentTime = new Date().getTime();            var tapLength = currentTime - lastClickTime;            if (tapLength < 500) {                // 마지막으로탭한시간과현재탭한시간의차이가 500ms 미만인경우                event.preventDefault();            }            lastClickTime = currentTime;        }, false);    }} 

Viewing all articles
Browse latest Browse all 3721

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>