Youtube Shortcode – Autohide Player controls
-
Hi There!
I was wondering if you could implement the youtube embed attribute “autohide” with the youtube shortcode that is being added by jetpack.
I changed the url output by adjusting it in your plugin files to achieve the goal. But this will be overwritten in the next update ?? Maybe you could add this functionality by default? Its just a tiny code adjustment:
file: wp-content/plugins/jetpack/modules/shortcodes/youtube.php
Line 295-297 to be changed as follows:
} else { $html = "<span class='embed-youtube' style='$alignmentcss display: block;'><iframe class='youtube-player' type='text/html' width='$w' height='$h' src='" . esc_url( set_url_scheme( "https://www.youtube.com/embed/$id?version=3&rel=$rel&autohide=1&fs=1$fmt&showsearch=$search&showinfo=$info&iv_load_policy=$iv$start$end$hd&wmode=$wmode$theme$autoplay{$cc}{$cc_lang}" ) ) . "' frameborder='0' allowfullscreen='true'></iframe></span>"; }
I simply added the autohide=1 attribute to the url that is being generated by the shortcode.
Thanks
Sas
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Youtube Shortcode – Autohide Player controls’ is closed to new replies.