Attaching a javascript file on H5P pages in a custom module in drupal 8
I am creating a new module in which a have a js which i want to integrate on pages which have h5p content. At present I am using the hook element info alter as follows
function memodule_element_info_alter(array &$types)
{
if (isset($types['html']))
{ $types['html']['#attached']['library'][] = 'mymodule/mymodule';