Skip to content

Issue with fullscreen mode triggered from iframe #713

Description

@joedolson

Originally reported by @boondaburra on #493.

@terrill I've encountered the same issue on a desktop browser and have a potential fix

Issue:

When domain A includes an iframe on domain B containing media without setting iframe/@allowfullscreen = true, the Able Player fullscreen button will fail to open the media in true fullscreen mode. This is the correct behavior because the iframe is on a different domain, and the expected fallback for Able Player is a modal. That modal opens without a title (#modalTitle-____) or close button (.modalCloseButton) and cannot be removed from view, as seen in the iOS video reported initially and the screenshot below:

screenshot of fullscreen modal fallback in iframe without Close button

  1. affects Able Player v4.5.0

  2. tested in Chrome 116 and Firefox 112 on Windows 10

This is a special case and it's worth noting:

  1. setting iframe/@allowfullscreen = true avoids the issue altogether and is the best solution overall as it safely produces the expected fullscreen behavior instead of the fallback modal

  2. if the iframe is on the same domain as the containing page, the requestFullscreen JavaScript method is not blocked by the browser's security and this issue does not arise

  3. when the issue arises, the only solution for a user is to reload the entire page or, if they're savvy, the iframe

  4. I know this is an old issue, and I can open a new one if that's preferred or they're truly not related

Partial solution:

  1. control.js Line 1488 - setFullscreen function handles the request for fullscreen

  2. Line 1538 - begins Non-native fullscreen support through modal dialog

  3. Line 1549 - calls AccessibleDialog

  4. value for parameter fullscreen is true. Changing to false partially fixes modal and seems the appropriate value

  5. This change enables the modal's title and close button, allowing the modal to be closed. The "Enter full screen" button on the player's controls doesn't change to "Exit full screen" (see screenshot below)

screenshot of hacked fullscreen modal fallback in iframe with modal elements enabled

Originally posted by @boondaburra in #493

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions