Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

146
Views
¿Cómo establecer la variable al capturar el evento ESC al salir del modo de pantalla completa?

Necesito establecer variables al salir del modo de pantalla completa.

 myvariable = false @HostListener("dblclick", ['$event']) fullScreen(event) { console.log("fullScreen()",event) if(this.video) { if (this.video.requestFullscreen) { this.video.requestFullscreen(); } else if (this.video.mozRequestFullScreen) { this.video.nativeElement.mozRequestFullScreen(); } else if (this.video.webkitRequestFullscreen) { this.video.webkitRequestFullscreen(); } else if (this.video.msRequestFullscreen) { this.video.msRequestFullscreen(); } } if (document.addEventListener) { document.addEventListener('webkitfullscreenchange', this.exitHandler); document.addEventListener('mozfullscreenchange', this.exitHandler); document.addEventListener('fullscreenchange', this.exitHandler); document.addEventListener('MSFullscreenChange', this.exitHandler); } if (document.fullscreenElement) { this.myvariable = false document.exitFullscreen(); } } exitHandler() { //this function is called whenever fullscreen and exit the fullscreen mode console.log("exitHandler : ",document.fullscreenElement,this.myvariable) // Here it's said undefined in this whole DOM found if (document.fullscreenElement === null) { this.myvariable = true } }

¿Hay alguien que sepa? cómo restringir la tecla ESC o cómo configurar la variable en exitHandler() Traté de restringir ESC usando keydown, keypress y keydown Pero no capturé el evento mientras estoy en modo de pantalla completa de video y presiono la tecla ESC. Lo intenté de muchas maneras pero no tuve suerte.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!