diff --git a/src/core/directives/external-content.ts b/src/core/directives/external-content.ts index e8a6975d8..7bda6336e 100644 --- a/src/core/directives/external-content.ts +++ b/src/core/directives/external-content.ts @@ -277,6 +277,13 @@ export class CoreExternalContentDirective implements AfterViewInit, OnChanges { this.loaded = false; this.waitForLoad(); } + + if (targetAttr == 'poster') { + // Setting the poster immediately doesn't display it in some cases. Set it to empty and then set the right one. + this.element.setAttribute(targetAttr, ''); + await CoreUtils.nextTick(); + } + this.element.setAttribute(targetAttr, finalUrl); this.element.setAttribute('data-original-' + targetAttr, url); }