omnirtc-web 0.1.0-beta.0 → 0.1.0-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/README.md +1 -1
- package/dist/es-omnirtc-web.js +29 -4
- package/dist/omnirtc-web.js +16 -5
- package/package.json +2 -1
package/README.md
CHANGED
package/dist/es-omnirtc-web.js
CHANGED
|
@@ -97,7 +97,7 @@ var InvalidTokenError_1 = InvalidTokenError;
|
|
|
97
97
|
lib.InvalidTokenError = InvalidTokenError_1;
|
|
98
98
|
|
|
99
99
|
var StaticConfig = {
|
|
100
|
-
agentVersion: "OmniRTC_Web_V0.1.0-beta.
|
|
100
|
+
agentVersion: "OmniRTC_Web_V0.1.0-beta.2",
|
|
101
101
|
logVersion: 1,
|
|
102
102
|
serviceType: 320,
|
|
103
103
|
logBackendUrl: "https://rtc-logs.magic-school.com/stream.gif"
|
|
@@ -9159,8 +9159,7 @@ function videoEncoderConfigurationMapping(config) {
|
|
|
9159
9159
|
var rawEncoderConfig = config.encoderConfig;
|
|
9160
9160
|
if (config.encoderConfig) {
|
|
9161
9161
|
if (typeof config.encoderConfig === 'string'
|
|
9162
|
-
&& config.encoderConfig in presetVideoEncoderConfig)
|
|
9163
|
-
{
|
|
9162
|
+
&& config.encoderConfig in presetVideoEncoderConfig) {
|
|
9164
9163
|
rawEncoderConfig = presetVideoEncoderConfig[config.encoderConfig];
|
|
9165
9164
|
}
|
|
9166
9165
|
}
|
|
@@ -9922,6 +9921,12 @@ var VolcLocalVideoTrack = /** @class */ (function (_super) {
|
|
|
9922
9921
|
else {
|
|
9923
9922
|
this._engine.setLocalVideoMirrorType(MirrorType.MIRROR_TYPE_NONE);
|
|
9924
9923
|
}
|
|
9924
|
+
if (this._domElement) {
|
|
9925
|
+
this._engine.setLocalVideoPlayer(StreamIndex.STREAM_INDEX_MAIN, {
|
|
9926
|
+
renderDom: null,
|
|
9927
|
+
renderMode: _getRenderMode(),
|
|
9928
|
+
});
|
|
9929
|
+
}
|
|
9925
9930
|
this._domElement = this._engine.setLocalVideoPlayer(StreamIndex.STREAM_INDEX_MAIN, {
|
|
9926
9931
|
renderDom: element,
|
|
9927
9932
|
renderMode: _getRenderMode(),
|
|
@@ -9929,6 +9934,12 @@ var VolcLocalVideoTrack = /** @class */ (function (_super) {
|
|
|
9929
9934
|
this._engine.play(undefined, MediaType.VIDEO, StreamIndex.STREAM_INDEX_MAIN);
|
|
9930
9935
|
}
|
|
9931
9936
|
else {
|
|
9937
|
+
if (this._domElement) {
|
|
9938
|
+
this._engine.setLocalVideoPlayer(StreamIndex.STREAM_INDEX_SCREEN, {
|
|
9939
|
+
renderDom: null,
|
|
9940
|
+
renderMode: _getRenderMode(),
|
|
9941
|
+
});
|
|
9942
|
+
}
|
|
9932
9943
|
this._domElement = this._engine.setLocalVideoPlayer(StreamIndex.STREAM_INDEX_SCREEN, {
|
|
9933
9944
|
renderDom: element,
|
|
9934
9945
|
renderMode: _getRenderMode(),
|
|
@@ -10185,6 +10196,13 @@ var VolcRemoteVideoTrack = /** @class */ (function (_super) {
|
|
|
10185
10196
|
};
|
|
10186
10197
|
if (this._engine) {
|
|
10187
10198
|
if (this.isScreen) {
|
|
10199
|
+
if (this._domElement) {
|
|
10200
|
+
this._engine.setRemoteVideoPlayer(StreamIndex.STREAM_INDEX_SCREEN, {
|
|
10201
|
+
renderDom: null,
|
|
10202
|
+
renderMode: _getRenderMode(),
|
|
10203
|
+
userId: this._userId,
|
|
10204
|
+
});
|
|
10205
|
+
}
|
|
10188
10206
|
this._domElement = this._engine.setRemoteVideoPlayer(StreamIndex.STREAM_INDEX_SCREEN, {
|
|
10189
10207
|
renderDom: element,
|
|
10190
10208
|
renderMode: _getRenderMode(),
|
|
@@ -10193,6 +10211,13 @@ var VolcRemoteVideoTrack = /** @class */ (function (_super) {
|
|
|
10193
10211
|
this._engine.play(this._userId, MediaType.VIDEO, StreamIndex.STREAM_INDEX_SCREEN);
|
|
10194
10212
|
}
|
|
10195
10213
|
else {
|
|
10214
|
+
if (this._domElement) {
|
|
10215
|
+
this._engine.setRemoteVideoPlayer(StreamIndex.STREAM_INDEX_MAIN, {
|
|
10216
|
+
renderDom: null,
|
|
10217
|
+
renderMode: _getRenderMode(),
|
|
10218
|
+
userId: this._userId,
|
|
10219
|
+
});
|
|
10220
|
+
}
|
|
10196
10221
|
this._domElement = this._engine.setRemoteVideoPlayer(StreamIndex.STREAM_INDEX_MAIN, {
|
|
10197
10222
|
renderDom: element,
|
|
10198
10223
|
renderMode: _getRenderMode(),
|
|
@@ -12457,7 +12482,7 @@ function getRTCInstance(token) {
|
|
|
12457
12482
|
return new VolcCoreRTCWrapper({
|
|
12458
12483
|
appId: data.appid,
|
|
12459
12484
|
roomId: data.roomStr,
|
|
12460
|
-
userId: data.user,
|
|
12485
|
+
userId: data.user.toString(),
|
|
12461
12486
|
sdkToken: data.attachToken || data.token,
|
|
12462
12487
|
});
|
|
12463
12488
|
default:
|
package/dist/omnirtc-web.js
CHANGED
|
@@ -103,10 +103,10 @@
|
|
|
103
103
|
lib.InvalidTokenError = InvalidTokenError_1;
|
|
104
104
|
|
|
105
105
|
var StaticConfig = {
|
|
106
|
-
agentVersion: "OmniRTC_Web_V0.1.0-beta.
|
|
106
|
+
agentVersion: "OmniRTC_Web_V0.1.0-beta.1",
|
|
107
107
|
logVersion: 1,
|
|
108
108
|
serviceType: 320,
|
|
109
|
-
logBackendUrl: "https://rtc-logs.magic-school.com/stream.gif"
|
|
109
|
+
logBackendUrl: "https://test-rtc-logs.magic-school.com/stream.gif"
|
|
110
110
|
};
|
|
111
111
|
var RTCEngineType;
|
|
112
112
|
(function (RTCEngineType) {
|
|
@@ -9165,8 +9165,7 @@
|
|
|
9165
9165
|
var rawEncoderConfig = config.encoderConfig;
|
|
9166
9166
|
if (config.encoderConfig) {
|
|
9167
9167
|
if (typeof config.encoderConfig === 'string'
|
|
9168
|
-
&& config.encoderConfig in presetVideoEncoderConfig)
|
|
9169
|
-
{
|
|
9168
|
+
&& config.encoderConfig in presetVideoEncoderConfig) {
|
|
9170
9169
|
rawEncoderConfig = presetVideoEncoderConfig[config.encoderConfig];
|
|
9171
9170
|
}
|
|
9172
9171
|
}
|
|
@@ -9928,6 +9927,12 @@
|
|
|
9928
9927
|
else {
|
|
9929
9928
|
this._engine.setLocalVideoMirrorType(MirrorType.MIRROR_TYPE_NONE);
|
|
9930
9929
|
}
|
|
9930
|
+
if (this._domElement) {
|
|
9931
|
+
this._engine.setLocalVideoPlayer(StreamIndex.STREAM_INDEX_MAIN, {
|
|
9932
|
+
renderDom: null,
|
|
9933
|
+
renderMode: _getRenderMode(),
|
|
9934
|
+
});
|
|
9935
|
+
}
|
|
9931
9936
|
this._domElement = this._engine.setLocalVideoPlayer(StreamIndex.STREAM_INDEX_MAIN, {
|
|
9932
9937
|
renderDom: element,
|
|
9933
9938
|
renderMode: _getRenderMode(),
|
|
@@ -9935,6 +9940,12 @@
|
|
|
9935
9940
|
this._engine.play(undefined, MediaType.VIDEO, StreamIndex.STREAM_INDEX_MAIN);
|
|
9936
9941
|
}
|
|
9937
9942
|
else {
|
|
9943
|
+
if (this._domElement) {
|
|
9944
|
+
this._engine.setLocalVideoPlayer(StreamIndex.STREAM_INDEX_SCREEN, {
|
|
9945
|
+
renderDom: null,
|
|
9946
|
+
renderMode: _getRenderMode(),
|
|
9947
|
+
});
|
|
9948
|
+
}
|
|
9938
9949
|
this._domElement = this._engine.setLocalVideoPlayer(StreamIndex.STREAM_INDEX_SCREEN, {
|
|
9939
9950
|
renderDom: element,
|
|
9940
9951
|
renderMode: _getRenderMode(),
|
|
@@ -12463,7 +12474,7 @@
|
|
|
12463
12474
|
return new VolcCoreRTCWrapper({
|
|
12464
12475
|
appId: data.appid,
|
|
12465
12476
|
roomId: data.roomStr,
|
|
12466
|
-
userId: data.user,
|
|
12477
|
+
userId: data.user.toString(),
|
|
12467
12478
|
sdkToken: data.attachToken || data.token,
|
|
12468
12479
|
});
|
|
12469
12480
|
default:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnirtc-web",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/es-omnirtc-web.js",
|
|
6
6
|
"types": "./dist/omni.d.ts",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"start": "rollup -c rollup.config.js --watch",
|
|
9
9
|
"build-es": "cross-env NODE_ENV=production rollup -c rollup.es.js",
|
|
10
10
|
"build": "cross-env NODE_ENV=production rollup -c rollup.config.js",
|
|
11
|
+
"prepack": "npm run build-es",
|
|
11
12
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
12
13
|
"doc": "npx typedoc --out ./docs --excludePrivate --excludeExternals --mode modules ./src/rtcengine.ts"
|
|
13
14
|
},
|