Skip to content

Distiguishing manually triggered vs automatically triggered enterpictureinpicture #358

@steimelchrome

Description

@steimelchrome

We added an enterpictureinpicture action with #295. Initially, that PR made the MediaSessionActionDetails of that action include a boolean indicating whether or not this was via an explicit user action (e.g. clicking a picture-in-picture button in the UA's UI) vs automatically triggered by the UA (e.g. because the page became hidden).

I thought the boolean (or some equivalent enum or other way to distinguish the two cases) could be useful for websites, but I didn't have any explicit use cases at the time, so after discussion in a Media WG meeting we decided to remove the boolean.

However, we've gotten some feedback from websites that being able to distinguish would be useful. One particular case is a video playback site that wants to fine-tune when it autopips vs not based on different criteria (type of video playing, how long it's playing, how the user generally interacts with pip, etc). They want the user actually clicking a pip button to always work (so they need to be registered for the enterpip action), but they want to ignore autopipping in some cases (so they need to know which it is when they receive the callback).

I propose we add a boolean to the MediaSessionActionDetails as initially proposed, but I'm open to feedback/bikeshedding

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