[webkit-reviews] review granted: [Bug 208714] Move AudioSession interruption listener code to AudioSession : [Attachment 393030] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 10 07:39:52 PDT 2020


Jer Noble <jer.noble at apple.com> has granted youenn fablet <youennf at gmail.com>'s
request for review:
Bug 208714: Move AudioSession interruption listener code to AudioSession
https://bugs.webkit.org/show_bug.cgi?id=208714

Attachment 393030: Patch

https://bugs.webkit.org/attachment.cgi?id=393030&action=review




--- Comment #14 from Jer Noble <jer.noble at apple.com> ---
Comment on attachment 393030
  --> https://bugs.webkit.org/attachment.cgi?id=393030
Patch

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

r=me with nits:

> Source/WebCore/platform/audio/AudioSession.h:103
> +    class InterruptionObserver : public CanMakeWeakPtr<InterruptionObserver>
{
> +    public:
> +	   virtual ~InterruptionObserver() = default;
> +
> +	   virtual void
beginAudioSessionInterruption(PlatformMediaSession::InterruptionType) = 0;
> +	   virtual void
endAudioSessionInterruption(PlatformMediaSession::EndInterruptionFlags) = 0;
> +    };

InterruptionObserver shouldn't use PlatformMediaSession enums; it should export
its own.

> Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm:55
> +    // FIXME: We probably want each interested media session to observe
audio interruptions directly.
> +    AudioSession::sharedSession().addInterruptionObserver(*this);

I don't think we need this FIXME. The session manager should be the one which,
e.g., decides which session is resumed after an interruption ends.


More information about the webkit-reviews mailing list