Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
im trying to use the api. i created a module, enabled it and using following code:
function drupcamvideo_video_embed_handler_info(){
$handlers['drupcamvideo'] = array(
'title' => 'DrupCam Video',
'function' => 'drupcamvideo_handle',
#'thumbnail_function' => 'video_embed_field_handle_vimeo_thumbnail',
'form' => 'drupcamvideo_form',
'domains' => array(
'video-content.com'
),
'defaults' => array(
'width' => 640,
'height' => 360,
'color' => '00adef',
'autoplay' => 0,
),
);
}
everything works (handle & form function, also video is shown properly) fine if i put my code directly into your module... so this should be ok. but when im trying to use the hook my handler will be ignored.
in your video_embed_get_handlers() function i printed the $handlers array but it only shows the default vime & youtube handler.
Comments
Comment #1
N20 CreditAttribution: N20 commenteddamn... i forgot to put a return $handlers in my function...
everything works now.
Comment #2
N20 CreditAttribution: N20 commentedComment #3
gokuast CreditAttribution: gokuast commentedI don't understand. Where did you put this code. In what file? on what line? I am so confused when it come to this module. How do I create my own provider? By that I mean make myself a provider? I really don't get the documentation. A little help...? Anyone...?