HTML5 video player is not working in ionic5 android

Viewed 440

I need to create a video player with captions for web, Android and IOS. So I used HTML5 video player. It works fine in web but in android device this is not working.enter image description here

HTML CODE

<div class="videoplayer-container>
  <video src="http://static.videogular.com/assets/videos/videogular.mp4"  #videoPlayer (click)="toggleVideo() ></video>
</div>

TS CODE

  toggleVideo() {
    if (this.videoplayer.nativeElement.paused) { 
      this.videoplayer.nativeElement.play();
    } else {
      this.videoplayer.nativeElement.pause();
    }
  }
1 Answers

You can view app logs using Logcat in Android studio and remote device inspect in Chrome to check what the error is.

Related