Allow full screen for Dynamic Content Macro

Hello.
I need to allow my macro content in iframe to show in full screen mode, but I can’t find in docs how to configure my macro iframe to render in page with necessary attributes (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#Attributes). Is there a possibility to configure iframe in that way?

I also have such a requirement. There are already a few discussions around this topic on this forum. I am putting together some learnings I made from here and some other articles: (WIP) https://app.gitbook.com/@mrcoder/s/today-i-learned/20210324-atlassian-confluence-fullscreen-dialog

We’ve had the same problem with a video player in our macro that we wanted to be able to go into fullscreen.

The problem is that Connect iframes are missing the allowfullscren attribute. We found one ugly hack though: From your macro, via JavaScript, you can open a dialog module (AP.dialog.create) that can then take the full screen. This however requires another iframe to be loaded and is really bad UX because what would usually a be an instant transition into fullscreen mode of our video player now can take several seconds.

Generally, it would be really nice to be able to go fullscreen with your Connect macros. The Atlassians that I’ve spoken to about this said that Connect iframes won’t be getting the allowfullscreen attribute for security reasons. But given that you can essentially already do this via the Dialog hack, I do not understand what security implications there would be in this case.

Cheers,
Sven

2 Likes

It seems to me like the Connect iframe security constraints could be controlled by new scopes that an app could request in its descriptor. For example, an “allow_full_screen” scope would apply that attribute to the frame, but only if the admin installing the app decided to accept that scope at installation time.

1 Like