问题
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);
}
});
回答1:
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.
来源:https://stackoverflow.com/questions/35404013/hide-pause-play-button-on-vimeo-iframe-on-hover