@torrent-tv/proxy 2.99.18 → 2.99.19

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@torrent-tv/proxy",
3
- "version": "2.99.18",
3
+ "version": "2.99.19",
4
4
  "description": "Torrent proxy client that exposes webseed-like HTTP stream endpoint.",
5
5
  "license": "GPL-3.0-or-later",
6
6
  "repository": {
@@ -680,6 +680,26 @@ export class MatroskaContainer extends Container {
680
680
  return cues.points.some(point => point.positions.some(position => !video || position.track === video.trackNumber));
681
681
  }
682
682
 
683
+ /**
684
+ * Whether `statement` is answered from what this container has already
685
+ * read, so it may be answered beside a read of the same file in progress
686
+ * (`ContainerOrchestrator.inspect`), as an AVI's are. The picture's
687
+ * ranges are arithmetic over the Cues once they are read; asked behind a
688
+ * soundtrack's packet walk in the file's one queue, the picture's next
689
+ * input after a seek was ready only after the sound's, one piece every
690
+ * 7-8 s, where the two had been prepared side by side every 2 s (r57 against
691
+ * r50, torrent-tv/meta#178).
692
+ *
693
+ * @param {string} statement
694
+ * @returns {boolean}
695
+ */
696
+ answersWithoutReading(statement) {
697
+ if (statement === "media-info") return this.mediaInfo?.durationSeconds != null;
698
+ if (statement === "source-navigation") return this.#cues !== undefined && this.#tracks !== null;
699
+ if (statement === "source-ranges") return this.#sourceSeekPoints !== null;
700
+ return false;
701
+ }
702
+
683
703
  async readMappedSourceRanges(interval) { return this.readSourceRanges(interval); }
684
704
 
685
705
  /**