| Summary: | Figure out whether a plug-in is playing audio | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Ada Chan <adachan> | ||||||
| Component: | Plug-ins | Assignee: | Ada Chan <adachan> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | adachan, ap, commit-queue, eric.carlson, jer.noble | ||||||
| Priority: | P2 | ||||||||
| Version: | 528+ (Nightly build) | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=139231 | ||||||||
| Attachments: |
|
||||||||
|
Description
Ada Chan
2014-09-29 11:20:05 PDT
We are proposing a new plugin API to accomplish this: When a plug-in starts or stops playing audio, the plug-in will call NPN_SetValue with the NPPVpluginIsPlayingAudio = 4000 NPPVariable. The value parameter should be TRUE if the audio started playing or FALSE if the audio stopped playing. The browser can query whether the plug-in is playing audio by calling NPP_GetValue with the NPPVpluginIsPlayingAudio NPPVariable. Created attachment 241059 [details]
Patch
Attachment 241059 [details] did not pass style-queue:
ERROR: Source/WebCore/plugins/npapi.h:383: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3]
Total errors found: 1 in 15 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 241061 [details]
Patch: fixed style check failure
Comment on attachment 241061 [details] Patch: fixed style check failure View in context: https://bugs.webkit.org/attachment.cgi?id=241061&action=review > Source/WebCore/plugins/npapi.h:383 > + , NPPVpluginIsPlayingAudio = 4000 Funny indentation here. (In reply to comment #5) > Comment on attachment 241061 [details] > Patch: fixed style check failure > > View in context: > https://bugs.webkit.org/attachment.cgi?id=241061&action=review > > > Source/WebCore/plugins/npapi.h:383 > > + , NPPVpluginIsPlayingAudio = 4000 > > Funny indentation here. I deliberately did that because the style checker was complaining that I had weird number of spaces at line start. I agree that consistency is more important. I'll fix the spacing to match the other lines. Thanks for the review! Committed: http://trac.webkit.org/changeset/175686 |