在悬停时隐藏vimeo iframe上的暂停/播放按钮 [英] Hide pause/play button on vimeo iframe on hover

查看:611
本文介绍了在悬停时隐藏vimeo iframe上的暂停/播放按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在网站上使用Vimeo iframe。我用Vimeo Froogaloop API隐藏了所有控件。但我无法隐藏悬停时出现的暂停和播放按钮。有人请帮助我。

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.com/player/js-api#events
      Froogaloop(playerID).addEvent('play', play(playerID));
      Froogaloop(playerID).addEvent('seek', seek);


      // Fire an API method
      // http://developer.vimeo.com/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);
  }

});

推荐答案

根据论坛帖子,这是不可能的。该帖子建议升级到专业版并使用第三方播放器。

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

唯一的另一种选择是切换到不同的视频平台以获得您想要的功能。 / strike>

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

编辑:

看起来它实际上是可行的。我刚看到一个示例(链接到这个问题)删除了有问题的按钮。

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

键似乎是设置参数 iframe 的网址中的background = 1 。奇怪的是,此功能不会出现在 Vimeo的开发者网站上。

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.

这篇关于在悬停时隐藏vimeo iframe上的暂停/播放按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆