Skip to content
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

Revert 'hangup', 'togglecamera' and 'togglemicrophone' action handlers from MediaSession in TypeScript 4.9+ #52743

Closed
vatson opened this issue Feb 13, 2023 · 2 comments
Assignees
Labels
External Relates to another program, environment, or user action which we cannot control. Needs Investigation This issue needs a team member to investigate its status.

Comments

@vatson
Copy link

vatson commented Feb 13, 2023

lib Update Request

Action definitions that have existed for years have been removed with the latest LKG update for 4.9+
3a6d7e9#diff-796971dc74a3f3cd77ca0a3a776d6fe27ab224cd501d9652dbeffcf45ba0f058L18186

When 4.8.3 still has these definitions https://github.com/microsoft/TypeScript/blob/v4.8.4/lib/lib.dom.d.ts#L18186

Media Session Standard specification has information about these types of actions https://w3c.github.io/mediasession/#mediasession It is difficult to classify these things as experimental, because the standard itself is still Draft

Configuration Check

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

Missing / Incorrect Definition

MediaSessionAction has lost hangup, togglecamera and togglemicrophone options.

Sample Code

 navigator.mediaSession.setActionHandler('togglecamera', () => {
   // toggle camera
 });

Documentation Link

https://w3c.github.io/mediasession/#dom-mediasession-setactionhandler

@RyanCavanaugh RyanCavanaugh added the Needs Investigation This issue needs a team member to investigate its status. label Feb 14, 2023
@RyanCavanaugh RyanCavanaugh added this to the TypeScript 5.0.1 milestone Feb 14, 2023
@sandersn sandersn added the External Relates to another program, environment, or user action which we cannot control. label Feb 14, 2023
@sandersn
Copy link
Member

MediaSession is only implemented in one browser engine, but Typescript requires two implementations for draft standards to be included in the standard lib. See for example: microsoft/TypeScript-DOM-lib-generator#821

In 4.9 the parts of the standard that were mistakenly included were moved out of an upstream definitions repository and as a result, out of Typescript: microsoft/TypeScript-DOM-lib-generator#1400

@sandersn sandersn closed this as not planned Won't fix, can't repro, duplicate, stale Feb 14, 2023
@vatson
Copy link
Author

vatson commented Feb 15, 2023

@sandersn thanks for the clarification!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
External Relates to another program, environment, or user action which we cannot control. Needs Investigation This issue needs a team member to investigate its status.
Projects
None yet
Development

No branches or pull requests

3 participants