w3c/mediasession

Why seek operations in MediaSessionActionDetails are both nullable and optioanal?

ChunMinChang opened this issue · 1 comments

This is a duplicate of #234 (comment), but it's still an issue.

The problem is around MediaSessionActionDetails:

dictionary MediaSessionActionDetails {
  required MediaSessionAction action;
  double? seekOffset;
  double? seekTime;
  boolean? fastSeek;
};

I am not sure why seekOffset, seekTime, and fastSeek all nullable and optional at the same time. For example, the seekTime now must be provided from the user agent(browser), but what does a null seekTime mean?

If a null seekTime value is used to hint the call site to ignore this value, then returning a MediaSessionActionDetails without seekTime seems more straightforward.

Is there a use case demonstrating that a null seekTime or seekOffset is better than a MediaSessionActionDetails value without seekTime or seekOffset?

Fixed by #226