Bug 147080

Summary: Media Session: add infrastructure for testing ducking
Product: WebKit Reporter: Matt Rajca <mrajca>
Component: MediaAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: conrad_shultz, eric.carlson, mrajca, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 145411    
Attachments:
Description Flags
Patch
none
Patch
none
Patch jer.noble: review+

Description Matt Rajca 2015-07-18 21:52:49 PDT
We need a way of getting a media element's underlying media player's volume (which will be lowered when audio is ducked).
Comment 1 Radar WebKit Bug Importer 2015-07-18 21:53:17 PDT
<rdar://problem/21890395>
Comment 2 Matt Rajca 2015-07-18 21:57:31 PDT
Created attachment 257052 [details]
Patch
Comment 3 Matt Rajca 2015-07-19 09:35:17 PDT
Created attachment 257058 [details]
Patch
Comment 4 Matt Rajca 2015-07-23 14:46:33 PDT
Created attachment 257387 [details]
Patch
Comment 5 Jer Noble 2015-07-23 14:58:13 PDT
Comment on attachment 257387 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=257387&action=review

> Source/WebCore/html/HTMLMediaElement.cpp:6486
> +    if (m_player)
> +        return m_player->volume();
> +    return 0;

This could be more concisely stated as:

return m_player ? m_player->volume() : 0;
Comment 6 Matt Rajca 2015-07-23 15:03:35 PDT
(In reply to comment #5)
> Comment on attachment 257387 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=257387&action=review
> 
> > Source/WebCore/html/HTMLMediaElement.cpp:6486
> > +    if (m_player)
> > +        return m_player->volume();
> > +    return 0;
> 
> This could be more concisely stated as:
> 
> return m_player ? m_player->volume() : 0;

Fixed.
Comment 7 Matt Rajca 2015-07-23 15:04:01 PDT
Committed r187256: <http://trac.webkit.org/changeset/187256>