How to add js to H5P embed.php file? H5P module creates iframes and shows content in the iframe. I need to add a js file in the iframe, but I'm not able to do it. 

In the documentation there is an example how to add js to h5p:

/**
 * Add scripts to h5ps
 *
 * @param array $scripts
 *  Array of objects with properties path and version. Version is on the form
 *  ?ver=1.0.2 and is used as a cache buster
 * @param array $libraries
 *  Array of libraries indexed by the library's machineName and with an array
 *  as value. The value has the properties majorVersion and minorVersion
 * @param string $mode
 *  What mode are we in? Possible values are "editor", "div", "iframe" and "external"
 */
function hook_h5p_scripts_alter(&amp;$scripts, $libraries, $mode) {
  if (isset($libraries['H5P.MultiChoice']) &amp;&amp; $libraries['H5P.MultiChoice']['majorVersion'] == '1') {
    $scripts[] = (object) array(
      // Path relative to drupal root
      'path' =&gt; drupal_get_path('module', 'mymodule') . '/h5p-overrides.js',
      // Cache buster
      'version' =&gt; '?ver=1',
    );
  }
}


I have created a module, added that script in the .module file and created the overrides.js. But I am not able to get it working, the js file is not added. 
What else should I add in the .module file than this script above?
You need to replace HOOK with your module name. As well as MYMODULE.