Bug 189885 - Picture-in-Picture cannot be initiated when tab is not visible
Summary: Picture-in-Picture cannot be initiated when tab is not visible
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Safari Technology Preview
Hardware: Macintosh macOS 10.13
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2018-09-22 08:21 PDT by rob.stone
Modified: 2018-09-22 19:53 PDT (History)
4 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description rob.stone 2018-09-22 08:21:11 PDT
When attempting to initiate picture-in-picture mode with `webkitSetPresentationMode("picture-in-picture")` while the tab is not visible, the following error occurs: `HTMLMediaElement::enterFullscreen(C4262CD8)   returning because document is hidden`.

While full screen mode should not be allowed to initiate when tab is not visible, picture-in-picture should not be subject to this same rule.
Comment 1 Alexey Proskuryakov 2018-09-22 15:00:59 PDT
What is the scenario where a user would want an invisible tab to start PiP?
Comment 2 rob.stone 2018-09-22 19:53:06 PDT
When navigating to another tab or app, it is convenient to automatically invoke picture-in-picture as occurs on iPad.

Undesired launches of picture-in-picture mode would not be likely due to the rules on auto-play media.