videomail-client 15.3.3 → 15.5.0
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/dist/cjs/index.cjs +8700 -9204
- package/dist/esm/index.d.ts +0 -2
- package/dist/esm/index.js +58 -61
- package/dist/esm/types/error.d.ts +0 -2
- package/dist/esm/wrappers/visuals/recorder.d.ts +4 -0
- package/dist/umd/index.js +74 -635
- package/package.json +6 -7
- package/dist/cjs/236~1.cjs +0 -120
- package/dist/esm/types/device.d.ts +0 -10
- package/dist/esm/util/getCapacitorDeviceMetadata.d.ts +0 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "videomail-client",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.5.0",
|
|
4
4
|
"description": "A wicked npm package to record videos directly in the browser, for Deaf and Sign Language!",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webcam",
|
|
@@ -59,7 +59,6 @@
|
|
|
59
59
|
},
|
|
60
60
|
"prettier": "./prettier.config.js",
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@capacitor/device": "8.0.3",
|
|
63
62
|
"animitter": "3.0.0",
|
|
64
63
|
"audio-sample": "7.0.0",
|
|
65
64
|
"canvas-to-buffer": "4.1.2",
|
|
@@ -90,20 +89,20 @@
|
|
|
90
89
|
"@tsconfig/node26": "26.0.1",
|
|
91
90
|
"@tsconfig/strictest": "2.0.8",
|
|
92
91
|
"@types/defined": "1.0.2",
|
|
93
|
-
"@types/node": "26.
|
|
92
|
+
"@types/node": "26.5.0",
|
|
94
93
|
"@types/superagent": "8.1.11",
|
|
95
94
|
"@types/ua-parser-js": "0.7.39",
|
|
96
95
|
"@vitest/eslint-plugin": "1.6.27",
|
|
97
96
|
"audit-ci": "7.1.0",
|
|
98
|
-
"chromatic": "18.7.
|
|
97
|
+
"chromatic": "18.7.4",
|
|
99
98
|
"cross-env": "10.1.0",
|
|
100
|
-
"eslint": "10.
|
|
99
|
+
"eslint": "10.10.0",
|
|
101
100
|
"eslint-import-resolver-typescript": "4.4.5",
|
|
102
101
|
"eslint-plugin-de-morgan": "2.1.3",
|
|
103
102
|
"eslint-plugin-depend": "1.5.0",
|
|
104
103
|
"eslint-plugin-import-x": "4.17.1",
|
|
105
104
|
"eslint-plugin-package-json": "1.8.0",
|
|
106
|
-
"eslint-plugin-regexp": "3.
|
|
105
|
+
"eslint-plugin-regexp": "3.3.0",
|
|
107
106
|
"eslint-plugin-simple-import-sort": "14.0.0",
|
|
108
107
|
"globals": "17.12.0",
|
|
109
108
|
"jsdom": "30.0.1",
|
|
@@ -119,7 +118,7 @@
|
|
|
119
118
|
"storybook-html-rsbuild": "3.4.2",
|
|
120
119
|
"type-fest": "5.9.0",
|
|
121
120
|
"typescript": "6.0.3",
|
|
122
|
-
"typescript-eslint": "8.
|
|
121
|
+
"typescript-eslint": "8.70.0",
|
|
123
122
|
"vitest": "4.1.11"
|
|
124
123
|
},
|
|
125
124
|
"engines": {
|
package/dist/cjs/236~1.cjs
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.ids = [
|
|
3
|
-
236
|
|
4
|
-
];
|
|
5
|
-
exports.modules = {
|
|
6
|
-
5303 (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
7
|
-
var _capacitor_core__rspack_import_0 = __webpack_require__(6546);
|
|
8
|
-
class DeviceWeb extends _capacitor_core__rspack_import_0.E_ {
|
|
9
|
-
async getId() {
|
|
10
|
-
return {
|
|
11
|
-
identifier: this.getUid()
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
async getInfo() {
|
|
15
|
-
if ("u" < typeof navigator || !navigator.userAgent) throw this.unavailable('Device API not available in this browser');
|
|
16
|
-
const ua = navigator.userAgent;
|
|
17
|
-
const uaFields = this.parseUa(ua);
|
|
18
|
-
return {
|
|
19
|
-
model: uaFields.model,
|
|
20
|
-
platform: 'web',
|
|
21
|
-
operatingSystem: uaFields.operatingSystem,
|
|
22
|
-
osVersion: uaFields.osVersion,
|
|
23
|
-
manufacturer: navigator.vendor,
|
|
24
|
-
isVirtual: false,
|
|
25
|
-
webViewVersion: uaFields.browserVersion
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
async getBatteryInfo() {
|
|
29
|
-
if ("u" < typeof navigator || !navigator.getBattery) throw this.unavailable('Device API not available in this browser');
|
|
30
|
-
let battery = {};
|
|
31
|
-
try {
|
|
32
|
-
battery = await navigator.getBattery();
|
|
33
|
-
} catch (e) {}
|
|
34
|
-
return {
|
|
35
|
-
batteryLevel: battery.level,
|
|
36
|
-
isCharging: battery.charging
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
async getLanguageCode() {
|
|
40
|
-
return {
|
|
41
|
-
value: navigator.language.split('-')[0].toLowerCase()
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
async getLanguageTag() {
|
|
45
|
-
return {
|
|
46
|
-
value: navigator.language
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
parseUa(ua) {
|
|
50
|
-
const uaFields = {};
|
|
51
|
-
const start = ua.indexOf('(') + 1;
|
|
52
|
-
let end = ua.indexOf(') AppleWebKit');
|
|
53
|
-
if (-1 !== ua.indexOf(') Gecko')) end = ua.indexOf(') Gecko');
|
|
54
|
-
const fields = ua.substring(start, end);
|
|
55
|
-
if (-1 !== ua.indexOf('Android')) {
|
|
56
|
-
const tmpFields = fields.replace('; wv', '').split('; ').pop();
|
|
57
|
-
if (tmpFields) uaFields.model = tmpFields.split(' Build')[0];
|
|
58
|
-
uaFields.osVersion = fields.split('; ')[1];
|
|
59
|
-
} else {
|
|
60
|
-
uaFields.model = fields.split('; ')[0];
|
|
61
|
-
if ("u" > typeof navigator && navigator.oscpu) uaFields.osVersion = navigator.oscpu;
|
|
62
|
-
else if (-1 !== ua.indexOf('Windows')) uaFields.osVersion = fields;
|
|
63
|
-
else {
|
|
64
|
-
const tmpFields = fields.split('; ').pop();
|
|
65
|
-
if (tmpFields) {
|
|
66
|
-
const lastParts = tmpFields.replace(' like Mac OS X', '').split(' ');
|
|
67
|
-
uaFields.osVersion = lastParts[lastParts.length - 1].replace(/_/g, '.');
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
if (/android/i.test(ua)) uaFields.operatingSystem = 'android';
|
|
72
|
-
else if (/iPad|iPhone|iPod/.test(ua) && !window.MSStream) uaFields.operatingSystem = 'ios';
|
|
73
|
-
else if (/Win/.test(ua)) uaFields.operatingSystem = 'windows';
|
|
74
|
-
else if (/Mac/i.test(ua)) uaFields.operatingSystem = 'mac';
|
|
75
|
-
else uaFields.operatingSystem = 'unknown';
|
|
76
|
-
const isSafari = !!window.ApplePaySession;
|
|
77
|
-
const isChrome = !!window.chrome;
|
|
78
|
-
const isFirefox = /Firefox/.test(ua);
|
|
79
|
-
const isEdge = /Edg/.test(ua);
|
|
80
|
-
const isFirefoxIOS = /FxiOS/.test(ua);
|
|
81
|
-
const isChromeIOS = /CriOS/.test(ua);
|
|
82
|
-
const isEdgeIOS = /EdgiOS/.test(ua);
|
|
83
|
-
if (isSafari || isChrome && !isEdge || isFirefoxIOS || isChromeIOS || isEdgeIOS) {
|
|
84
|
-
let searchWord;
|
|
85
|
-
searchWord = isFirefoxIOS ? 'FxiOS' : isChromeIOS ? 'CriOS' : isEdgeIOS ? 'EdgiOS' : isSafari ? 'Version' : 'Chrome';
|
|
86
|
-
const words = ua.split(' ');
|
|
87
|
-
for (const word of words)if (word.includes(searchWord)) {
|
|
88
|
-
const version = word.split('/')[1];
|
|
89
|
-
uaFields.browserVersion = version;
|
|
90
|
-
}
|
|
91
|
-
} else if (isFirefox || isEdge) {
|
|
92
|
-
const reverseUA = ua.split('').reverse().join('');
|
|
93
|
-
const reverseVersion = reverseUA.split('/')[0];
|
|
94
|
-
const version = reverseVersion.split('').reverse().join('');
|
|
95
|
-
uaFields.browserVersion = version;
|
|
96
|
-
}
|
|
97
|
-
return uaFields;
|
|
98
|
-
}
|
|
99
|
-
getUid() {
|
|
100
|
-
if ("u" > typeof window && window.localStorage) {
|
|
101
|
-
let uid = window.localStorage.getItem('_capuid');
|
|
102
|
-
if (uid) return uid;
|
|
103
|
-
uid = this.uuid4();
|
|
104
|
-
window.localStorage.setItem('_capuid', uid);
|
|
105
|
-
return uid;
|
|
106
|
-
}
|
|
107
|
-
return this.uuid4();
|
|
108
|
-
}
|
|
109
|
-
uuid4() {
|
|
110
|
-
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
|
|
111
|
-
const r = 16 * Math.random() | 0, v = 'x' === c ? r : 0x3 & r | 0x8;
|
|
112
|
-
return v.toString(16);
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
117
|
-
DeviceWeb: ()=>DeviceWeb
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { BatteryInfo, DeviceInfo, GetLanguageCodeResult, LanguageTag } from "@capacitor/device";
|
|
2
|
-
import type { ErrorObject } from "serialize-error";
|
|
3
|
-
interface CapacitorDeviceMetadata {
|
|
4
|
-
battery?: BatteryInfo;
|
|
5
|
-
errors?: ErrorObject[];
|
|
6
|
-
info?: DeviceInfo;
|
|
7
|
-
languageCode?: GetLanguageCodeResult;
|
|
8
|
-
languageTag?: LanguageTag;
|
|
9
|
-
}
|
|
10
|
-
export type { CapacitorDeviceMetadata };
|