Conversation
|
You might want to check |
|
I spent a couple of hours hacking around in the |
|
We might need some documentation for those files... For now, something like this should work. "callback-functions": {
"callback-function": {
"MediaSessionActionHandler": {
"name": "MediaSessionActionHandler",
"override-signatures": [
"(details: MediaSessionSeekActionDetails): void"
]
}
}
}And for "interfaces": {
"interface": {
"MediaSession": {
"methods": {
"method": {
"setActionHandler": {
"additional-signatures": [
"setActionHandler(action: 'seekbackward' | 'seekforward', handler: MediaSessionSeekActionHandler | null): void"
]
}
}
}
}
}
} |
|
Additionally, caniuse.com says that only Chrome (and new Edge) support MediaSession API, so I want to wait until another browser supports this API before putting it in the standard library. |
sandersn
left a comment
There was a problem hiding this comment.
Should wait until more than one engine implements it.
|
Fair enough |
|
It seems MediaSession API has landed Firefox in version 82. |
|
This is shipped by #1034 @github-actions close |
|
Closing because @saschanaz is a code-owner of all the changes. |
This adds types for the Media Session API. Fixes microsoft/TypeScript#19473
The only thing that could be improved with the types is that:
should really be:
But I couldn't figure out how to insert the additional interfaces and the
MediaSessionSeekActionDetailsandMediaSessionSeekToActionDetailstypes from the widl file.