Is there a way in Angular 2 to make a video fullscreen once pressing a button?
This is the function I tried so far. (Note that pausing and playing works fine.)
fullscreen(video){
video.requestFullscreen();
}
HTML code
<video #video autoplay>
<source src="assets/videos/mov_bbb.mp4" type="video/mp4">
<img alt = "Test image" src="/assets/images/example.png" title="Your browser does not support the <video> tag">
</video>
<button (click)="fullscreen(video);"> Fullscreen </button>