Skip to content

Add audio/video fastSeek() method #656

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions feature-group-definitions/fast-seek.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: fastSeek()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps this should be something like:

Suggested change
name: fastSeek()
name: HTMLMediaElement fastSeek() method

To make the context more obvious and to be more consistent with the way we've done things for Array methods?

(I don't know if this also implies that we should rename this to htmlmediaelement-fastseek too.)

Copy link
Collaborator Author

@foolip foolip Mar 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consistency you say? How about checkVisibility() and scrollIntoView()?

For Array, in many cases the prefix is needed to distinguish arrays and types arrays, and the includes() method also exists on String and IDBKeyRange.

Also consider requestVideoFrameCallback() which is certainly long enough to stand on its own, and is on HTMLVideoElement, not HTMLMediaElement. Having "HTMLMediaElement fastSeek()" + "HTMLVideoElement requestVideoFrameCallback()" doesn't feel right to me, too much irrelevant technical detail.

I think the guideline I'm imagining is along the lines of "use the shortest plausible name except when ambiguous and when there's a group of related features, make the same choice for all of them for consistency within that group."

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the guideline I'm imagining is along the lines of "use the shortest plausible name except when ambiguous and when there's a group of related features, make the same choice for all of them for consistency within that group."

OK, yes, I like the idea of using the shortest without creating ambiguity. I'll backtrack a little on #655 (comment) too.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent, thank you! That discussion will continue in #548.

Are you happy (enough) with this name for now?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I'm satisfied now. I'll approve this PR, but I'll leave it to you to decide to merge or wait for Patrick's review.

description: The `fastSeek()` method seeks an `<audio>` or `<video>` element as fast as possible, by seeking to a keyframe instead of exactly the requested time.
spec: https://html.spec.whatwg.org/multipage/media.html#dom-media-fastseek-dev
status:
baseline: false
support:
firefox: "31"
firefox_android: "31"
safari: "8"
safari_ios: "8"
compat_features:
- api.HTMLMediaElement.fastSeek