chore: return stream.behaviorHints.videoSize when possible

This commit is contained in:
WebStreamr 2025-05-16 20:47:43 +02:00
parent 8bc30b8234
commit 07ffe444f3
No known key found for this signature in database
2 changed files with 5 additions and 0 deletions

View file

@ -61,6 +61,7 @@ describe('resolve', () => {
title: 'Dropload | 💾 1.3 GB | 🇩🇪',
behaviorHints: {
bingeGroup: 'webstreamr-dropload_de',
videoSize: 1395864371,
},
},
{
@ -69,6 +70,7 @@ describe('resolve', () => {
title: 'Dropload | 💾 1.1 GB | 🇮🇹',
behaviorHints: {
bingeGroup: 'webstreamr-dropload_it',
videoSize: 1181116006,
},
},
{
@ -77,6 +79,7 @@ describe('resolve', () => {
title: 'SuperVideo | 💾 1.1 GB | 🇮🇹',
behaviorHints: {
bingeGroup: 'webstreamr-supervideo_it',
videoSize: 1181116006,
},
},
{
@ -85,6 +88,7 @@ describe('resolve', () => {
title: 'SuperVideo | 💾 1 GB | 🇩🇪',
behaviorHints: {
bingeGroup: 'webstreamr-supervideo_de',
videoSize: 1073741824,
},
},
{

View file

@ -87,6 +87,7 @@ export class StreamResolver {
notWebReady: true,
proxyHeaders: { request: urlResult.requestHeaders },
}),
...(urlResult.bytes && { videoSize: urlResult.bytes }),
},
};
}),