首页 > 其他 > 详细

video 视频全屏播放

时间:2019-12-30 22:14:36      阅读:132      评论:0      收藏:0      [点我收藏+]
      public videofull() {
		//全屏播放视频
		var _this = this;
		_this.video = document.getElementById(‘homeVideo‘); //视频
		_this.btnFullScreen = document.getElementById(‘btn_fullscreen‘); // 全屏点击按钮
		//实现全屏功能
		_this.btnFullScreen.addEventListener(‘click‘,function() {
				// if (_this.video.requestFullscreen) {
				// 	_this.video.requestFullscreen();
				// } else if (_this.video.mozRequestFullScreen) {
				// 	_this.video.mozRequestFullScreen();
				// } else if (_this.video.webkitRequestFullscreen) {
				// 	_this.video.webkitRequestFullscreen();
				// } else if (_this.video.msRequestFullscreen) {
				// 	_this.video.msRequestFullscreen();
				// }
				_this.isAutoplay = !_this.isAutoplay;
				// if(!_this.isAutoplay){
				// 	_this.video.play();
				// }
			},
			false
		);
	}

  

video 视频全屏播放

原文:https://www.cnblogs.com/mary-123/p/12121883.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!