最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Hide pauseplay button on vimeo iframe on hover - Stack Overflow

programmeradmin2浏览0评论

I am using a Vimeo iframe on a website. I hide all the controls with the Vimeo Froogaloop API. But I can't hide the pause and play button that appear on hover. Somebody please help me.

$(document).ready(function(){
  jQuery('iframe.vimeo-player').each(function(){
      Froogaloop(this).addEvent('ready', ready);
  });
  function ready(playerID){
      console.log(playerID + ' is ready');

      // Add event listerns
      // 
      Froogaloop(playerID).addEvent('play', play(playerID));
      Froogaloop(playerID).addEvent('seek', seek);


      // Fire an API method
      // 
      Froogaloop(playerID).api('play');
      Froogaloop(playerID).api('setVolume', 0);

  }
  function play(playerID){
      console.log(playerID + ' is playing');
  }
  function seek(data, playerID) {
      console.log(playerID + ' is seeking');
      console.log(data);
  }

});

I am using a Vimeo iframe on a website. I hide all the controls with the Vimeo Froogaloop API. But I can't hide the pause and play button that appear on hover. Somebody please help me.

$(document).ready(function(){
  jQuery('iframe.vimeo-player').each(function(){
      Froogaloop(this).addEvent('ready', ready);
  });
  function ready(playerID){
      console.log(playerID + ' is ready');

      // Add event listerns
      // http://developer.vimeo./player/js-api#events
      Froogaloop(playerID).addEvent('play', play(playerID));
      Froogaloop(playerID).addEvent('seek', seek);


      // Fire an API method
      // http://developer.vimeo./player/js-api#methods
      Froogaloop(playerID).api('play');
      Froogaloop(playerID).api('setVolume', 0);

  }
  function play(playerID){
      console.log(playerID + ' is playing');
  }
  function seek(data, playerID) {
      console.log(playerID + ' is seeking');
      console.log(data);
  }

});

Share Improve this question edited Feb 24, 2016 at 0:33 Andrew Myers 2,7865 gold badges35 silver badges41 bronze badges asked Feb 15, 2016 at 7:49 yasaruiyasarui 6,5838 gold badges46 silver badges80 bronze badges 2
  • May you provide any code or a fiddle? – Fearodin Commented Feb 15, 2016 at 7:51
  • I don't know if you're still working on this problem, but I just came to a new conclusion and edited my answer accordingly. – Andrew Myers Commented Feb 26, 2016 at 23:31
Add a ment  | 

1 Answer 1

Reset to default 3

According to a forum post from 2 years ago, this is impossible. The post suggests upgrading to pro and using a third-party player.

The only other option would be to switch to a different video platform to get the features you want.

Edit:

It looks like it's actually possible. I just saw an example (linked to from this question) which has the buttons in question removed.

The key appears to be setting the parameter background=1 in the URL of the iframe. Oddly enough, this functionality does not appear on Vimeo's developer site.

发布评论

评论列表(0)

  1. 暂无评论