-
Notifications
You must be signed in to change notification settings - Fork 30
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
Simplify MediaSession somewhat to not require audio playback #17
Conversation
This is motivated by @jernoble's explanation of the iOS model, as it does not seem like media playback is required, only an active media session. This hasn't been verfied, however: w3c#9 (comment)
|
||
## The `MediaSession` Interface | ||
|
||
```WebIDL | ||
enum MediaSessionState { "idle", "playing", "paused", "ducking", "suspended" }; | ||
typedef (HTMLMediaElement or AudioContext) MediaSessionMember; | ||
enum MediaSessionKind { "ambient", "main", "voice" }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
main
is not very clear relative to the others. default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I've renamed it and also added it to the constructor. I assume that these categories are all wrong and will need be tweaked ~42 times.
Some out-of-band comments from @marcoscaceres:
I agree, some of this stuff should happen automatically, I'm just not sure where such default behavior belongs. One could keep the association between If we start with an API that makes it possible to implement everything you want in scripts, then I'm confident we could define the defaults in terms of that API. I think this is important and could influence the shape of the API, but it isn't at the very core of things. |
I'm not sure this is correct. For example, see this question on StackOverflow. This answer suggests that a developer can intercept and use remote control events for another purpose (e.g. to control an ongoing slideshow) only by silently playing out some audio and intercepting that silent audio's corresponding remote control events (see the Obj-C code here). This also presumably applies to obtain hardware remote controls access too. |
That is exactly the call required on iOS. Perhaps there is a way around this. For example, a user agent on iOS could run a hack where it loops some local silent transient audio and then we re-route associated remote control events to |
@jernoble, have you been able to verify the requirements? We're all too incompetent at writing iOS apps to try it ourselves :) |
@foolip Would it make sense to split this in to separate PRs as follows: PR1: WebIDL changes (i.e. the introduction of WDYT? |
The removal of |
61299ce
to
0909024
Compare
0909024
to
7661304
Compare
I have fiddled some more and am just going to go ahead and merge as I think this is a better structure for discussion. I've pointed out the issues I'm aware of, let's continue discussing in those issues. |
Simplify MediaSession somewhat to not require audio playback
This is motivated by @jernoble's explanation of the iOS model, as it
does not seem like media playback is required, only an active media
session. This hasn't been verfied, however:
#9 (comment)