added custom video overlay player to avoid to load all the iframe systematicly
This commit is contained in:
@@ -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().
|
||||
|
||||
Reference in New Issue
Block a user