Skip to content

Set PIP support based on the Picture in Picture API #2849

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ryanbrunner
Copy link

@ryanbrunner ryanbrunner commented Feb 12, 2025

Summary of proposed changes

Previously, picture in picture support was explicitly disabled on iPhones,and used the webkit specific APIs for Safari in general.

Safari (both mobile and desktop) has supported the Picture in Picture API since September 15, 2020 (https://caniuse.com/picture-in-picture) so there's no need to use the webkit API.

Additionally, picture in picture support appears to work on iPhones with this API, so the check is no longer necessary.

Tested on:

  • iPhone 14 (physical device)
  • iPad 9th gen (browserstack.com)

Negative tests

  • iPhone 11 (browserstack.com) - predates support but does not raise errors

ryanbrunner and others added 2 commits February 12, 2025 12:22
Previously, picture in picture support was explicitly disabled on iPhones,
and used the webkit specific APIs for Safari in general.

Safari (both mobile and desktop) has supported the Picture in Picture API
since September 15, 2020 (https://caniuse.com/picture-in-picture) so there's
no need to use the webkit API.

Additionally, picture in picture support appears to work on iPhones with this
API, so the check is no longer necessary.

Tested on:

- iPhone 14 (physical device)
- iPad 9th gen (browserstack.com)

Negative tests

- iPhone 11 (browserstack.com) - predates support but does not raise errorsoes not raise errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant