Iframe exiting full-screen immediately

Hello everybody,

i’m working on an app that needs to load videos from an API, i fixed this using iframes.

Basically the API sends a youtube video and i decided to show it with iframes (i don’t know any better tbh).

Problem is, even if i allow the fullscreen mode of the iframe, when i click on it it closes almost immediately, both on Android and in the browser.

          <iframe  [src]="this.sanitizer.bypassSecurityTrustResourceUrl(i.url)"
                   width="560" height="315" frameborder="0" align="middle" allowfullscreen>
          </iframe>

This is a gif that showcases the problem:

look i was searched a lot from this problem but no solution so you can use

thanks

That’s an alternative i guess. I see you posted for the same exact problem, so it’s actually a bug? Full Screen problem with embed video from youtube

anyways this is not what i’m looking for, i want to embeed a video in a card (as you can see from the gif i posted) but this plugin opens a video in the youtube player, right?

Just opened an issue

Hmm yes .it’s for YouTube .

The issue seems to be caused by the url being passed through this.sanitizer.bypassSecurityTrustResourceUrl()

When i replace this with the original URL the api is giving me ( https://www.youtube.com/embed/sNUNB6CMnE8 ) the fullscreen works as expected. Any ideas why?