Stream mpd file video in angular 9

1.2k Views Asked by At

I have given video tag to play the video. Below code is working properly.For Sample code:

<div class="video">
    <video controls (click)="toggleVideo()" #videoPlayer>
        <source src="https://vjs.zencdn.net/v/oceans.mp4" type="video/mp4" />
        Browser not supported
    </video>
</div>

Component.ts:

   @ViewChild("videoPlayer", { static: false }) videoplayer: ElementRef;
    isPlay: boolean = false;

 toggleVideo() {
    this.videoplayer.nativeElement.play();
  }

But if I can change the src into .mpd file, Its not playing the video. Below code is not playing any video. Is it because of mpd file? Can you please help me?

<div class="video">
    <video controls (click)="toggleVideo()" #videoPlayer>
      <source src="http://ec2-3-6-94-231.ap-south-1.compute.amazonaws.com/ga_test/dash/test.mpd" type="video/mpd" />
      Browser not supported
    </video>
  </div>

0

There are 0 best solutions below