added custom video overlay player to avoid to load all the iframe systematicly

This commit is contained in:
2017-02-11 13:12:11 +01:00
parent 990c5b5edf
commit 786f561936
10 changed files with 173 additions and 60 deletions
@@ -1,21 +1,43 @@
<?php
/**
* Implements hook_init().
*/
function clameursmod_init() {
if ($path = libraries_get_path('jquery.domwindow')) {
// Do something with the library, knowing the path, for instance:
drupal_add_js($path . '/jquery.DOMWindow.js');
}
drupal_add_js(drupal_get_path('module', 'clameursmod').'/clameursmod.js');
}
/**
* Implements hook_menu().
*/
// function clameursmod_menu() {
// $items['accueil'] = array(
// 'title' => '',
// 'page callback' => '',
// 'page arguments' => array(),
// 'access arguments' => array(''),
// 'type' => ,
// 'file' => ,
// );
//
// return $items;
// }
function clameursmod_menu() {
$items['clameursmod/getemvidfield'] = array(
'page callback' => '_clameursmod_getemvidfield',
'page arguments' => array(),
'access callback' => TRUE,
'type' => MENU_CALLBACK,
// 'file' => ,
);
return $items;
}
function _clameursmod_getemvidfield(){
$data = array();
$data['test'] = "OK";
$data['src'] = $_GET['src'];
$data['embed'] = theme('video_embed_field_embed_code', array('url'=>$data['src']));
drupal_json_output($data);
}
/**
* Implements hook_entity_info_alter().