Customized embed


In Drupal 8 H5P, I need to add a external javascript file to embed.php (vendor\h5p\h5p-core\embed.php)

What would be the best way to achieve this so that after updating the module I would not have to do It again. 

Is it possible to override embed.php in theme? 

(the js is iframe reziser)