logo fond blanc, youtube autoplay

This commit is contained in:
2017-03-02 18:34:05 +01:00
parent 32c264371e
commit a4bd434e68
12 changed files with 139 additions and 79 deletions
@@ -0,0 +1,11 @@
--- video_embed_field.handlers.inc
+++ video_embed_field.handlers.inc
@@ -195,7 +195,7 @@ function video_embed_field_handle_youtube($url, $settings) {
// Construct the embed code.
$settings['wmode'] = 'opaque';
- $settings_str = urlencode(_video_embed_code_get_settings_str($settings));
+ $settings_str = _video_embed_code_get_settings_str($settings);
$output['#markup'] = '<iframe class="' . check_plain($class) . '" width="' . check_plain($settings['width']) . '" height="' . check_plain($settings['height']) . '" src="//www.youtube.com/embed/' . $id . '?' . $settings_str . '" frameborder="0" allowfullscreen></iframe>';
@@ -195,7 +195,7 @@ function video_embed_field_handle_youtube($url, $settings) {
// Construct the embed code.
$settings['wmode'] = 'opaque';
$settings_str = urlencode(_video_embed_code_get_settings_str($settings));
$settings_str = _video_embed_code_get_settings_str($settings);
$output['#markup'] = '<iframe class="' . check_plain($class) . '" width="' . check_plain($settings['width']) . '" height="' . check_plain($settings['height']) . '" src="//www.youtube.com/embed/' . $id . '?' . $settings_str . '" frameborder="0" allowfullscreen></iframe>';
@@ -617,7 +617,7 @@ function _video_embed_code_get_settings_str($settings = array()) {
$values[] = $name;
}
else {
$values[] = $name . '=' . $value;
$values[] = $name . '=' . urlencode($value);
}
}
@@ -70,11 +70,18 @@
width:w,
height:h,
windowSourceID:"#videoframe",
functionCallOnClose:true,
functionCallAfterClose:function(){
$('#videoframe').remove();
}
// functionCallOnClose:function(){
// console.log('overlay closed');
// $('#videoframe').remove();
// },
// functionCallAfterClose:function(){
// console.log('overlay closed');
// $('#videoframe').remove();
// }
});
// autoplay vid youtube
// see patch https://www.drupal.org/node/2685721#comment-11032685
};
function onCloseOverlay(){
@@ -33,7 +33,7 @@ function _clameursmod_getemvidfield(){
$data['test'] = "OK";
$data['src'] = $_GET['src'];
$data['embed'] = theme('video_embed_field_embed_code', array('url'=>$data['src']));
$data['embed'] = theme('video_embed_field_embed_code', array('url'=>$data['src'], 'style'=>'normal'));
drupal_json_output($data);
}