Skip to content
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

How should Media Session work with "inert" media? #305

Open
steimelchrome opened this issue Nov 17, 2023 · 6 comments
Open

How should Media Session work with "inert" media? #305

steimelchrome opened this issue Nov 17, 2023 · 6 comments

Comments

@steimelchrome
Copy link
Contributor

The inert attribute (spec) can be used to make elements unfocusable and uninteractable. It is not clear from the specification whether or not inertness should affect a media element's interaction with Media Session. Should it prevent Media Session actions from being sent to the page for that media element? Should it not affect Media Session at all?

FWIW, it currently does not affect Media Session on Chrome, and my initial reaction is that it shouldn't affect Media Session, but I think it's worth discussing

@marcoscaceres
Copy link
Member

marcoscaceres commented May 13, 2024

@jan-ivar, @youennf, thoughts?

  • What happens is a user plays, then an inert attribute is set, what happens.

@jan-ivar
Copy link
Member

If inertness doesn't affect playback I don't see why it should affect Media Session. Isn't it mostly for making modal dialogs?

@marcoscaceres
Copy link
Member

Isn't it mostly for making modal dialogs?

So, yes. It's useful for dialogs.

But what happens if you have an <iframe inert> that can't be interacted with and it starts controlling the media session?

It seems like scriptable aspects wouldn't be affected. It's just the user can't interact with the iframe.

I think that's what's being asked by @steimelchrome. Is that right?

@marcoscaceres
Copy link
Member

I guess we should also check what happens if you have a <video> and you play it and then add inert to it.

@marcoscaceres
Copy link
Member

Ok, we just tested it, and indeed you can inert a playing video... which is kinda annoying. We didn't check it with respect to media session though.

However, it remains a question of scriptability: even though it's inert, the media session should still handle the actions.

I don't know if we need to say anything here or in HTML... but maybe one of the specs needs a note about this.

@steimelchrome
Copy link
Contributor Author

FWIW I created this issue because a bug was opened against Chrome by a developer expecting Media Session to be disabled when an iframe is marked as inert: https://issues.chromium.org/40277135

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

No branches or pull requests

3 participants