omnirtc-web 0.1.0-beta.4 → 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.4",
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"
@@ -9971,11 +9971,11 @@ var VolcLocalVideoTrack = /** @class */ (function (_super) {
9971
9971
  VolcLocalVideoTrack.prototype.getCurrentFrameData = function () {
9972
9972
  var width = 100;
9973
9973
  var height = 100;
9974
- if (this._domElement) {
9974
+ if (this._domElement instanceof HTMLVideoElement) {
9975
9975
  var canvas = document.createElement('canvas');
9976
9976
  var ctx = canvas.getContext('2d');
9977
- width = this._domElement.clientWidth;
9978
- height = this._domElement.clientHeight;
9977
+ width = this._domElement.videoWidth;
9978
+ height = this._domElement.videoHeight;
9979
9979
  canvas.width = width;
9980
9980
  canvas.height = height;
9981
9981
  if (ctx) {
@@ -10261,11 +10261,11 @@ var VolcRemoteVideoTrack = /** @class */ (function (_super) {
10261
10261
  VolcRemoteVideoTrack.prototype.getCurrentFrameData = function () {
10262
10262
  var width = 100;
10263
10263
  var height = 100;
10264
- if (this._domElement) {
10264
+ if (this._domElement instanceof HTMLVideoElement) {
10265
10265
  var canvas = document.createElement('canvas');
10266
10266
  var ctx = canvas.getContext('2d');
10267
- width = this._domElement.clientWidth;
10268
- height = this._domElement.clientHeight;
10267
+ width = this._domElement.videoWidth;
10268
+ height = this._domElement.videoHeight;
10269
10269
  canvas.width = width;
10270
10270
  canvas.height = height;
10271
10271
  if (ctx) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnirtc-web",
3
- "version": "0.1.0-beta.4",
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",