I am trying to build app with feed videos list using HTML5 video tag, and autoplay the video once it is visible at the screen, everything working fine, but I am facing an issue on android the video start playing after 2-4 seconds, I tried all native ionic plugins instead of html video tag, but those plugins are playing the video on fullscreen, Its impossible to play video inside the screen.
Home Page:
<video-box *ngFor=“let video of virtualScroller.viewPortItems” [video]=“video” no-padding>
Video Box Component html view:
<video #videoE id="{{video.id}}" loop preload=“auto” playsinline webkit-playsinline=“webkit-playsinline” class=“videoPlayer”>
Video Box Component ts code:
playVideo(video) {
this.videoPlayed = true;
this.pauseAllVideos(video);
this.videoEl.nativeElement.classList.add("open");
this.videoEl.nativeElement.play();
}