Bug 137219 - Figure out whether a plug-in is playing audio
Summary: Figure out whether a plug-in is playing audio
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Plug-ins (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ada Chan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-29 11:20 PDT by Ada Chan
Modified: 2014-12-03 12:50 PST (History)
5 users (show)

See Also:


Attachments
Patch (17.99 KB, patch)
2014-11-05 15:13 PST, Ada Chan
no flags Details | Formatted Diff | Diff
Patch: fixed style check failure (17.99 KB, patch)
2014-11-05 15:19 PST, Ada Chan
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ada Chan 2014-09-29 11:20:05 PDT
This is similar to https://bugs.webkit.org/show_bug.cgi?id=137218, but for handling plug-ins.

This is needed for https://bugs.webkit.org/show_bug.cgi?id=137048.
Comment 1 Ada Chan 2014-11-04 14:32:51 PST
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.
Comment 2 Ada Chan 2014-11-05 15:13:47 PST
Created attachment 241059 [details]
Patch
Comment 3 WebKit Commit Bot 2014-11-05 15:15:22 PST
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.
Comment 4 Ada Chan 2014-11-05 15:19:14 PST
Created attachment 241061 [details]
Patch: fixed style check failure
Comment 5 Anders Carlsson 2014-11-05 17:09:36 PST
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.
Comment 6 Ada Chan 2014-11-05 17:17:12 PST
(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!
Comment 7 Ada Chan 2014-11-05 23:51:12 PST
Committed:
http://trac.webkit.org/changeset/175686