[webkit-reviews] review granted: [Bug 127137] [iOS] HTMLMediaSession should set AudioSession category : [Attachment 221406] Proposed patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jan 16 22:06:47 PST 2014
Sam Weinig <sam at webkit.org> has granted Eric Carlson <eric.carlson at apple.com>'s
request for review:
Bug 127137: [iOS] HTMLMediaSession should set AudioSession category
https://bugs.webkit.org/show_bug.cgi?id=127137
Attachment 221406: Proposed patch
https://bugs.webkit.org/attachment.cgi?id=221406&action=review
------- Additional Comments from Sam Weinig <sam at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=221406&action=review
> Source/WebCore/html/HTMLMediaSession.cpp:58
> +#if PLATFORM(IOS)
> +static void initializeAudioSession()
> +{
> + static bool wasAudioSessionInitialized;
> + if (wasAudioSessionInitialized)
> + return;
> +
> + wasAudioSessionInitialized = true;
> + if (!WebCore::applicationIsMobileSafari())
> + return;
> +
> + AudioSession::sharedSession().setCategory(AudioSession::MediaPlayback);
> +}
> +#endif
Why do we only want to do this on iOS (and only in MobileSafari)?
> Source/WebCore/html/HTMLMediaSession.cpp:71
> +#if PLATFORM(IOS)
> + initializeAudioSession();
> +#endif
I would rather we always call this, and have it do nothing on platforms that
don't need it.
More information about the webkit-reviews
mailing list