mediasoup 3.12.0 → 3.12.2
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/node/lib/Worker.js +1 -1
- package/node/lib/index.d.ts +1 -1
- package/node/lib/index.js +1 -1
- package/npm-scripts.js +47 -9
- package/package.json +2 -2
- package/worker/src/lib.cpp +8 -4
- package/worker/src/main.cpp +3 -10
package/node/lib/Worker.js
CHANGED
|
@@ -90,7 +90,7 @@ class Worker extends EnhancedEventEmitter_1.EnhancedEventEmitter {
|
|
|
90
90
|
// options
|
|
91
91
|
{
|
|
92
92
|
env: {
|
|
93
|
-
MEDIASOUP_VERSION: '3.12.
|
|
93
|
+
MEDIASOUP_VERSION: '3.12.2',
|
|
94
94
|
// Let the worker process inherit all environment variables, useful
|
|
95
95
|
// if a custom and not in the path GCC is used so the user can set
|
|
96
96
|
// LD_LIBRARY_PATH environment variable for runtime.
|
package/node/lib/index.d.ts
CHANGED
package/node/lib/index.js
CHANGED
package/npm-scripts.js
CHANGED
|
@@ -216,7 +216,7 @@ async function run()
|
|
|
216
216
|
executeCmd(`git push origin v${MAYOR_VERSION}`);
|
|
217
217
|
executeCmd(`git push origin '${PKG.version}'`);
|
|
218
218
|
|
|
219
|
-
logInfo('creating release in GitHub
|
|
219
|
+
logInfo('creating release in GitHub');
|
|
220
220
|
|
|
221
221
|
await octokit.repos.createRelease(
|
|
222
222
|
{
|
|
@@ -529,16 +529,54 @@ async function downloadPrebuiltWorker()
|
|
|
529
529
|
{
|
|
530
530
|
// Give execution permission to the binary.
|
|
531
531
|
fs.chmodSync(WORKER_RELEASE_BIN_PATH, 0o775);
|
|
532
|
-
|
|
533
|
-
resolve(true);
|
|
534
532
|
}
|
|
535
533
|
catch (error)
|
|
536
534
|
{
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
535
|
+
logWarn(`downloadPrebuiltWorker() | failed to give execution permissions to the mediasoup-worker prebuilt binary: ${error}`);
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
// Let's confirm that the fetched mediasoup-worker prebuit binary does
|
|
539
|
+
// run in current host. This is to prevent weird issues related to
|
|
540
|
+
// different versions of libc in the system and so on.
|
|
541
|
+
// So run mediasoup-worker without the required MEDIASOUP_VERSION env and
|
|
542
|
+
// expect exit code 41 (see main.cpp).
|
|
543
|
+
|
|
544
|
+
logInfo(
|
|
545
|
+
'downloadPrebuiltWorker() | checking fetched mediasoup-worker prebuilt binary in current host'
|
|
546
|
+
);
|
|
540
547
|
|
|
541
|
-
|
|
548
|
+
try
|
|
549
|
+
{
|
|
550
|
+
execSync(
|
|
551
|
+
`${WORKER_RELEASE_BIN_PATH}`,
|
|
552
|
+
{
|
|
553
|
+
stdio : [ 'ignore', 'ignore', 'ignore' ],
|
|
554
|
+
// Ensure no env is passed to avoid accidents.
|
|
555
|
+
env : {}
|
|
556
|
+
}
|
|
557
|
+
);
|
|
558
|
+
}
|
|
559
|
+
catch (error)
|
|
560
|
+
{
|
|
561
|
+
if (error.status === 41)
|
|
562
|
+
{
|
|
563
|
+
resolve(true);
|
|
564
|
+
}
|
|
565
|
+
else
|
|
566
|
+
{
|
|
567
|
+
logError(
|
|
568
|
+
`downloadPrebuiltWorker() | fetched mediasoup-worker prebuilt binary fails to run in this host [status:${error.status}]`
|
|
569
|
+
);
|
|
570
|
+
|
|
571
|
+
try
|
|
572
|
+
{
|
|
573
|
+
fs.unlinkSync(WORKER_RELEASE_BIN_PATH);
|
|
574
|
+
}
|
|
575
|
+
catch (error2)
|
|
576
|
+
{}
|
|
577
|
+
|
|
578
|
+
resolve(false);
|
|
579
|
+
}
|
|
542
580
|
}
|
|
543
581
|
})
|
|
544
582
|
.on('error', (error) =>
|
|
@@ -563,7 +601,7 @@ async function uploadMacArmPrebuiltWorker()
|
|
|
563
601
|
|
|
564
602
|
const octokit = getOctokit();
|
|
565
603
|
|
|
566
|
-
logInfo('uploadMacArmPrebuiltWorker() | getting release info
|
|
604
|
+
logInfo('uploadMacArmPrebuiltWorker() | getting release info');
|
|
567
605
|
|
|
568
606
|
const release = await octokit.rest.repos.getReleaseByTag(
|
|
569
607
|
{
|
|
@@ -572,7 +610,7 @@ async function uploadMacArmPrebuiltWorker()
|
|
|
572
610
|
tag : PKG.version
|
|
573
611
|
});
|
|
574
612
|
|
|
575
|
-
logInfo('uploadMacArmPrebuiltWorker() | uploading release asset
|
|
613
|
+
logInfo('uploadMacArmPrebuiltWorker() | uploading release asset');
|
|
576
614
|
|
|
577
615
|
await octokit.rest.repos.uploadReleaseAsset(
|
|
578
616
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mediasoup",
|
|
3
|
-
"version": "3.12.
|
|
3
|
+
"version": "3.12.2",
|
|
4
4
|
"description": "Cutting Edge WebRTC Video Conferencing",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Iñaki Baz Castillo <ibc@aliax.net> (https://inakibaz.me)",
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"eslint": "^8.41.0",
|
|
106
106
|
"eslint-plugin-jest": "^27.2.1",
|
|
107
107
|
"jest": "^29.5.0",
|
|
108
|
-
"marked": "^5.0.
|
|
108
|
+
"marked": "^5.0.3",
|
|
109
109
|
"open-cli": "^7.2.0",
|
|
110
110
|
"pick-port": "^1.0.1",
|
|
111
111
|
"sctp": "^1.0.0",
|
package/worker/src/lib.cpp
CHANGED
|
@@ -75,7 +75,8 @@ extern "C" int mediasoup_worker_run(
|
|
|
75
75
|
DepLibUV::RunLoop();
|
|
76
76
|
DepLibUV::ClassDestroy();
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
// 40 is a custom exit code to notify "unknown error" to the Node library.
|
|
79
|
+
return 40;
|
|
79
80
|
}
|
|
80
81
|
|
|
81
82
|
try
|
|
@@ -99,7 +100,8 @@ extern "C" int mediasoup_worker_run(
|
|
|
99
100
|
DepLibUV::RunLoop();
|
|
100
101
|
DepLibUV::ClassDestroy();
|
|
101
102
|
|
|
102
|
-
|
|
103
|
+
// 40 is a custom exit code to notify "unknown error" to the Node library.
|
|
104
|
+
return 40;
|
|
103
105
|
}
|
|
104
106
|
|
|
105
107
|
// Initialize the Logger.
|
|
@@ -130,7 +132,8 @@ extern "C" int mediasoup_worker_run(
|
|
|
130
132
|
DepLibUV::RunLoop();
|
|
131
133
|
DepLibUV::ClassDestroy();
|
|
132
134
|
|
|
133
|
-
|
|
135
|
+
// 40 is a custom exit code to notify "unknown error" to the Node library.
|
|
136
|
+
return 40;
|
|
134
137
|
}
|
|
135
138
|
|
|
136
139
|
MS_DEBUG_TAG(info, "starting mediasoup-worker process [version:%s]", version);
|
|
@@ -193,7 +196,8 @@ extern "C" int mediasoup_worker_run(
|
|
|
193
196
|
{
|
|
194
197
|
MS_ERROR_STD("failure exit: %s", error.what());
|
|
195
198
|
|
|
196
|
-
|
|
199
|
+
// 40 is a custom exit code to notify "unknown error" to the Node library.
|
|
200
|
+
return 40;
|
|
197
201
|
}
|
|
198
202
|
}
|
|
199
203
|
|
package/worker/src/main.cpp
CHANGED
|
@@ -18,7 +18,8 @@ int main(int argc, char* argv[])
|
|
|
18
18
|
{
|
|
19
19
|
MS_ERROR_STD("you don't seem to be my real father!");
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
// 41 is a custom exit code to notify about "missing MEDIASOUP_VERSION" env.
|
|
22
|
+
std::_Exit(41);
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
const std::string version = std::getenv("MEDIASOUP_VERSION");
|
|
@@ -40,13 +41,5 @@ int main(int argc, char* argv[])
|
|
|
40
41
|
nullptr,
|
|
41
42
|
nullptr);
|
|
42
43
|
|
|
43
|
-
|
|
44
|
-
{
|
|
45
|
-
case 0:
|
|
46
|
-
std::_Exit(EXIT_SUCCESS);
|
|
47
|
-
case 1:
|
|
48
|
-
std::_Exit(EXIT_FAILURE);
|
|
49
|
-
case 42:
|
|
50
|
-
std::_Exit(42);
|
|
51
|
-
}
|
|
44
|
+
std::_Exit(statusCode);
|
|
52
45
|
}
|