I have 2 days dealing with a weird issue about a mp4 video in angular 7. For some reason the MP4 video simply does not play.
This is my code:
HTML:
<div id="instructions" class="angled-img pull-left">
<video allow="autoplay" width="350px" height="195px" class="img" controls
poster='{{gameInfo.clip.preview}}'>
<source src="{{gameInfo.clip.clip}}" type='video/mp4' />
</video>
</div>
TS:
public gameInformation(id: number): void {
this.gameService.getGame(id).subscribe(res => {
this.gameInfo = res;
console.log(res);
this.loader = false;
}, error => {
console.error(error);
this.loader = false;
});
}
I am not sure why this is happening. Can somebody help me out? What I am doing wrong. I am using ngx-bootstrap for this.
Thanks in advance.