Foliovision › Forums › FV Player › Troubleshooting › CSS to change play-button/icon
-
Hi,
we tried to change the play-button with the code from the docs (below), put in additional CSS.
But without effect on the page. Just when the lightbox opens up, the new icon is vissible for very short time. So it´s present “somwhere” but is not shown…
How to solve that the new icon appears already on the pages?.is-splash.flowplayer .fp-player .fp-ui, .is-paused.flowplayer .fp-player .fp-ui { background: url (https://cdn.foliovision.com/wp-content/uploads/2021/02/video-play-button.png) center no-repeat; background-size: 50%; } .is-seeking.flowplayer .fp-ui { background: none; } .flowplayer .fp-ui > .fp-play { display: none }
-
-
Hello Amanda,
it’s a matter of putting the CSS into the right place. It should load after FV Player CSS to ensure it get the priority. We cover that at the beginning of our guide for CSS modifications: https://foliovision.com/player/advanced/css-tips-and-fixes
As a proof of concept please try to use it with !important for each rule like this:
.is-splash.flowplayer .fp-player .fp-ui, .is-paused.flowplayer .fp-player .fp-ui { background: url (https://cdn.foliovision.com/wp-content/uploads/2021/02/video-play-button.png) center no-repeat !important; background-size: 50% !important; } .is-seeking.flowplayer .fp-ui { background: none !important; } .flowplayer .fp-ui > .fp-play { display: none !important; }
In fact we get asked about similar issues quite often. Perhaps FV Player should provide its own custom CSS field which would already work in a way that would prioritize it properly. That way everybody would know where it needs to be added.
Thanks,
MartinOK – thanks.
Because I´ve a lot of feedback, that the user don´t recognize on the pages that the pictures are not only pictures, but videos. The simple white triangle as play-icon has no or less contrast depending on the style of the splash pic. If the backround is white (or nearly white) the triangle is hard to recognize as a video-play-button on the first sight.
Hope the update is comming next week…Hello Amanda,
we have worked on adding the custom CSS field into FV Player settings. Could you please reinstall FV Player from this link: https://github.com/foliovision/fv-wordpress-flowplayer/archive/687-custom-css-field.zip
To do that you will have to first deactivate and delete the current FV Player plugin you are using. WordPress will warn you that you might loose settings and data, but it’s not the case with our plugin, no settings now videos will be lost. Or you can just replace the plugin files via FTP.
Then you will find a nice field for you CSS with syntax checking built in at wp-admin -> Settings -> FV Player Pro -> Skin -> Custom CSS. That way your CSS will always load after code FV Player CSS making any customizations easier.
I also adjusted the custom CSS snippet at https://foliovision.com/player/advanced/css-tips-and-fixes#play-icon a bit.
Thanks,
MartinHello Amanda,
please put the CSS code back in and let me have a look. If you do it in next 2 hours I will be able to check right away.
Perhaps there is a mistake which you are doing and we can avoid it by improving our guide or our system is not playing with the way your website optimizes the CSS code.
Thanks,
Martin.is-splash.flowplayer .fp-player .fp-ui,
ADDITIONAL 2:
At the moment code below is inserted. Chache is OFF. We keep this status for 3 hour to check..is-paused.flowplayer .fp-player .fp-ui {
background: url(https://foliovision.com/images/2017/11/Play-Music-icon.png) center no-repeat;
background-size: 19%;
}
.is-seeking.flowplayer .fp-ui { background: none; }
.flowplayer .fp-ui > .fp-play, .flowplayer.is-splash .fp-ui > .fp-play { display: none }Hello Amanda,
I see, you need the play button on the lightbox-ed player. Our CSS didn’t count on that, so I added the “.lightbox-starter.flowplayer .fp-ui” part to it, so please take the updated version from here and it will work for you: https://foliovision.com/player/advanced/css-tips-and-fixes#play-icon
There will also be a FV Player version 7.4.42.727 out today. It will include that new custom CSS field so please upgrade to that when you get a chance.
Thanks,
MartinHello Amanda,
I’m not sure what do you mean. Is the icon there when you load the page? Then you click it and the lightbox opens it plays the video rightaway, so the icon won’t really appear. When you pause the video it no longer appears as the play icon is in the control bar too. That one is the default play icon though.
Thanks,
Martin