Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/artisan/src/consumer/workers/package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ async function runJob(
`playlist_name=${file.name}/playlist.m3u8`,
"hls_group_id=audio",
`hls_name=${formatLanguage(by639_2T[stream.language])}`,
`language=${stream.language}`,
]);
}

Expand Down
4 changes: 3 additions & 1 deletion packages/player/src/ui/components/TextAudioPane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ export function TextAudioPane() {
onSelect={(id) => facade.setAudioTrack(id)}
items={state.audioTracks.map((it) => ({
id: it.id,
label: toLang(it.playlist.name),
label: it.playlist.lang
? it.playlist.lang
: toLang(it.playlist.name),
checked: it.active,
}))}
/>
Expand Down
6 changes: 6 additions & 0 deletions packages/stitcher/src/parser/lexical-parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export type Media = {
type: MediaType;
groupId: string;
name: string;
language?: string;
uri?: string;
channels?: string;
};
Expand Down Expand Up @@ -165,6 +166,9 @@ function parseLine(line: string): Tag | null {
case "GROUP-ID":
attrs.groupId = value;
break;
case "LANGUAGE":
attrs.language = value;
break;
case "NAME":
attrs.name = value;
break;
Expand All @@ -179,13 +183,15 @@ function parseLine(line: string): Tag | null {

assert(attrs.type, "EXT-X-MEDIA: no type");
assert(attrs.groupId, "EXT-X-MEDIA: no groupId");
assert(attrs.language, "EXT-X-MEDIA: no language");
assert(attrs.name, "EXT-X-MEDIA: no name");

return [
name,
{
type: attrs.type,
groupId: attrs.groupId,
language: attrs.language,
name: attrs.name,
uri: attrs.uri,
channels: attrs.channels,
Expand Down
1 change: 1 addition & 0 deletions packages/stitcher/src/parser/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ function addRendition(variant: Variant, media: Media) {
type: media.type,
groupId: media.groupId,
name: media.name,
language: media.language,
uri: media.uri,
channels: media.channels,
};
Expand Down
3 changes: 3 additions & 0 deletions packages/stitcher/src/parser/stringify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ function buildRendition(lines: Lines, rendition: Rendition) {
`GROUP-ID="${rendition.groupId}"`,
`NAME="${rendition.name}"`,
];
if (rendition.language) {
attrs.push(`LANGUAGE="${rendition.language}"`);
}
if (rendition.uri) {
attrs.push(`URI="${rendition.uri}"`);
}
Expand Down
1 change: 1 addition & 0 deletions packages/stitcher/src/parser/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export type Rendition = {
type: RenditionType;
groupId: string;
name: string;
language?: string;
uri?: string;
channels?: string;
};
Expand Down
Loading