Update schema metadata validation logic - #1328
Conversation
Changeset ✓This PR includes a changeset covering all affected packages:
|
Update schema metadata validation logic as per issue #1328.
|
|
||
| /// The 'other' encoding represents an unrecognized encoding on received tracks | ||
| /// and cannot be used when publishing. | ||
| #[error("The 'other' encoding cannot be used when publishing")] | ||
| OtherEncoding, |
There was a problem hiding this comment.
nitpick(non-blocking): I wonder if there's a way to do this where you aren't exposing ::Other in the publishing context by splitting up this DataTrackSchemaEncoding into a publishing variant and a subscribing variant. I don't think there would be a way to do this where it wouldn't be a breaking change though, so maybe disregard if you see to many problems with this idea.
| use DataTrackFrameEncoding as FrameEncoding; | ||
| use DataTrackSchemaEncoding as SchemaEncoding; |
There was a problem hiding this comment.
nitpick: Why alias these here rather than just the fully qualified names below? IMO, it adds some confusion because it's not 100% clear that FrameEncoding and DataTrackFrameEncoding / etc mean the same thing if you enter the file from further down.
No longer allow
Otherto be used at publish time and allow custom encodings to be used with well-known ones.