Skip to content

Missing HTMLMediaElement.preservesPitch #48444

Description

@Moebytes

lib Update Request

Configuration Check

My compilation target is ES2015 and my lib is the default.

Missing / Incorrect Definition

HTMLMediaElement.preservesPitch is missing from the types. It is supported in nearly every browser.

Sample Code

// throws error
videoElement.preservesPitch = true

Documentation Link

Documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/preservesPitch

Activity

  1. huytd commented on Mar 30, 2022

    @huytd
    Contributor

    Hi, I'd like to work on this issue

  2. huytd commented on Mar 30, 2022

    @huytd
    Contributor

    Based on the discussion in microsoft/TypeScript-DOM-lib-generator#1300, I think there is no need to fix this issue from within TypeScript's codebase.

    The main reason for this issue is because preservesPitch is only available in the standard form in Chrome, and is prefixed in other browsers. Once the other browsers implemented it, the lib.dom.d.ts generator will be able to generate the type correctly.

    Here are the relevant issues to track in Safari and Firefox:

  3. Moebytes commented on Mar 30, 2022

    @Moebytes
    Author

    Hi, thanks for the info, didn't know that it only works with a prefix on Firefox and Safari.

  4. jakebailey commented on Jul 9, 2023

    @jakebailey
    Member

    This was fixed in #49596.

  5. locked as resolved and limited conversation to collaborators on Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions