diff --git a/src/core/h5p/components/h5p-player/core-h5p-player.html b/src/core/h5p/components/h5p-player/core-h5p-player.html index 22981316f..bdd88f6c4 100644 --- a/src/core/h5p/components/h5p-player/core-h5p-player.html +++ b/src/core/h5p/components/h5p-player/core-h5p-player.html @@ -9,5 +9,5 @@ - + diff --git a/src/core/h5p/components/h5p-player/h5p-player.ts b/src/core/h5p/components/h5p-player/h5p-player.ts index 359be26cc..4804c4dbf 100644 --- a/src/core/h5p/components/h5p-player/h5p-player.ts +++ b/src/core/h5p/components/h5p-player/h5p-player.ts @@ -269,17 +269,11 @@ export class CoreH5PPlayerComponent implements OnInit, OnChanges, OnDestroy { } /** - * Send hello to the H5P iframe. - * - * @param iframe The iframe. + * H5P iframe has been loaded. */ - sendHello(iframe?: HTMLIFrameElement): void { - const ready = { - context: 'h5p', - action: 'ready' - }; - - iframe.contentWindow.postMessage(ready, '*'); + iframeLoaded(): void { + // Send a resize event to the window so H5P package recalculates the size. + window.dispatchEvent(new Event('resize')); } /**