Drupal H5P Agamotto

Hi,

We have successfully embedded other H5P CTs on our site, they are all working fine; Agamotto is the first one we are having a couple of issues with:

- after changing embedTypes to div (rather than iframe), slider position on mousemove (or mousedown) is out of position. I guess it is calculated based on screen width (that's not the issue with the iframe because iframe is web page on it's own and it's always 'full width'). Do you have any idea how to avoid that?

- animations (interactions) are very slow, unresponsive, and not so smooth (that's not happening when in an iframe)

  1. Bug: We embedded Agamotto CT as a div instead of an iframe
  2. Platform: Drupal
  3. Mobile or Desktop: both
  4. Browser: all
  5. H5P plugin version: https://www.drupal.org/project/h5p/releases/8.x-1.0-rc17
  6. H5P content type: Agamotto 1.5
  7. Any browser console errors: no
  8. Any PHP errors: no

Please let me know if you need additional information.

Thanks for the help,

Klemen

PS: I recorded video, but the .mov file type is not supported, so I converted it to gif. Hope it's still visible and will be helpful.

Content types: 
otacke's picture

Hi AccessKlemen!

You are correct. Agamotto was not designed to work in a div container as it assumes to have the safe environment of the iframe. That's why it explicitly only lists `iframe` as embed option. You'll have to modify the code yourself if you want it to run in a div container. Same goes for computing the transition images. I don't know why being in a div container would make a difference here, but maybe you'll find out why.

Cheers,
Oliver

otacke's picture

Hi AccessKlemen!

Addendum: If you're running version 1.5 (1.5.2 of March 2020 is the latest that's available on the H5P Hub), then the positioning actually may have been a bug that was fixed in March 2021. Also, the performance was improved in January 2021. So in fact all that may be necessary is using the latest version 1.6.2.

Unfortunately, I don't know when the H5P core team will upgrade their version on the H5P Hub though.

Best,
Oliver

p. s.: My previous answer regarding running it in a div container holds. Do that at your own risk.