[DEBUG] correct buttom play and fullscreen (add auto fullscreen
This commit is contained in:
parent
9d20059d44
commit
4f10e7cfcc
@ -305,12 +305,18 @@ export class VideoScene implements OnInit {
|
|||||||
this.startHideTimer();
|
this.startHideTimer();
|
||||||
this.playVideo = false;
|
this.playVideo = false;
|
||||||
this.displayVolumeMenu = false;
|
this.displayVolumeMenu = false;
|
||||||
|
/*
|
||||||
|
if(this.isFullScreen == true) {
|
||||||
|
this.isFullScreen = false;
|
||||||
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
//https://www.w3schools.com/tags/ref_av_dom.asp
|
|
||||||
|
|
||||||
changeStateToPlay() {
|
changeStateToPlay() {
|
||||||
this.isPlaying = true;
|
this.isPlaying = true;
|
||||||
|
if (this.isFullScreen === true) {
|
||||||
|
this.onFullscreen();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
changeStateToPause() {
|
changeStateToPause() {
|
||||||
this.isPlaying = false;
|
this.isPlaying = false;
|
||||||
@ -339,14 +345,14 @@ export class VideoScene implements OnInit {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
changeTimeupdate(currentTime:any) {
|
changeTimeupdate(currentTime: any) {
|
||||||
//console.log("time change ");
|
//console.log("time change ");
|
||||||
//console.log(" ==> " + this.videoPlayer.currentTime);
|
//console.log(" ==> " + this.videoPlayer.currentTime);
|
||||||
this.currentTime = this.videoPlayer.currentTime;
|
this.currentTime = this.videoPlayer.currentTime;
|
||||||
this.currentTimeDisplay = this.convertIndisplayTime(this.currentTime);
|
this.currentTimeDisplay = this.convertIndisplayTime(this.currentTime);
|
||||||
//console.log(" ==> " + this.currentTimeDisplay);
|
//console.log(" ==> " + this.currentTimeDisplay);
|
||||||
}
|
}
|
||||||
changeDurationchange(duration:any) {
|
changeDurationchange(duration: any) {
|
||||||
console.log("duration change ");
|
console.log("duration change ");
|
||||||
console.log(" ==> " + this.videoPlayer.duration);
|
console.log(" ==> " + this.videoPlayer.duration);
|
||||||
this.duration = this.videoPlayer.duration;
|
this.duration = this.videoPlayer.duration;
|
||||||
@ -373,19 +379,15 @@ export class VideoScene implements OnInit {
|
|||||||
console.log("error element: " + this.videoPlayer);
|
console.log("error element: " + this.videoPlayer);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this.videoPlayer.pause();
|
||||||
}
|
}
|
||||||
|
|
||||||
onPauseToggle() {
|
onPauseToggle() {
|
||||||
console.log("pause toggle");
|
console.log("pause toggle ...");
|
||||||
this.startHideTimer();
|
|
||||||
if (this.videoPlayer === null
|
|
||||||
|| this.videoPlayer === undefined) {
|
|
||||||
console.log("error element: " + this.videoPlayer);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (this.isPlaying == true) {
|
if (this.isPlaying == true) {
|
||||||
this.videoPlayer.pause();
|
this.onPause();
|
||||||
} else {
|
} else {
|
||||||
this.videoPlayer.play();
|
this.onPlay();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user