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

209
Views
Vimeo API - Can I disable some keyboard shortcuts of the embedded Vimeo video instead of disabling all shortcuts?

Can I disable some keyboard shortcuts of the embedded Vimeo video instead of disabling all shortcuts?

I often embed the Vimeo video via iframe into my website for video conferencing. I need to hide the control bar and disable all shortcuts except the shortcut "F"

Is there a way to achieve this?

Thanks

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Please try the code by saving locally on your device or using any third party Code Compiler as Stack Overflow is not allowing 'fullscreen', and make sure the iframe is active or focussed.

var options = {
        id: 59777392,  //Video Id
        width: 640,
        keyboard: false,
    };

    var player = new Vimeo.Player('VimeoVideo', options);

    

    player.on('play', function() {
        window.focus()
    });

    player.on('pause', function() {
        window.focus()
    });


window.addEventListener("blur", () => {
 {
    if (document.activeElement.tagName === "IFRAME") {
      check(); //Checks if Iframe is already in Full Screen
    }
  };
});


function check(){
if(window.innerHeight !== screen.height) { //If the Iframe is not full screen then make it full screen when user presses 'F', this will work only after the Vimeo Video Iframe has completed loading.
    document.addEventListener("keydown", event => {
  if (event.isComposing || event.keyCode !== 70) {
    return;
  }
  player.requestFullscreen();
})}
else{
document.addEventListener("keydown", event => {//If the Iframe is in full screen then make it normal, this function might not be executed if user do not interacts.
  if (event.isComposing || event.keyCode !== 70) {
    return;
  }
  player.exitFullscreen();
})
}
}
<!-- The Keyboard is disbaled and only 'F' key is enabled -->
<div id="VimeoVideo"></div>
<script src="https://player.vimeo.com/api/player.js"></script>

about 4 years ago · Juan Pablo Isaza Report
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!