Chiholiu Chiholiu - 2 months ago
151 0

Video should be loaded without error, but it looks like the video is constantly interrupted. So how can I solve this issue?

Javascript

The play() request was interrupted by a call to pause().

<div class="video-box"> 
				<div class="video-hide" style="display:block;">
					<video id="miblack" preload="auto" poster="Img/miband-black.jpg" class style="display:block;">
  					<img src="Img/miband-black.jpg" alt="miband1-image"/>
  					<source src="http://s1.mi.com/zt/14072201/sh-v-2.mp4" type="video/mp4"/>
  					<source src="http://s1.mi.com/zt/14072201/sh-v-2.webm" type="video/mp4"/>
					</video>
				</div>
			</div>

$(function(){
  $(window).on('scroll', function(){
    var mibandVideo = document.getElementById("miblack");
    if($(window).scrollTop() > 420 && $(window).scrollTop() < 520){
          mibandVideo.play();
      } else {
          mibandVideo.pause();
      }
  });
});