Bug 255185 - MediaPlayer::buffered() & co. should return a PlatformTimeRanges()
Summary: MediaPlayer::buffered() & co. should return a PlatformTimeRanges()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jean-Yves Avenard [:jya]
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-04-07 17:42 PDT by Jean-Yves Avenard [:jya]
Modified: 2023-04-11 23:19 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Yves Avenard [:jya] 2023-04-07 17:42:58 PDT
The current code continuously allocates objects on the heap when ultimately there's no need for it.

Likely also the case for MediaPlayer::seekable() and similar; though the HTMLMediaElement has an unfortunate history of returning a new object for all its buffered range attribute.
Comment 1 Radar WebKit Bug Importer 2023-04-07 17:43:15 PDT
<rdar://problem/107775841>
Comment 2 Jean-Yves Avenard [:jya] 2023-04-08 22:17:52 PDT
Pull request: https://github.com/WebKit/WebKit/pull/12552
Comment 3 EWS 2023-04-11 23:19:02 PDT
Committed 262863@main (fc4da4586f6b): <https://commits.webkit.org/262863@main>

Reviewed commits have been landed. Closing PR #12552 and removing active labels.