Archived topic
Help with creating a custom button
5 replies · Started by Marcel on May 25, 2022
Hello,
I use a SaaS to record the microphone and camera directly on my website.
They provided me with a code to embed a recording button (non-white label), but I would like to use my own button, using GenerateBlocks and GeneratePress.
I would like to ask if you can help me with that, only if it's possible.
The script I use for the button and a live demo is provided in the private area.
Best regards,
Marcel
Hi Michael,
You may create a Hook Element, and add this:
<script src="https://calipio.com/app/embeddable-recorder.js"></script>
Set the hook to wp_footer, and the set the Display rules to your Entire site or where you wish to add the Button.
Example: https://share.getcloudapp.com/BluGgw40
Now, you can add the calipio-recorder code to a Custom HTML block for the button to appear in your preferred page or post:
<calipio-recorder token=“YOUR-TOKEN-HERE” onrecordingended="alert('Recording has ended. Playback URL: ' + event.detail.url)" allowedsources="camera" mandatorysources="camera" selectedsources="camera">
</calipio-recorder>
Hope this clarifies!
Hi Fernando,
Thanks for your explanation, but I asked for help with something different. I would like to have MY OWN BUTTON (made with GB), not the one resulting from their script.
I am not sure it is possible.
You can see the behaviour of the button I want to replace (Record), following the URL I provided in the private area.
Thank you!
Hi there,
that not possible. The script is injecting a custom canvas element into your page, which contains more than just the button. Its not like a button opening a modal, its all one integrated element.
Thank you, Fernando and David!
You're welcome