Skip to content

Allow fullscreen and YouTube redirection for embedded YouTube videos #1260

@igorlicio

Description

@igorlicio

What problem does this feature solve?

Currently, embedded YouTube videos added via iframe in the editor come with a restrictive sandbox (allow-scripts allow-same-origin), which prevents users from:

  1. Watching the video in fullscreen directly in the editor.
  2. Opening the video in a new tab or redirecting to YouTube using a pop-up.

This limitation negatively impacts the user experience, especially when a more immersive viewing or native YouTube functionality is desired.

What does the proposed API look like?

I suggest allowing the iframe creation to accept additional options, such as:

{
  src: string,
  height?: number,
  width?: number,
  allowFullscreen?: boolean,  // Enables fullscreen
  allowPopup?: boolean        // Allows opening in a new tab or redirecting to YouTube
}

With allowFullscreen: true and allowPopup: true, the iframe could include the necessary attributes (allowfullscreen and allow-presentation) to enable fullscreen and YouTube redirection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions