@torrent-tv/proxy 2.99.5 → 2.99.6
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
|
@@ -653,10 +653,16 @@ export class MatroskaContainer extends Container {
|
|
|
653
653
|
* One preceding cluster retains preroll; one following cluster covers demux
|
|
654
654
|
* lookahead beyond the presentation cut. No packet payload is parsed here.
|
|
655
655
|
*/
|
|
656
|
-
async supportsOriginalSourceRanges() {
|
|
656
|
+
async supportsOriginalSourceRanges(interval = null) {
|
|
657
657
|
const cues = await this.readCues();
|
|
658
658
|
if (!cues?.points.length) return false;
|
|
659
659
|
const video = ContainerTrack.firstUsable(await this.readTracks(), "video");
|
|
660
|
+
// Sound alone is read from its own packets, as an AVI's is
|
|
661
|
+
// (`AviContainer`). From the original file it was given whole clusters,
|
|
662
|
+
// picture included: 260 MB for 23 pieces of a soundtrack, 38 MB for one of
|
|
663
|
+
// 171 KB, on Home Assistant (r44, r46, torrent-tv/meta#178). Asked of the
|
|
664
|
+
// file as a whole, the answer is the picture's.
|
|
665
|
+
if (video && interval?.trackIds?.length && !interval.trackIds.includes(video.trackNumber)) return false;
|
|
660
666
|
return cues.points.some(point => point.positions.some(position => !video || position.track === video.trackNumber));
|
|
661
667
|
}
|
|
662
668
|
|