[DEBUG] correct buttom play and fullscreen (add auto fullscreen

This commit is contained in:
Edouard DUPIN 2022-03-09 21:53:51 +01:00
parent 9d20059d44
commit 4f10e7cfcc

View File

@ -305,12 +305,18 @@ export class VideoScene implements OnInit {
this.startHideTimer();
this.playVideo = false;
this.displayVolumeMenu = false;
/*
if(this.isFullScreen == true) {
this.isFullScreen = false;
}
*/
}
//https://www.w3schools.com/tags/ref_av_dom.asp
changeStateToPlay() {
this.isPlaying = true;
if (this.isFullScreen === true) {
this.onFullscreen();
}
}
changeStateToPause() {
this.isPlaying = false;
@ -373,19 +379,15 @@ export class VideoScene implements OnInit {
console.log("error element: " + this.videoPlayer);
return;
}
}
onPauseToggle() {
console.log("pause toggle");
this.startHideTimer();
if (this.videoPlayer === null
|| this.videoPlayer === undefined) {
console.log("error element: " + this.videoPlayer);
return;
}
if (this.isPlaying == true) {
this.videoPlayer.pause();
}
onPauseToggle() {
console.log("pause toggle ...");
if (this.isPlaying == true) {
this.onPause();
} else {
this.videoPlayer.play();
this.onPlay();
}
}