diff --git a/videojs.module b/videojs.module index c8616bc6683bcb5c2c0205eb5167269dd34b63ea..e4939018e30c51b884c266606da56a6f1e32ad10 100644 --- a/videojs.module +++ b/videojs.module @@ -31,7 +31,7 @@ function videojs_menu() { function videojs_theme() { return array( 'videojs' => array( - 'variables' => array('items' => NULL, 'player_id' => NULL, 'attributes' => NULL), + 'variables' => array('items' => NULL, 'player_id' => NULL, 'attributes' => NULL, 'entity' => NULL, 'entity_type' => NULL), 'template' => 'theme/videojs', 'file' => 'includes/videojs.theme.inc', ), @@ -113,6 +113,8 @@ function videojs_field_formatter_view($entity_type, $entity, $field, $instance, '#items' => $items, '#player_id' => 'videojs-' . $id . '-' . str_replace('_', '-', $instance['field_name']), '#attached' => videojs_add(FALSE), + '#entity' => $entity, + '#entity_type' => $entity_type, ), ); }