diff --git a/modules/islandora_videojs/islandora_videojs.info.yml b/modules/islandora_videojs/islandora_videojs.info.yml new file mode 100644 index 00000000..f5f41547 --- /dev/null +++ b/modules/islandora_videojs/islandora_videojs.info.yml @@ -0,0 +1,7 @@ +name: 'Islandora Videojs' +description: 'Islandora Videojs overrides' +type: module +package: Islandora +core: 8.x +dependencies: + - islandora diff --git a/modules/islandora_videojs/islandora_videojs.module b/modules/islandora_videojs/islandora_videojs.module new file mode 100644 index 00000000..6e6a40d7 --- /dev/null +++ b/modules/islandora_videojs/islandora_videojs.module @@ -0,0 +1,56 @@ +' . t('About') . ''; + $output .= '
' . t('Islandora Videojs overrides.') . '
'; + $output .= '' . t('Customizes videojs.') . '
'; + return $output; + + default: + } +} + + +function islandora_videojs_theme_registry_alter(&$theme_registry) { + $module_path = drupal_get_path('module', 'islandora_videojs'); + + // Use the templates in my module's template folder. + $theme_registry['videojs'] = $theme_registry['videojs']; + $theme_registry['videojs']['path'] = $module_path . '/templates'; + $theme_registry['videojs']['template'] = 'videojs'; +} + + +function islandora_videojs_theme($existing, $type, $theme, $path) { + return array( + 'videojs' => array( + 'variables' => array('items' => NULL, 'player_attributes' => NULL, 'testvar' => 'testvalue'), + 'base hook' => 'videojs' + ), + ); +} + + + + diff --git a/modules/islandora_videojs/templates/videojs.html.twig b/modules/islandora_videojs/templates/videojs.html.twig new file mode 100644 index 00000000..0c9b0375 --- /dev/null +++ b/modules/islandora_videojs/templates/videojs.html.twig @@ -0,0 +1,23 @@ +{# +/** + * @file + * Default theme implementation to display a formatted video field. + * + * Available variables: + * - items: A collection of videos. + * - player_attributes: Player options including the following: + * - width: The width of the video (if known). + * - height: The height of the video (if known). + * - autoplay: Autoplay on or off + * + * @ingroup themeable + */ +#} +