omnirtc-web 0.1.0-beta.3 → 0.1.0-beta.5

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.
@@ -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.3",
100
+ agentVersion: "OmniRTC_Web_V0.1.0-beta.5",
101
101
  logVersion: 1,
102
102
  serviceType: 320,
103
103
  logBackendUrl: "https://rtc-logs.magic-school.com/stream.gif"
@@ -9185,8 +9185,7 @@ function screenVideoEncoderConfigurationMapping(config) {
9185
9185
  var rawEncoderConfig = config.encoderConfig;
9186
9186
  if (config.encoderConfig) {
9187
9187
  if (typeof config.encoderConfig === 'string'
9188
- && config.encoderConfig in presetScreenVideoEncoderConfig) ;
9189
- {
9188
+ && config.encoderConfig in presetScreenVideoEncoderConfig) {
9190
9189
  rawEncoderConfig = presetScreenVideoEncoderConfig[config.encoderConfig];
9191
9190
  }
9192
9191
  }
@@ -9972,11 +9971,11 @@ var VolcLocalVideoTrack = /** @class */ (function (_super) {
9972
9971
  VolcLocalVideoTrack.prototype.getCurrentFrameData = function () {
9973
9972
  var width = 100;
9974
9973
  var height = 100;
9975
- if (this._domElement) {
9974
+ if (this._domElement instanceof HTMLVideoElement) {
9976
9975
  var canvas = document.createElement('canvas');
9977
9976
  var ctx = canvas.getContext('2d');
9978
- width = this._domElement.clientWidth;
9979
- height = this._domElement.clientHeight;
9977
+ width = this._domElement.videoWidth;
9978
+ height = this._domElement.videoHeight;
9980
9979
  canvas.width = width;
9981
9980
  canvas.height = height;
9982
9981
  if (ctx) {
@@ -10262,11 +10261,11 @@ var VolcRemoteVideoTrack = /** @class */ (function (_super) {
10262
10261
  VolcRemoteVideoTrack.prototype.getCurrentFrameData = function () {
10263
10262
  var width = 100;
10264
10263
  var height = 100;
10265
- if (this._domElement) {
10264
+ if (this._domElement instanceof HTMLVideoElement) {
10266
10265
  var canvas = document.createElement('canvas');
10267
10266
  var ctx = canvas.getContext('2d');
10268
- width = this._domElement.clientWidth;
10269
- height = this._domElement.clientHeight;
10267
+ width = this._domElement.videoWidth;
10268
+ height = this._domElement.videoHeight;
10270
10269
  canvas.width = width;
10271
10270
  canvas.height = height;
10272
10271
  if (ctx) {
@@ -11362,6 +11361,7 @@ var VolcCoreRTC = /** @class */ (function () {
11362
11361
  switch (_a.label) {
11363
11362
  case 0:
11364
11363
  if (!config) return [3 /*break*/, 2];
11364
+ if (!config.encoderConfig) return [3 /*break*/, 2];
11365
11365
  screenVideoEncoderConfig = screenVideoEncoderConfigurationMapping(config);
11366
11366
  return [4 /*yield*/, this._engine.setScreenEncoderConfig(screenVideoEncoderConfig)];
11367
11367
  case 1:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnirtc-web",
3
- "version": "0.1.0-beta.3",
3
+ "version": "0.1.0-beta.5",
4
4
  "description": "",
5
5
  "main": "./dist/es-omnirtc-web.js",
6
6
  "types": "./dist/omni.d.ts",