@authme/util 2.8.23 → 2.8.25

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.
Files changed (3) hide show
  1. package/index.cjs +8 -4
  2. package/index.js +8 -4
  3. package/package.json +1 -1
package/index.cjs CHANGED
@@ -1454,8 +1454,8 @@ function switchCamera(deviceId, video) {
1454
1454
  // 推測依然需要使用 width & height 的限制條件,
1455
1455
  // 否則即使是高解析度相機,也有可能拿到低解析度的圖片。(待驗證)
1456
1456
  // 發現部分 camera 會無法套用這個設定導致不會有畫面出現
1457
- // constraints.video.width = { min: 1280, ideal: 1920, max: 1920 };
1458
- // constraints.video.height = { min: 720, ideal: 1080, max: 1080 };
1457
+ // constraints.video.width = { min: 1280, ideal: 1280, max: 1920 };
1458
+ // constraints.video.height = { min: 720, ideal: 720, max: 1080 };
1459
1459
  }
1460
1460
  stream = yield navigator.mediaDevices.getUserMedia(constraints);
1461
1461
  // try {
@@ -1464,6 +1464,10 @@ function switchCamera(deviceId, video) {
1464
1464
  // } catch (error) {
1465
1465
  // console.error("獲取媒體流失敗:", error);
1466
1466
  // }
1467
+ if (stream.getVideoTracks().length === 0) {
1468
+ console.error('沒有 video track');
1469
+ throw new Error('沒有 video track');
1470
+ }
1467
1471
  try {
1468
1472
  video.srcObject = stream;
1469
1473
  } catch (error) {
@@ -3147,8 +3151,8 @@ const themeConfigDefault = {
3147
3151
  };
3148
3152
 
3149
3153
  var name = "authme/sdk";
3150
- var version$1 = "2.8.23";
3151
- var date = "2025-06-23T02:36:05+0000";
3154
+ var version$1 = "2.8.25";
3155
+ var date = "2025-08-20T02:53:44+0000";
3152
3156
  var packageInfo = {
3153
3157
  name: name,
3154
3158
  version: version$1,
package/index.js CHANGED
@@ -1444,8 +1444,8 @@ function switchCamera(deviceId, video) {
1444
1444
  // 推測依然需要使用 width & height 的限制條件,
1445
1445
  // 否則即使是高解析度相機,也有可能拿到低解析度的圖片。(待驗證)
1446
1446
  // 發現部分 camera 會無法套用這個設定導致不會有畫面出現
1447
- // constraints.video.width = { min: 1280, ideal: 1920, max: 1920 };
1448
- // constraints.video.height = { min: 720, ideal: 1080, max: 1080 };
1447
+ // constraints.video.width = { min: 1280, ideal: 1280, max: 1920 };
1448
+ // constraints.video.height = { min: 720, ideal: 720, max: 1080 };
1449
1449
  }
1450
1450
  stream = yield navigator.mediaDevices.getUserMedia(constraints);
1451
1451
  // try {
@@ -1454,6 +1454,10 @@ function switchCamera(deviceId, video) {
1454
1454
  // } catch (error) {
1455
1455
  // console.error("獲取媒體流失敗:", error);
1456
1456
  // }
1457
+ if (stream.getVideoTracks().length === 0) {
1458
+ console.error('沒有 video track');
1459
+ throw new Error('沒有 video track');
1460
+ }
1457
1461
  try {
1458
1462
  video.srcObject = stream;
1459
1463
  } catch (error) {
@@ -3137,8 +3141,8 @@ const themeConfigDefault = {
3137
3141
  };
3138
3142
 
3139
3143
  var name = "authme/sdk";
3140
- var version$1 = "2.8.23";
3141
- var date = "2025-06-23T02:36:05+0000";
3144
+ var version$1 = "2.8.25";
3145
+ var date = "2025-08-20T02:53:44+0000";
3142
3146
  var packageInfo = {
3143
3147
  name: name,
3144
3148
  version: version$1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authme/util",
3
- "version": "2.8.23",
3
+ "version": "2.8.25",
4
4
  "peerDependencies": {
5
5
  "core-js": "^3.6.0",
6
6
  "file-saver": "2.0.5",