mlbserver 2025.4.6 → 2025.6.12
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/index.js +14 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -416,6 +416,7 @@ var respond = function(proxy, res, body) {
|
|
|
416
416
|
delete proxy.headers['content-md5']
|
|
417
417
|
delete proxy.headers['connection']
|
|
418
418
|
delete proxy.headers['access-control-allow-credentials']
|
|
419
|
+
delete proxy.headers['content-encoding']
|
|
419
420
|
|
|
420
421
|
proxy.headers['content-length'] = body.length
|
|
421
422
|
proxy.headers['access-control-allow-origin'] = '*'
|
|
@@ -461,6 +462,8 @@ function getMasterPlaylist(streamURL, req, res, options = {}) {
|
|
|
461
462
|
headers['x-cdn-token'] = options.streamURLToken
|
|
462
463
|
token_parameter = '&streamURLToken=' + encodeURIComponent(options.streamURLToken)
|
|
463
464
|
}
|
|
465
|
+
headers.gzip = true
|
|
466
|
+
|
|
464
467
|
requestRetry(streamURL, headers, function(err, response) {
|
|
465
468
|
if (err) return res.error(err)
|
|
466
469
|
|
|
@@ -737,6 +740,7 @@ app.get('/playlist.m3u8', async function(req, res) {
|
|
|
737
740
|
if ( token ) {
|
|
738
741
|
headers['x-cdn-token'] = token
|
|
739
742
|
}
|
|
743
|
+
headers.gzip = true
|
|
740
744
|
|
|
741
745
|
requestRetry(u, headers, function(err, response) {
|
|
742
746
|
if (err) return res.error(err)
|
|
@@ -2066,7 +2070,12 @@ app.get('/', async function(req, res) {
|
|
|
2066
2070
|
let querystring
|
|
2067
2071
|
querystring = '?mediaId=' + mediaId
|
|
2068
2072
|
|
|
2069
|
-
let multiviewquerystring = querystring + '&resolution=' + DEFAULT_MULTIVIEW_RESOLUTION
|
|
2073
|
+
let multiviewquerystring = querystring + '&resolution=' + DEFAULT_MULTIVIEW_RESOLUTION
|
|
2074
|
+
if ( audio_track != VALID_AUDIO_TRACKS[0] ) {
|
|
2075
|
+
multiviewquerystring += '&audio_track=' + encodeURIComponent(audio_track)
|
|
2076
|
+
} else {
|
|
2077
|
+
multiviewquerystring += '&audio_track=' + encodeURIComponent(DEFAULT_MULTIVIEW_AUDIO_TRACK)
|
|
2078
|
+
}
|
|
2070
2079
|
if ( linkType == VALID_LINK_TYPES[0] ) {
|
|
2071
2080
|
if ( startFrom != VALID_START_FROM[0] ) querystring += '&startFrom=' + startFrom
|
|
2072
2081
|
if ( controls != VALID_CONTROLS[0] ) querystring += '&controls=' + controls
|
|
@@ -2948,13 +2957,14 @@ function start_multiview_stream(streams, sync, dvr, faster, reencode, park_audio
|
|
|
2948
2957
|
if ( audio_reencoded.indexOf(audio_present[i]) > -1 ) {
|
|
2949
2958
|
audio_output = '[out' + i + ']'
|
|
2950
2959
|
} else {
|
|
2951
|
-
audio_output = audio_present[i] + ':a:'
|
|
2952
|
-
|
|
2960
|
+
audio_output = audio_present[i] + ':a:0'
|
|
2961
|
+
// audio track indexing disabled, since we can now assume it is 0 regardless
|
|
2962
|
+
/*let video_url = streams[audio_present[i]]
|
|
2953
2963
|
if ( !video_url || video_url.includes('audio_track=English') || !video_url.includes('audio_track=') ) {
|
|
2954
2964
|
audio_output += '0'
|
|
2955
2965
|
} else {
|
|
2956
2966
|
audio_output += '1'
|
|
2957
|
-
}
|
|
2967
|
+
}*/
|
|
2958
2968
|
}
|
|
2959
2969
|
ffmpeg_command.addOutputOption('-map', audio_output)
|
|
2960
2970
|
var_stream_map += ' a:' + i + ',agroup:aac,language:ENG'
|