Minimal subset of navigator.mediaSession the browser bridge depends on. Makes the bridge
Node/test-safe: unit tests pass a MockMediaSession via mediaSessionTarget.
The handler parameter uses details? (optional) so both the real DOM impl
(which always passes an object) and test mocks that omit details both satisfy
this type structurally.
Minimal subset of navigator.mediaSession the browser bridge depends on. Makes the bridge Node/test-safe: unit tests pass a MockMediaSession via mediaSessionTarget. The handler parameter uses
details?(optional) so both the real DOM impl (which always passes an object) and test mocks that omit details both satisfy this type structurally.