Hi guys
I know there have been a couple of solutions posted for similar things, but I haven't been able to implement it for my website. I would be incredibly grateful if someone might be able to help.
I've used the "embed a widget" function to embed a full width Vimeo video to my website. It's currently set to autoplay, so by standard is muted when the page first loads. Here's the adapted code:
<div style="padding:42.6% 0 0 0;position:relative;"><iframe src="https://player.vimeo.com/video/558081433?autoplay=1&muted=1&loop=1&autopause=0" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen
style="position:absolute;top:0;left:0;width:100%;height:100%;" title="Anthemic Piano"></iframe></div><script src="https://player.vimeo.com/api/player.js"></script>
I'd like to create a button sitting on the video to unmute/mute the video, rather than the user having to find the volume slider.
I've seen that my button is called #button2 in the developer code area whereas my HTML component for the embedded video is called #html1
Using commands like:
exportfunctiononButton_click(event)
{$w("#videoPlayer1").unmute();}
Doesn't work because I'm not using the video player as such. I figured maybe I need to send a message into the HTML component on button click to first unmute, and then send another message on a secondary button click to then mute again.
Replacing #videoplayer1 with #html1 doesn't work of course as the mute/unmute command doesn't make sense for this object.
Would anyone be able to help me understand how to get this working? Thank you so much in advance, it's very much appreciated!! (As you've probably gathered I'm very much a newbie when it comes to coding!!)
Maybe this one will help you (change the src to an embedded video from Vimeo)