diff --git a/js/docs/src/content/docs/lex-reference/place-stream-segment.md b/js/docs/src/content/docs/lex-reference/place-stream-segment.md index 2bc958da..1b7c0851 100644 --- a/js/docs/src/content/docs/lex-reference/place-stream-segment.md +++ b/js/docs/src/content/docs/lex-reference/place-stream-segment.md @@ -43,11 +43,13 @@ Media file representing a segment of a livestream **Properties:** -| Name | Type | Req'd | Description | Constraints | -| ---------- | --------- | ----- | ----------- | ------------------- | -| `codec` | `string` | ✅ | | Enum: `opus`, `aac` | -| `rate` | `integer` | ✅ | | | -| `channels` | `integer` | ✅ | | | +| Name | Type | Req'd | Description | Constraints | +| ---------------- | --------- | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | +| `codec` | `string` | ✅ | | Enum: `opus`, `aac` | +| `rate` | `integer` | ✅ | | | +| `channels` | `integer` | ✅ | | | +| `alternateGroup` | `integer` | ❌ | Audio tracks sharing this value carry the same sound in different codecs. Tracks with different values are independent and play together: the lowest group is the full mix, and higher groups are stems a viewer can mix in. Absent when the stream doesn't distinguish its audio tracks. | Min: 1 | +| `label` | `string` | ❌ | The streamer's name for this audio track, such as "Music". | Max Length: 640
Max Graphemes: 64 | --- @@ -181,6 +183,17 @@ Media file representing a segment of a livestream }, "channels": { "type": "integer" + }, + "alternateGroup": { + "type": "integer", + "minimum": 1, + "description": "Audio tracks sharing this value carry the same sound in different codecs. Tracks with different values are independent and play together: the lowest group is the full mix, and higher groups are stems a viewer can mix in. Absent when the stream doesn't distinguish its audio tracks." + }, + "label": { + "type": "string", + "maxLength": 640, + "maxGraphemes": 64, + "description": "The streamer's name for this audio track, such as \"Music\"." } } }, diff --git a/lexicons/place/stream/segment.json b/lexicons/place/stream/segment.json index f55e8835..aeb6cbc3 100644 --- a/lexicons/place/stream/segment.json +++ b/lexicons/place/stream/segment.json @@ -70,7 +70,18 @@ "properties": { "codec": { "type": "string", "enum": ["opus", "aac"] }, "rate": { "type": "integer" }, - "channels": { "type": "integer" } + "channels": { "type": "integer" }, + "alternateGroup": { + "type": "integer", + "minimum": 1, + "description": "Audio tracks sharing this value carry the same sound in different codecs. Tracks with different values are independent and play together: the lowest group is the full mix, and higher groups are stems a viewer can mix in. Absent when the stream doesn't distinguish its audio tracks." + }, + "label": { + "type": "string", + "maxLength": 640, + "maxGraphemes": 64, + "description": "The streamer's name for this audio track, such as \"Music\"." + } } }, "video": { diff --git a/pkg/placestream/segment.go b/pkg/placestream/segment.go index af0b2ba6..5ee51cdd 100644 --- a/pkg/placestream/segment.go +++ b/pkg/placestream/segment.go @@ -67,9 +67,13 @@ func (t *Segment) UnmarshalCBOR(r io.Reader) error { // Segment_Audio is a "audio" in the place.stream.segment schema. type Segment_Audio struct { LexiconTypeID string `json:"$type,omitempty"` - Channels int64 `json:"channels"` - Codec string `json:"codec"` - Rate int64 `json:"rate"` + // alternateGroup: Audio tracks sharing this value carry the same sound in different codecs. Tracks with different values are independent and play together: the lowest group is the full mix, and higher groups are stems a viewer can mix in. Absent when the stream doesn't distinguish its audio tracks. + AlternateGroup *int64 `json:"alternateGroup,omitempty"` + Channels int64 `json:"channels"` + Codec string `json:"codec"` + // label: The streamer's name for this audio track, such as "Music". + Label *string `json:"label,omitempty"` + Rate int64 `json:"rate"` } // RecordTypeID implements glex.Record.