Bug 236993 - [iOS] WebKit app is sometimes not "Now Playing" during initial playback
Summary: [iOS] WebKit app is sometimes not "Now Playing" during initial playback
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-02-21 13:19 PST by Jer Noble
Modified: 2022-03-23 12:22 PDT (History)
12 users (show)

See Also:


Attachments
Patch (14.16 KB, patch)
2022-02-21 13:30 PST, Jer Noble
eric.carlson: review+
Details | Formatted Diff | Diff
Patch for landing (14.16 KB, patch)
2022-02-21 13:39 PST, Jer Noble
no flags Details | Formatted Diff | Diff
Patch for landing (14.26 KB, patch)
2022-02-21 13:53 PST, Jer Noble
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch for landing (14.27 KB, patch)
2022-02-21 14:56 PST, Jer Noble
no flags Details | Formatted Diff | Diff
Patch for landing (17.76 KB, patch)
2022-02-22 17:15 PST, Jer Noble
no flags Details | Formatted Diff | Diff
Patch for landing (17.82 KB, patch)
2022-02-23 16:12 PST, Jer Noble
no flags Details | Formatted Diff | Diff
Patch for landing (20.64 KB, patch)
2022-02-28 08:52 PST, Jer Noble
no flags Details | Formatted Diff | Diff
Patch for landing (20.67 KB, patch)
2022-03-16 16:01 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch for landing (22.20 KB, patch)
2022-03-20 22:42 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch for landing (8.04 KB, patch)
2022-03-20 22:44 PDT, Jer Noble
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2022-02-21 13:19:03 PST
[iOS] WebKit app is sometimes not "Now Playing" during initial playback
Comment 1 Jer Noble 2022-02-21 13:20:02 PST
<rdar://88827167>
Comment 2 Jer Noble 2022-02-21 13:30:35 PST
Created attachment 452764 [details]
Patch
Comment 3 Eric Carlson 2022-02-21 13:37:05 PST
Comment on attachment 452764 [details]
Patch

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

> Source/WebCore/html/HTMLMediaElement.cpp:5715
> +#if USE(AUDIO_SESSION)
> +    m_categoryAtMostRecentPlayback = AudioSession::sharedSession().category();
> +#endif

Don't we also want to do this before calling `m_player->playAtHostTime`?
Comment 4 Jer Noble 2022-02-21 13:38:26 PST
(In reply to Eric Carlson from comment #3)
> Comment on attachment 452764 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=452764&action=review
> 
> > Source/WebCore/html/HTMLMediaElement.cpp:5715
> > +#if USE(AUDIO_SESSION)
> > +    m_categoryAtMostRecentPlayback = AudioSession::sharedSession().category();
> > +#endif
> 
> Don't we also want to do this before calling `m_player->playAtHostTime`?

Good point! I'll move the setter up inside this function.
Comment 5 Jer Noble 2022-02-21 13:39:40 PST
Created attachment 452767 [details]
Patch for landing
Comment 6 Jer Noble 2022-02-21 13:53:53 PST
Created attachment 452772 [details]
Patch for landing
Comment 7 Jer Noble 2022-02-21 14:56:32 PST
Created attachment 452779 [details]
Patch for landing
Comment 8 Jer Noble 2022-02-22 17:15:29 PST
Created attachment 452921 [details]
Patch for landing
Comment 9 Aakash Jain 2022-02-23 15:22:24 PST
I cancelled https://ews-build.webkit.org/#/builders/73/builds/933 to speed-up mac-wk1 queue. It finished layout-test run and indicated a test failure: media/audio-session-category-at-most-recent-playback.html
Comment 10 Jer Noble 2022-02-23 16:12:35 PST
Created attachment 453045 [details]
Patch for landing
Comment 11 Aakash Jain 2022-02-24 06:59:57 PST
I cancelled https://ews-build.webkit.org/#/builders/73/builds/1061 to speed up mac-wk1 queue. It already run layout-tests and indicated this failure: media/audio-session-category-at-most-recent-playback.html
Comment 12 Jer Noble 2022-02-28 08:52:45 PST
Created attachment 453393 [details]
Patch for landing
Comment 13 Jer Noble 2022-03-16 15:56:10 PDT
Test is failing WK1 bots because `DeprecatedGlobalSettings::shouldManageAudioSessionCategory()` is false there. Will update TestExpectations and re-upload.
Comment 14 Jer Noble 2022-03-16 16:01:45 PDT
Created attachment 454905 [details]
Patch for landing
Comment 15 Jer Noble 2022-03-20 22:42:08 PDT
Created attachment 455214 [details]
Patch for landing
Comment 16 Jer Noble 2022-03-20 22:44:51 PDT
Created attachment 455216 [details]
Patch for landing
Comment 17 Jer Noble 2022-03-21 09:42:18 PDT
Comment on attachment 455214 [details]
Patch for landing

iOS-wk2 bot failure is unrelated; cq+ing.
Comment 18 EWS 2022-03-23 12:22:46 PDT
Committed r291759 (248790@main): <https://commits.webkit.org/248790@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 455214 [details].