FS cookie consent prevents custom java script from working properly

Hi

I implemented the Finsweet Cookie Consent banner. On the home page I have an Iframe for a vimeo video embed. I applied the nessecary attributes to the iframe. I also customized the player a bit through javascript, using the vimeo api. I made an unmute button, a play and pause button. All works fine sometimes but randomly two problems appear. Firstly the placeholder div that appears when consent is not given, appears even though cookies are allowed and secondly the unmute/play/pause button doesn’t work no more. It’s reproducable by refreshing the page several times or often when I load the page in inkognito mode the error happens. I once set the fs-cc-debug=“true” and even if it tells me that all the js is stored properly the error appears.

Webflow readonly

Website

That’s the js for the buttons that sometimes don’t work no more (site settings):

<script src="https://player.vimeo.com/api/player.js"></script>

<script type="fs-cc" fs-cc-categories="analytics">
  var player = new Vimeo.Player($("#vimeo-video")[0]);

  $("[vimeo=unmute]").click(function() {
   player.setCurrentTime(0);
   player.setMuted(false);
  });

  $("[vimeo=play]").click(function() {
    player.play();
  });
  
  $("[vimeo=pause]").click(function() {
    player.pause();
  });
</script>

vimeo embed:

<iframe id="vimeo-video" fs-cc-src="https://player.vimeo.com/video/839839890?background=1" 
width="100%" height="100%" fs-cc-placeholder=".cookie_allow" fs-cc-categories="analytics"
frameborder="0" allow="autoplay; fullscreen" allowfullscreen=""></iframe>

My guess is that somehow the js is not stored properly eventough the debugtool is saying otherwise. I’m not experienced with debugging javascript. I couldn’t even find the according js file in the chrome DevTools.

If someone could help me here I would really apreciate it. I would not know what to tell my client.
Thanks already a lot.

Regards,
Angelo

Has any body a hint for me in what direction I should investigate? Otherwise I think I’ll have to cancel the idea with the custom video player.

Thanks :pray: