Bug 217803

Summary: Move even more AudioContext-specific logic out of BaseAudioContext
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: Web AudioAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, eric.carlson, ews-watchlist, ggaren, glenn, jer.noble, philipj, sergio, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 217794    
Bug Blocks: 212611    
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Chris Dumez 2020-10-15 20:14:01 PDT
Move even more AudioContext-specific logic out of BaseAudioContext and into AudioContext. In particular, all the logic related to autoplay restrictions, audible state, and platform media session interruptions only apply to AudioContext and not OfflineAudioContext.
Comment 1 Chris Dumez 2020-10-15 20:18:02 PDT
Created attachment 411526 [details]
Patch
Comment 2 Eric Carlson 2020-10-16 08:18:25 PDT
Comment on attachment 411526 [details]
Patch

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

> Source/WebCore/Modules/webaudio/AudioContext.cpp:390
> +            RELEASE_LOG_IF_ALLOWED("visibilityStateChanged() Suspending playback after going to the background");

Any reason to not use `ALWAYS_LOG(LOGIDENTIFIER, ...)` so the output is in the same format as the rest of the logging from this class?

> Source/WebCore/Modules/webaudio/AudioContext.cpp:395
> +            RELEASE_LOG_IF_ALLOWED("visibilityStateChanged() Resuming playback after entering foreground");

Ditto.
Comment 3 Chris Dumez 2020-10-16 10:01:23 PDT
Created attachment 411590 [details]
Patch
Comment 4 EWS 2020-10-16 10:10:31 PDT
ChangeLog entry in LayoutTests/ChangeLog contains OOPS!.
Comment 5 Chris Dumez 2020-10-16 10:59:47 PDT
Created attachment 411596 [details]
Patch
Comment 6 EWS 2020-10-16 11:32:05 PDT
Committed r268600: <https://trac.webkit.org/changeset/268600>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 411596 [details].
Comment 7 Radar WebKit Bug Importer 2020-10-16 11:33:16 PDT
<rdar://problem/70385620>