Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Muting an embedded vimeo video

On a website I am building I have a vimeo video embedded. The client needs to keep the sound on the video obviously for people that find it on vimeo. However for her website the sound is just plain annoying. So I need to find a way to mute the audio within the code for the embed. I have googled it but can't seem to find anything legible. As you can see from my code below, I have used the autoplay command within the link I was hoping I could do a similar thing to mute the sound.

    <iframe src="http://player.vimeo.com/video/4415083?  title=0&amp;byline=0&amp;portrait=0&amp;color=d01e2f&amp;autoplay=1" width="500" height="281"  frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe> 

Thanks

like image 346
DanielNolan Avatar asked Oct 30 '14 09:10

DanielNolan


People also ask

How do I edit a Vimeo embedded video?

If you want to customize your embed code, choose +Show Options. In the new menu that appears, you'll be able to make automatic adjustments to your embed code, such as autoplay/loop, colors, embed sizing, etc (note: some of these adjustments can also be done in your video's embed settings or within a text editor).

Is there a way to mute a part of a video?

Right-click the video clip and select Mute. This will silence the audio on the video clip, but not remove the audio for that single clip. To mute the audio of the entire track, you can select the Audio icon to the left of the track to Mute the track. This will silence all of the clips on that single track.

How do I change embed settings on Vimeo?

On the Video Settings page, click the Embed tab to see the Player Preferences. You can customize the look of your embedded video with Player Preferences settings. Click the checkbox next to the option you wish to enable or uncheck the ones you wish to disable, such as the Vimeo logo. Click Save Changes.


2 Answers

In case it helps anyone, Vimeo have added a 'background' parameter for embedding videos, that autoplays videos silently. In some cases that will be useful where people want to mute videos - this is their example:

<iframe src="https://player.vimeo.com/video/76979871?background=1"      width="500" height="281" frameborder="0" webkitallowfullscreen      mozallowfullscreen allowfullscreen></iframe> 
like image 156
toby1kenobi Avatar answered Sep 19 '22 16:09

toby1kenobi


you will be using setVolume api in your vimeo.. player.api('setVolume', 0); it will be like this...

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>         <script src="//f.vimeocdn.com/js/froogaloop2.min.js"></script>         <iframe id="vimeo_player" src="http://player.vimeo.com/video/4415083?title=0&amp;byline=0&amp;portrait=0&amp;color=d01e2f&amp;autoplay=1&player_id=vimeo_player" width="500" height="281"  frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>         <script>         var iframe = $('#vimeo_player')[0],             player = $f(iframe),             status = $('.status');              player.addEvent('ready', function() {                 player.api('setVolume', 0);             });         </script> 
like image 25
gadss Avatar answered Sep 21 '22 16:09

gadss