trtc-electron-sdk 10.6.403-beta.0 → 10.6.403-beta.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/liteav/trtc.d.ts +3 -3
- package/liteav/trtc.js +3 -3
- package/package.json +1 -1
- package/scripts/download.js +16 -34
package/liteav/trtc.d.ts
CHANGED
|
@@ -596,7 +596,7 @@ declare class TRTCCloud extends EventEmitter {
|
|
|
596
596
|
*/
|
|
597
597
|
handleOnPlayBGMComplete(errCode: number): void;
|
|
598
598
|
/**
|
|
599
|
-
* 12.4
|
|
599
|
+
* 12.4 本地录制任务开始的事件回调
|
|
600
600
|
*
|
|
601
601
|
* 当您调用 [startLocalRecording]{@link TRTCCloud#startLocalRecording} 启动本地媒体录制任务时,SDK 会抛出该事件回调,用于通知您录制任务是否已经顺利启动。
|
|
602
602
|
*
|
|
@@ -606,7 +606,7 @@ declare class TRTCCloud extends EventEmitter {
|
|
|
606
606
|
*/
|
|
607
607
|
handleOnLocalRecordBegin(errCode: number, storagePath: string): void;
|
|
608
608
|
/**
|
|
609
|
-
* 12.5
|
|
609
|
+
* 12.5 本地录制任务正在进行中的事件回调
|
|
610
610
|
*
|
|
611
611
|
* 当您调用 [startLocalRecording]{@link TRTCCloud#startLocalRecording} 成功启动本地媒体录制任务后,SDK 变会定时地抛出本事件回调。 您可通过捕获该事件回调来获知录制任务的健康状况。 您可以在 [startLocalRecording]{@link TRTCCloud#startLocalRecording} 时设定本事件回调的抛出间隔。
|
|
612
612
|
*
|
|
@@ -616,7 +616,7 @@ declare class TRTCCloud extends EventEmitter {
|
|
|
616
616
|
*/
|
|
617
617
|
handleOnLocalRecording(duration: BigInt, storagePath: string): void;
|
|
618
618
|
/**
|
|
619
|
-
* 12.6
|
|
619
|
+
* 12.6 本地录制任务结束的事件回调
|
|
620
620
|
*
|
|
621
621
|
* 当您调用 [stopLocalRecording]{@link TRTCCloud#stopLocalRecording} 停止本地媒体录制任务时,SDK 会抛出该事件回调,用于通知您录制任务的最终结果。
|
|
622
622
|
*
|
package/liteav/trtc.js
CHANGED
|
@@ -1202,7 +1202,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
1202
1202
|
this.fire('onPlayBGMComplete', errCode);
|
|
1203
1203
|
}
|
|
1204
1204
|
/**
|
|
1205
|
-
* 12.4
|
|
1205
|
+
* 12.4 本地录制任务开始的事件回调
|
|
1206
1206
|
*
|
|
1207
1207
|
* 当您调用 [startLocalRecording]{@link TRTCCloud#startLocalRecording} 启动本地媒体录制任务时,SDK 会抛出该事件回调,用于通知您录制任务是否已经顺利启动。
|
|
1208
1208
|
*
|
|
@@ -1214,7 +1214,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
1214
1214
|
this.fire('onLocalRecordBegin', errCode, storagePath);
|
|
1215
1215
|
}
|
|
1216
1216
|
/**
|
|
1217
|
-
* 12.5
|
|
1217
|
+
* 12.5 本地录制任务正在进行中的事件回调
|
|
1218
1218
|
*
|
|
1219
1219
|
* 当您调用 [startLocalRecording]{@link TRTCCloud#startLocalRecording} 成功启动本地媒体录制任务后,SDK 变会定时地抛出本事件回调。 您可通过捕获该事件回调来获知录制任务的健康状况。 您可以在 [startLocalRecording]{@link TRTCCloud#startLocalRecording} 时设定本事件回调的抛出间隔。
|
|
1220
1220
|
*
|
|
@@ -1234,7 +1234,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
1234
1234
|
this.fire('onLocalRecording', newDuration, storagePath);
|
|
1235
1235
|
}
|
|
1236
1236
|
/**
|
|
1237
|
-
* 12.6
|
|
1237
|
+
* 12.6 本地录制任务结束的事件回调
|
|
1238
1238
|
*
|
|
1239
1239
|
* 当您调用 [stopLocalRecording]{@link TRTCCloud#stopLocalRecording} 停止本地媒体录制任务时,SDK 会抛出该事件回调,用于通知您录制任务的最终结果。
|
|
1240
1240
|
*
|
package/package.json
CHANGED
package/scripts/download.js
CHANGED
|
@@ -29,7 +29,6 @@ const buildDownloadInfo = () => {
|
|
|
29
29
|
|
|
30
30
|
// generate download url
|
|
31
31
|
return {
|
|
32
|
-
packageVersion: version,
|
|
33
32
|
platform: osLabel,
|
|
34
33
|
downloadUrl: `https://web.sdk.qcloud.com/trtc/electron/download/${name}/${version}/${name}-${osLabel}-${version}.zip`,
|
|
35
34
|
name,
|
|
@@ -37,10 +36,8 @@ const buildDownloadInfo = () => {
|
|
|
37
36
|
};
|
|
38
37
|
};
|
|
39
38
|
|
|
40
|
-
let downloadFrameworkSuccessCount = 0;
|
|
41
39
|
const main = () => {
|
|
42
40
|
const {
|
|
43
|
-
packageVersion,
|
|
44
41
|
platform,
|
|
45
42
|
downloadUrl,
|
|
46
43
|
name,
|
|
@@ -61,7 +58,7 @@ const main = () => {
|
|
|
61
58
|
signale.info('removeDir =', buildDir);
|
|
62
59
|
signale.info('outputDir =', outputDir);
|
|
63
60
|
|
|
64
|
-
signale.info('Package Version =',
|
|
61
|
+
signale.info('Package Version =', version);
|
|
65
62
|
signale.info('Platform =', platform);
|
|
66
63
|
signale.info('Download Url =', downloadUrl, '\n');
|
|
67
64
|
|
|
@@ -73,9 +70,9 @@ const main = () => {
|
|
|
73
70
|
signale.success(`Download finished - ${platform}`);
|
|
74
71
|
|
|
75
72
|
fs.copySync(
|
|
76
|
-
path.join(outputDir, './build/Release
|
|
77
|
-
path.join(buildDir, 'Release
|
|
78
|
-
)
|
|
73
|
+
path.join(outputDir, './build/Release'),
|
|
74
|
+
path.join(buildDir, 'Release')
|
|
75
|
+
);
|
|
79
76
|
signale.success(`copy success! - ${platform}`);
|
|
80
77
|
|
|
81
78
|
if (platform === Platform.WINDOWS32 || platform === Platform.WINDOWS64) {
|
|
@@ -87,6 +84,10 @@ const main = () => {
|
|
|
87
84
|
path.join(outputDir, './build/Release/trtc_electron_sdk.node'),
|
|
88
85
|
path.join(buildDir, 'Release', arch, 'trtc_electron_sdk.node')
|
|
89
86
|
);
|
|
87
|
+
fs.copySync(
|
|
88
|
+
path.join(outputDir, './build/mac-framework', arch),
|
|
89
|
+
path.join(buildDir, 'mac-framework', arch)
|
|
90
|
+
);
|
|
90
91
|
signale.success(`copy success! - mac ${arch}`, '\n');
|
|
91
92
|
|
|
92
93
|
let anotherPlatform, anotherArch;
|
|
@@ -113,13 +114,17 @@ const main = () => {
|
|
|
113
114
|
path.join(outputDir, anotherPlatform, '/build/Release/trtc_electron_sdk.node'),
|
|
114
115
|
path.join(buildDir, 'Release', anotherArch, 'trtc_electron_sdk.node')
|
|
115
116
|
);
|
|
117
|
+
fs.copySync(
|
|
118
|
+
path.join(outputDir, anotherPlatform, '/build/mac-framework', anotherArch),
|
|
119
|
+
path.join(buildDir, 'mac-framework', anotherArch)
|
|
120
|
+
);
|
|
116
121
|
signale.success(`copy success! - mac ${anotherArch}`);
|
|
117
122
|
|
|
123
|
+
// Mac 下完成文件下载后,执行该命令,同步文件到 Electron 目录下
|
|
124
|
+
// exec('npm run postinstall-mac');
|
|
125
|
+
exec(`rsync -a ../../node_modules/trtc-electron-sdk/build/mac-framework/${process.arch}/ ../../node_modules/electron/dist/Electron.app/Contents/Frameworks`);
|
|
126
|
+
|
|
118
127
|
rimraf.sync(outputDir);
|
|
119
|
-
const arm64Url = 'https://web.sdk.qcloud.com/trtc/electron/download/trtc-electron-sdk/mac-framework/arm64.zip';
|
|
120
|
-
const x64Url = 'https://web.sdk.qcloud.com/trtc/electron/download/trtc-electron-sdk/mac-framework/x64.zip';
|
|
121
|
-
downloadFramework(arm64Url, outputDir, buildDir);
|
|
122
|
-
downloadFramework(x64Url, outputDir, buildDir);
|
|
123
128
|
})
|
|
124
129
|
.catch(err => {
|
|
125
130
|
signale.fatal(`download error! - mac ${anotherPlatform}`, err);
|
|
@@ -131,27 +136,4 @@ const main = () => {
|
|
|
131
136
|
});
|
|
132
137
|
};
|
|
133
138
|
|
|
134
|
-
const downloadFramework = (url, outputDir, buildDir) => {
|
|
135
|
-
download(url, outputDir, {
|
|
136
|
-
strip: 0,
|
|
137
|
-
extract: true
|
|
138
|
-
}).then(() => {
|
|
139
|
-
signale.success('Success', 'Download framework finished');
|
|
140
|
-
downloadFrameworkSuccessCount++;
|
|
141
|
-
rimraf.sync(path.join(outputDir, '__MACOSX'));
|
|
142
|
-
const frameworkPath = path.join(buildDir, 'mac-framework');
|
|
143
|
-
fs.mkdirpSync(frameworkPath);
|
|
144
|
-
if (downloadFrameworkSuccessCount === 2) {
|
|
145
|
-
fs.copySync(path.join(outputDir), frameworkPath);
|
|
146
|
-
rimraf.sync(outputDir); // mac 下
|
|
147
|
-
|
|
148
|
-
// Mac 下完成文件下载后,执行该命令,同步文件到 Electron 目录下
|
|
149
|
-
// exec('npm run postinstall-mac');
|
|
150
|
-
exec(`rsync -a ../../node_modules/trtc-electron-sdk/build/mac-framework/${process.arch}/ ../../node_modules/electron/dist/Electron.app/Contents/Frameworks`)
|
|
151
|
-
}
|
|
152
|
-
}).catch(err => {
|
|
153
|
-
signale.fatal('Failed', err);
|
|
154
|
-
});
|
|
155
|
-
};
|
|
156
|
-
|
|
157
139
|
main();
|