I want to play or pause video on scroll, if scroll is greater than 300 it should pause otherwise it should play. This is my video tag
You need to bind your function to the scroll event and also change from autoplay to actually play() - pause(), check this example snippet:
Note: I have changed from 300 to 70 just for the example but you can keep your breakpoint as you want
var myvid = $('#myVid')[0];
$(window).scroll(function(){
var scroll = $(this).scrollTop();
scroll > 70 ? myvid.pause() : myvid.play()
})
body {
background:#e1e1e1;
height:1000px;
}
video {
display:block;
width:300px;
margin:0 auto;
}