Since MediaSessionActionDetails is a dictionary, it can only expose any members that only MediaSessionActionDetails have, per the dictionary conversion steps. (One might expect that it would allow exposing subdictionaries, but it doesn't work that way.)
I don't think it would be worth (if even possible) complicating the types further with extra handler types, so my recommendation would be to roll it back and add the new member in the existing Details dictionary.
The handler is defined in https://w3c.github.io/mediasession/#the-mediasession-interface as:
Since
MediaSessionActionDetails
is a dictionary, it can only expose any members that onlyMediaSessionActionDetails
have, per the dictionary conversion steps. (One might expect that it would allow exposing subdictionaries, but it doesn't work that way.)I don't think it would be worth (if even possible) complicating the types further with extra handler types, so my recommendation would be to roll it back and add the new member in the existing Details dictionary.
cc @youennf