[FIX] website: restore video loading on page load

Commit [1] broke the building of iframes in existing databases.

[1]: https://github.com/odoo/odoo/commit/b9b29bac14242eb88fc83a1fe5ba2472b64c24ea

opw-2832238

closes odoo/odoo#89778

X-original-commit: fd2aade90123af1bac02d8ab3fcca9741b0aaf33
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
qsm-odoo
2022-04-27 07:52:29 +02:00
parent 5cd1179329
commit be2114de01
@@ -712,11 +712,13 @@ registry.mediaVideo = publicWidget.Widget.extend(MobileYoutubeAutoplayMixin, {
// Unsupported domain, don't inject iframe
return;
}
return this.$target.append($('<iframe/>', {
const iframeEl = $('<iframe/>', {
src: src,
frameborder: '0',
allowfullscreen: 'allowfullscreen',
}))[0];
})[0];
this.$target.append(iframeEl);
return iframeEl;
},
});