-
Notifications
You must be signed in to change notification settings - Fork 29
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
MediaPositionState IDL does not allow infinite duration #303
Comments
Thanks @MattiasBuelens, work might be done in #255 or as a follow-up. |
youennf
added a commit
to youennf/mediasession
that referenced
this issue
Oct 18, 2023
We make duration a required member of MediaPositionState and add default values for position and playbackRate. duration is now unrestricted to allow Infinity, we add a special check for NaN. We update MediaSession.setPositionState to accept null since MediaPositionState now has a required member. Fixes w3c#303 and w3c#252.
youennf
added a commit
to youennf/mediasession
that referenced
this issue
Oct 24, 2023
We make duration a required member of MediaPositionState and add default values for position and playbackRate. duration is now unrestricted to allow Infinity, we add a special check for NaN. We update MediaSession.setPositionState to no longer have a default value since MediaPositionState now has a required member. Fixes w3c#303 and w3c#252.
youennf
added a commit
that referenced
this issue
Jan 22, 2024
* Update MediaPositionState WebIDL We add default values for position and playbackRate. duration is now unrestricted to allow Infinity and we add a special check for NaN. We do not make duration required so that MediaSession.setPositionState can still take an optional state argument. Fixes #303 and #252. Co-authored-by: Marcos Cáceres <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In #202, it was suggested to allow
+Infinity
as a valid value forMediaPositionState.duration
, to support live streams.However, in practice, browsers do not allow this. For example, Chrome 116 throws the following error:
It appears that, during review of #210, it was suggested to change
unrestricted double
todouble
. Unfortunately, this suggestion was incorrect:unrestricted
is in fact not the default for adouble
(see WebIDL), and browsers do check whether a regulardouble
is finite and not NaN.Can we fix this? I suggest something like this:
double duration
tounrestricted double duration
in the IDL forMediaPositionState
.The text was updated successfully, but these errors were encountered: