@torrent-tv/proxy 2.95.0 → 2.95.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AudioTrack } from "./tracks/AudioTrack.js";
|
|
2
|
+
import { TextSubtitleTrack } from "./tracks/TextSubtitleTrack.js";
|
|
2
3
|
|
|
3
4
|
const VIDEO_CODECS = new Map([
|
|
4
5
|
["V_MPEG4/ISO/AVC", "h264"], ["avc1", "h264"], ["avc3", "h264"],
|
|
@@ -37,7 +38,11 @@ export function playbackDeclarations({ tracks, media, fileBytes = null }) {
|
|
|
37
38
|
...track, index, streamIndex: track.declaredIndex,
|
|
38
39
|
codec: type === "audio" ? AudioTrack.codecNameOf(track)
|
|
39
40
|
: SUBTITLE_CODECS.get(track.codecId) ?? track.codecId.toLowerCase(),
|
|
40
|
-
title: track.name ?? ""
|
|
41
|
+
title: track.name ?? "",
|
|
42
|
+
// The browser offers only tracks marked text-based: a picture subtitle
|
|
43
|
+
// cannot become WebVTT. Dropped when the plan moved to these declarations
|
|
44
|
+
// (torrent-tv/meta#95), which emptied every subtitle menu (#8).
|
|
45
|
+
...(type === "subtitle" ? { textBased: TextSubtitleTrack.isTextCodec(track.codecId) } : {})
|
|
41
46
|
}));
|
|
42
47
|
const audioTracks = inventory("audio"), subtitleTracks = inventory("subtitle");
|
|
43
48
|
return { tracks, video, audioTracks, subtitleTracks,
|