| Summary: | Media Session: notify focus manager clients when the playing state of the focused media element changes | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Matt Rajca <mrajca> | ||||||||||||
| Component: | Media | Assignee: | Nobody <webkit-unassigned> | ||||||||||||
| Status: | RESOLVED FIXED | ||||||||||||||
| Severity: | Normal | CC: | conrad_shultz, eric.carlson, mrajca, webkit-bug-importer | ||||||||||||
| Priority: | P2 | ||||||||||||||
| Version: | 528+ (Nightly build) | ||||||||||||||
| Hardware: | All | ||||||||||||||
| OS: | All | ||||||||||||||
| Bug Depends on: | |||||||||||||||
| Bug Blocks: | 145411 | ||||||||||||||
| Attachments: |
|
||||||||||||||
|
Description
Matt Rajca
2015-08-06 14:06:41 PDT
Created attachment 258396 [details]
Patch
Comment on attachment 258396 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=258396&action=review > Source/WebKit2/UIProcess/API/C/WKMediaSessionFocusManager.h:40 > +typedef void (*WKMediaSessionFocusManagerDidChangePlayingState)(WKMediaSessionFocusManagerRef manager, bool isPaused, const void *clientInfo); Will this ever have to handle more than play/pause state changes? If so, I recommend changing the names to PlaybackState instead of PlayingState and passing flags instead of a bool. (In reply to comment #2) > Comment on attachment 258396 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=258396&action=review > > > Source/WebKit2/UIProcess/API/C/WKMediaSessionFocusManager.h:40 > > +typedef void (*WKMediaSessionFocusManagerDidChangePlayingState)(WKMediaSessionFocusManagerRef manager, bool isPaused, const void *clientInfo); > > Will this ever have to handle more than play/pause state changes? If so, I > recommend changing the names to PlaybackState instead of PlayingState and > passing flags instead of a bool. Good idea. In the future, we'll also need to notify clients whenever the previous/next track controls should be enabled/disabled. I'll generalize this code path so we can use it for said events. Created attachment 258419 [details]
Patch
Created attachment 258421 [details]
Patch
Created attachment 258422 [details]
Patch
Created attachment 258423 [details]
Patch
Committed r188097: <http://trac.webkit.org/changeset/188097> |