Problem/Motivation
When using the cookies_video with iframe / oembed rendering, the "Video is blocked" overlay is correctly shown, but when I accept via the button in the overlay or the cookie banner, the overlay does not get replaced by the activated iframe. Only after a page reload it shows the iframe with the video.
Steps to reproduce
Configure cookies with the remote_video entity and try to view a video while you have given no cookie consent yet.
The overlay text should appear with a button that allows you to accept the required cookies.
When clicking the button, nothing happens except the cookiesjsr cookie gets set.
To view the actual video, you have to reload the page.
Proposed resolution
When creating the overlay in "consentDenied" of "cookies_media.js", the selector 'iframe.cookies-video' is used.
Since iframes cannot have content, the ".cookiesOverlay" Code will somehow try to wrap it and thereby loose the iframe element itself, so it cannot be activated, once consent is given.
This does not happen, if it is run on the parent container of the iframe element, because this is a div and we can assume this is field markup or media wrapper markup related to the iframe.
So the easiest fix seems to run the ".cookiesOverlay" function on the parent of the iframe.
MR with such a change is attached.
Remaining tasks
Review the issue and proposed resolution.
User interface changes
None.
API changes
None.
Data model changes
None.