You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since dictionary members are optional by default, readers will hopefully infer (correctly) that they're optional, since neither spec mentions required.
Readers might also infer this from VideoFrameInit where metadata is not required, if I'm not mistaken.
Still, it might be good to call this out, since a single required member would mean the VideoFrame constructor would suddenly require this input and no longer be backwards compatible.
The text was updated successfully, but these errors were encountered:
This also becomes important as we specify members and their rules for when they should be present or not. VideoFrames can come from different sources, and it currently seems unclear whether all VideoFrames regardless of source are to present with the same metadata members or not.
Since the VideoFrame constructor already lets JS create frames with a subset of metadata, should we suggest a model where each source only provides the metadata relevant to it?
To me, this seems likely to happen anyways. E.g. VideoFrames from cameras might have {backgroundBlur: true|false}, but VideoFrames created from canvas might not.
The spec says:
But the [webcodecs-video-frame-metadata-registry] does not say whether members are optional or
required
.Since dictionary members are optional by default, readers will hopefully infer (correctly) that they're optional, since neither spec mentions
required
.Readers might also infer this from
VideoFrameInit
where metadata is not required, if I'm not mistaken.Still, it might be good to call this out, since a single
required
member would mean the VideoFrame constructor would suddenly require this input and no longer be backwards compatible.The text was updated successfully, but these errors were encountered: