Remove youtube Controls & Info in PrettyPhoto

1.1k views Asked by At

This one is tricky, it works if you embed the code with an iframe:

<iframe width="560" height="315" src="http://www.youtube.com/watch?v=gzKAut3sVrw?rel=0&controls=0&showinfo=0" frameborder="0" allowfullscreen></iframe>

However using PrettyPhoto i need to use it like this: http://www.youtube.com/watch?v=gzKAut3sVrw?rel=0&controls=0&showinfo=0 the only thing working here is the rel=0

any ideas on how to make it work?

1

There are 1 answers

0
arippberger On

I was also struggling to hide YouTube controls when using PrettyPhoto. PrettyPhoto lets you specify iframe markup. This is where you have to add your extra YouTube parameters (after {path}).

    <script type="text/javascript" charset="utf-8">
    $(document).ready(function(){
        $("a[rel^='prettyPhoto']").prettyPhoto({
            keyboard_shortcuts: false,
            iframe_markup: '<iframe src ="{path}&amp;controls=0&amp;showinfo=0" width="{width}" height="{height}" frameborder="no"></iframe>'
        });
    });
    </script>