@torrent-tv/proxy 2.95.29 → 2.95.30
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
|
@@ -232,13 +232,8 @@ export class AviContainer extends Container {
|
|
|
232
232
|
} else if (type === "audio") {
|
|
233
233
|
if (strf.length < 16) throw new Error("AVI wave format is truncated.");
|
|
234
234
|
const tag = strf.readUInt16LE(0);
|
|
235
|
-
// WAVEFORMATEX states the average bytes per second the stream carries
|
|
236
|
-
// (`nAvgBytesPerSec`); zero states nothing. Without it a soundtrack the
|
|
237
|
-
// browser plays is re-encoded only because its copy has no figure to
|
|
238
|
-
// ask the link about (torrent-tv/meta#159).
|
|
239
235
|
track = new AudioTrack({ ...params, codecId: waveCodec(tag),
|
|
240
236
|
channels: strf.readUInt16LE(2), samplingFrequency: strf.readUInt32LE(4),
|
|
241
|
-
bitrateKbps: strf.readUInt32LE(8) * 8 / 1000,
|
|
242
237
|
codecPrivateB64: strf.subarray(18).toString("base64") });
|
|
243
238
|
track.blockAlign = strf.readUInt16LE(12);
|
|
244
239
|
track.matroskaCodecId = "A_MS/ACM";
|
|
@@ -78,8 +78,6 @@ export class AudioTrack extends ContainerTrack {
|
|
|
78
78
|
* @param {boolean} params.isVisualImpaired - FlagVisualImpaired / descriptive audio
|
|
79
79
|
* @param {number | null} params.channels
|
|
80
80
|
* @param {number | null} params.samplingFrequency
|
|
81
|
-
* @param {number | null} [params.bitrateKbps] - The rate the file states for
|
|
82
|
-
* this track, in kbit/s: an average, not a bound.
|
|
83
81
|
*/
|
|
84
82
|
constructor(params) {
|
|
85
83
|
super({ ...params, type: "audio" });
|
|
@@ -88,7 +86,6 @@ export class AudioTrack extends ContainerTrack {
|
|
|
88
86
|
this.isVisualImpaired = params.isVisualImpaired === true;
|
|
89
87
|
this.channels = Number.isFinite(params.channels) ? params.channels : null;
|
|
90
88
|
this.samplingFrequency = Number.isFinite(params.samplingFrequency) ? params.samplingFrequency : null;
|
|
91
|
-
this.bitrateKbps = Number.isFinite(params.bitrateKbps) && params.bitrateKbps > 0 ? params.bitrateKbps : null;
|
|
92
89
|
this.bitDepth = Number.isSafeInteger(params.bitDepth) && params.bitDepth > 0 ? params.bitDepth : null;
|
|
93
90
|
this.codecDelaySeconds = Number.isFinite(params.codecDelaySeconds) && params.codecDelaySeconds >= 0 ? params.codecDelaySeconds : 0;
|
|
94
91
|
// What the codec is configured as, and the most that configuration allows
|