Bug 237196 - MediaSession.setPositionState() does not work.
Summary: MediaSession.setPositionState() does not work.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Safari 15
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jean-Yves Avenard [:jya]
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-02-25 03:18 PST by Mitsuo Matsunaga
Modified: 2022-04-26 17:30 PDT (History)
14 users (show)

See Also:


Attachments
Patch (2.28 KB, patch)
2022-04-10 23:51 PDT, Jean-Yves Avenard [:jya]
no flags Details | Formatted Diff | Diff
Patch (21.11 KB, patch)
2022-04-26 01:44 PDT, Jean-Yves Avenard [:jya]
no flags Details | Formatted Diff | Diff
Patch (22.96 KB, patch)
2022-04-26 07:07 PDT, Jean-Yves Avenard [:jya]
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mitsuo Matsunaga 2022-02-25 03:18:09 PST
We develop a player that can play a part of a content.
I executed setPositionState() as follows. However, it is not reflected in "Now Playing" in Control Center.

navigator.mediaSession.setPositionState({
  duration: 140,
  position: pos + 10
});

Sample
https://dev-player-issue.s3.ap-northeast-1.amazonaws.com/webkit/media_session.html
Comment 1 Radar WebKit Bug Importer 2022-02-25 09:57:43 PST
<rdar://problem/89479548>
Comment 2 Mitsuo Matsunaga 2022-03-27 19:13:29 PDT
Please give me a reply.
Comment 3 Jean-Yves Avenard [:jya] 2022-04-10 23:51:03 PDT
Created attachment 457233 [details]
Patch
Comment 4 Jean-Yves Avenard [:jya] 2022-04-26 01:44:40 PDT
Created attachment 458342 [details]
Patch
Comment 5 Jean-Yves Avenard [:jya] 2022-04-26 07:07:08 PDT
Created attachment 458358 [details]
Patch

Fix seeking in media using default control and then pausing in Now Playing. Cursor was jumping around: instead simulate a call to setPositionState. Fix GTK compilation
Comment 6 Eric Carlson 2022-04-26 08:23:49 PDT
Comment on attachment 458358 [details]
Patch

r=me once the bots are happy
Comment 7 EWS 2022-04-26 17:30:30 PDT
Committed r293488 (250022@main): <https://commits.webkit.org/250022@main>

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