【发布时间】:2017-11-09 14:26:18
【问题描述】:
Angular 2 中有没有一种方法可以在按下按钮后使视频全屏显示?
这是我目前尝试的功能。 (请注意,暂停和播放效果很好。)
fullscreen(video){
video.requestFullscreen();
}
HTML 代码
<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>
【问题讨论】:
-
this topic 的可能重复项。您只需要使用 ViewChild 使解决方案适应 Angular。你知道怎么做吗?
-
我没有,可悲的是我对 Angular 很陌生
-
那我现在就给你答复
标签: html angular video html5-video