@yimou6/common-ui 1.14.1 → 1.14.3

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 (45) hide show
  1. package/cdn/index.cdn.js +16 -16
  2. package/cdn/index.cdn.js.map +1 -1
  3. package/cdn/index.cdn.mjs +16 -16
  4. package/cdn/index.cdn.mjs.map +1 -1
  5. package/cdn/index.css +1 -1
  6. package/es/components/index.mjs +1 -1
  7. package/es/components/tzj-player/index.d.ts +285 -6
  8. package/es/components/tzj-player/index.mjs +1 -1
  9. package/es/components/tzj-player/src/ctyun-player.mjs +9 -4
  10. package/es/components/tzj-player/src/ctyun-player.mjs.map +1 -1
  11. package/es/components/tzj-player/src/ctyun-player.vue2.mjs +6 -122
  12. package/es/components/tzj-player/src/ctyun-player.vue2.mjs.map +1 -1
  13. package/es/components/tzj-player/src/easyPlayer.vue2.mjs +23 -5
  14. package/es/components/tzj-player/src/easyPlayer.vue2.mjs.map +1 -1
  15. package/es/components/tzj-player/src/tzj-player.vue.d.ts +285 -6
  16. package/es/components/tzj-player/src/yunzhiyan.d.ts +0 -15
  17. package/es/components/tzj-player/src/yunzhiyan.mjs +1 -215
  18. package/es/components/tzj-player/src/yunzhiyan.mjs.map +1 -1
  19. package/es/components/tzj-player/src/yunzhiyanPlayer.vue.d.ts +0 -6
  20. package/es/components/tzj-player/src/yunzhiyanPlayer.vue2.mjs +6 -144
  21. package/es/components/tzj-player/src/yunzhiyanPlayer.vue2.mjs.map +1 -1
  22. package/es/index.mjs +1 -1
  23. package/lib/components/index.js +0 -4
  24. package/lib/components/index.js.map +1 -1
  25. package/lib/components/tzj-player/index.d.ts +285 -6
  26. package/lib/components/tzj-player/index.js +0 -4
  27. package/lib/components/tzj-player/index.js.map +1 -1
  28. package/lib/components/tzj-player/src/ctyun-player.js +9 -4
  29. package/lib/components/tzj-player/src/ctyun-player.js.map +1 -1
  30. package/lib/components/tzj-player/src/ctyun-player.vue2.js +5 -121
  31. package/lib/components/tzj-player/src/ctyun-player.vue2.js.map +1 -1
  32. package/lib/components/tzj-player/src/easyPlayer.vue2.js +23 -5
  33. package/lib/components/tzj-player/src/easyPlayer.vue2.js.map +1 -1
  34. package/lib/components/tzj-player/src/tzj-player.vue.d.ts +285 -6
  35. package/lib/components/tzj-player/src/yunzhiyan.d.ts +0 -15
  36. package/lib/components/tzj-player/src/yunzhiyan.js +0 -218
  37. package/lib/components/tzj-player/src/yunzhiyan.js.map +1 -1
  38. package/lib/components/tzj-player/src/yunzhiyanPlayer.vue.d.ts +0 -6
  39. package/lib/components/tzj-player/src/yunzhiyanPlayer.vue2.js +5 -143
  40. package/lib/components/tzj-player/src/yunzhiyanPlayer.vue2.js.map +1 -1
  41. package/lib/index.js +0 -4
  42. package/lib/index.js.map +1 -1
  43. package/package.json +1 -1
  44. package/theme-default/i-tzj-player.css +1 -1
  45. package/theme-default/index.css +1 -1
@@ -1,221 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var CryptoJS = require('crypto-js');
4
-
5
3
  var __defProp = Object.defineProperty;
6
4
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- function getAccessKey() {
8
- if (typeof localStorage !== "undefined") {
9
- return localStorage.getItem("YZYAK") || "";
10
- }
11
- return "";
12
- }
13
- __name(getAccessKey, "getAccessKey");
14
- function getSecretKey() {
15
- if (typeof localStorage !== "undefined") {
16
- return localStorage.getItem("YZYSK") || "";
17
- }
18
- return "";
19
- }
20
- __name(getSecretKey, "getSecretKey");
21
- function sign(headers, params, sk = getSecretKey()) {
22
- if (!sk) {
23
- console.warn(
24
- "[tzj-player] \u7B7E\u540D\u5BC6\u94A5 YZYSK \u4E3A\u7A7A\uFF0C\u7B7E\u540D\u7ED3\u679C\u5C06\u4E0D\u88AB\u670D\u52A1\u7AEF\u8BA4\u53EF\uFF0C\u8BF7\u786E\u8BA4\u5DF2\u5199\u5165 localStorage"
25
- );
26
- }
27
- const obj = Object.assign({}, headers, params);
28
- const keys = Object.keys(obj).sort();
29
- let str = "";
30
- keys.forEach((key, index) => {
31
- str += `${key}="${obj[key]}"`;
32
- if (index !== keys.length - 1) {
33
- str += "&";
34
- }
35
- });
36
- console.log("\u672A\u52A0\u7B7E\u7684\u5B57\u7B26\u4E32", str);
37
- const hash = CryptoJS.HmacSHA256(str, sk);
38
- console.log("\u52A0\u7B7E\u540E\u7684\u5B57\u7B26\u4E32", hash.toString(CryptoJS.enc.Hex));
39
- return hash.toString(CryptoJS.enc.Hex);
40
- }
41
- __name(sign, "sign");
42
- async function GetYunZhiYanDeviceChannel(deviceId) {
43
- try {
44
- const headers = {
45
- algorithm: "HmacSHA256",
46
- requestTime: Date.now(),
47
- accessKey: getAccessKey()
48
- };
49
- const params = { deviceId };
50
- headers.sign = sign(headers, params);
51
- const controller = new AbortController();
52
- const timeoutId = setTimeout(() => controller.abort(), 1e4);
53
- const response = await fetch("/vsuap-platform-api/v1/device/queryChannel", {
54
- method: "POST",
55
- headers: {
56
- "Content-Type": "application/json",
57
- ...headers
58
- },
59
- body: JSON.stringify(params),
60
- signal: controller.signal
61
- });
62
- clearTimeout(timeoutId);
63
- if (!response.ok) {
64
- console.error(`HTTP\u9519\u8BEF: ${response.status} ${response.statusText}`);
65
- return false;
66
- }
67
- const res = await response.json();
68
- const { code, data } = res;
69
- if (code === 200 && Array.isArray(data) && data.length > 0 && data[0].channelCodeId) {
70
- return data[0].channelCodeId || "";
71
- } else {
72
- console.error(
73
- `\u4E1A\u52A1\u9519\u8BEF: code=${code}, message=${res.message || "\u672A\u77E5\u9519\u8BEF"}`
74
- );
75
- return false;
76
- }
77
- } catch (error) {
78
- if (error instanceof Error) {
79
- if (error.name === "AbortError") {
80
- console.error("\u8BF7\u6C42\u8D85\u65F6: GetYunZhiYanDeviceChannel");
81
- } else if (error.name === "TypeError") {
82
- console.error("\u7F51\u7EDC\u9519\u8BEF: GetYunZhiYanDeviceChannel", error.message);
83
- } else {
84
- console.error(
85
- "JSON\u89E3\u6790\u9519\u8BEF\u6216\u5176\u4ED6\u9519\u8BEF: GetYunZhiYanDeviceChannel",
86
- error.message
87
- );
88
- }
89
- } else {
90
- console.error("\u672A\u77E5\u9519\u8BEF: GetYunZhiYanDeviceChannel", error);
91
- }
92
- return false;
93
- }
94
- }
95
- __name(GetYunZhiYanDeviceChannel, "GetYunZhiYanDeviceChannel");
96
- async function GetYunZhiYanDeviceVideoUrl(deviceId, channelCodeId) {
97
- try {
98
- const headers = {
99
- algorithm: "HmacSHA256",
100
- requestTime: Date.now(),
101
- accessKey: getAccessKey()
102
- };
103
- const params = { deviceId, channelCodeId };
104
- headers.sign = sign(headers, params);
105
- const controller = new AbortController();
106
- const timeoutId = setTimeout(() => controller.abort(), 1e4);
107
- const response = await fetch("/vsuap-platform-api/v1/device/playOn", {
108
- method: "POST",
109
- headers: {
110
- "Content-Type": "application/json",
111
- ...headers
112
- },
113
- body: JSON.stringify(params),
114
- signal: controller.signal
115
- });
116
- clearTimeout(timeoutId);
117
- if (!response.ok) {
118
- console.error(`HTTP\u9519\u8BEF: ${response.status} ${response.statusText}`);
119
- return false;
120
- }
121
- const res = await response.json();
122
- const { code, data } = res;
123
- if (code === 200) {
124
- return (data == null ? void 0 : data.flv) || "";
125
- } else {
126
- console.error(
127
- `\u4E1A\u52A1\u9519\u8BEF: code=${code}, message=${res.message || "\u672A\u77E5\u9519\u8BEF"}`
128
- );
129
- return false;
130
- }
131
- } catch (error) {
132
- if (error instanceof Error) {
133
- if (error.name === "AbortError") {
134
- console.error("\u8BF7\u6C42\u8D85\u65F6: GetYunZhiYanDeviceVideoUrl");
135
- } else if (error.name === "TypeError") {
136
- console.error("\u7F51\u7EDC\u9519\u8BEF: GetYunZhiYanDeviceVideoUrl", error.message);
137
- } else {
138
- console.error(
139
- "JSON\u89E3\u6790\u9519\u8BEF\u6216\u5176\u4ED6\u9519\u8BEF: GetYunZhiYanDeviceVideoUrl",
140
- error.message
141
- );
142
- }
143
- } else {
144
- console.error("\u672A\u77E5\u9519\u8BEF: GetYunZhiYanDeviceVideoUrl", error);
145
- }
146
- return false;
147
- }
148
- }
149
- __name(GetYunZhiYanDeviceVideoUrl, "GetYunZhiYanDeviceVideoUrl");
150
- async function ApiEnroll(params) {
151
- const { projectName, projectContact, contactInfo, remark, requestId } = params;
152
- if (!projectName || !projectContact || !contactInfo) {
153
- console.warn(
154
- "[tzj-player] ApiEnroll: projectName / projectContact / contactInfo \u5747\u4E3A\u5FC5\u586B"
155
- );
156
- return {
157
- code: -1,
158
- message: "projectName\u3001projectContact\u3001contactInfo \u5747\u4E3A\u5FC5\u586B"
159
- };
160
- }
161
- if (!/^\d{11}$/.test(contactInfo)) {
162
- console.warn("[tzj-player] ApiEnroll: contactInfo \u5FC5\u987B\u662F11\u4F4D\u6570\u5B57");
163
- return { code: -1, message: "contactInfo \u5FC5\u987B\u662F11\u4F4D\u6570\u5B57\u7684\u7535\u8BDD\u53F7\u7801" };
164
- }
165
- const body = {
166
- projectName,
167
- projectContact,
168
- contactInfo
169
- };
170
- if (remark) body.remark = remark;
171
- if (requestId) body.requestId = requestId;
172
- const headers = {
173
- algorithm: "HmacSHA256",
174
- requestTime: Date.now(),
175
- accessKey: getAccessKey()
176
- };
177
- headers.sign = sign(headers, body);
178
- const controller = new AbortController();
179
- const timeoutId = setTimeout(() => controller.abort(), 1e4);
180
- try {
181
- const response = await fetch("/vsuap-platform-api/v1/user/apiEnroll", {
182
- method: "POST",
183
- headers: {
184
- // POST 必须带 Content-Type,否则网关无法解析入参(GET 则不允许携带)
185
- "Content-Type": "application/json",
186
- ...headers
187
- },
188
- body: JSON.stringify(body),
189
- signal: controller.signal
190
- });
191
- if (!response.ok) {
192
- console.error(
193
- `HTTP\u9519\u8BEF: ${response.status} ${response.statusText} - ApiEnroll`
194
- );
195
- return { code: response.status, message: response.statusText };
196
- }
197
- const res = await response.json();
198
- if (res.code !== 200) {
199
- console.error(
200
- `API\u6743\u9650\u6CE8\u518C\u5931\u8D25: code=${res.code}, message=${res.message || "\u672A\u77E5\u9519\u8BEF"}`
201
- );
202
- }
203
- return res;
204
- } catch (error) {
205
- if (error instanceof Error && error.name === "AbortError") {
206
- console.error("\u8BF7\u6C42\u8D85\u65F6: ApiEnroll");
207
- return { code: -1, message: "\u8BF7\u6C42\u8D85\u65F6" };
208
- }
209
- console.error("\u8BF7\u6C42\u5931\u8D25: ApiEnroll", error);
210
- return {
211
- code: -1,
212
- message: error instanceof Error ? error.message : "\u672A\u77E5\u9519\u8BEF"
213
- };
214
- } finally {
215
- clearTimeout(timeoutId);
216
- }
217
- }
218
- __name(ApiEnroll, "ApiEnroll");
219
5
  function parseAuthorizedTokenCookie() {
220
6
  const match = document.cookie.match(/authorized-token=([^;]+)/);
221
7
  if (!match) return null;
@@ -277,10 +63,6 @@ async function getVideoUrlByCamreaId(deviceId) {
277
63
  }
278
64
  __name(getVideoUrlByCamreaId, "getVideoUrlByCamreaId");
279
65
 
280
- exports.ApiEnroll = ApiEnroll;
281
- exports.GetYunZhiYanDeviceChannel = GetYunZhiYanDeviceChannel;
282
- exports.GetYunZhiYanDeviceVideoUrl = GetYunZhiYanDeviceVideoUrl;
283
66
  exports.getVideoUrlByCamreaId = getVideoUrlByCamreaId;
284
67
  exports.parseAuthorizedTokenCookie = parseAuthorizedTokenCookie;
285
- exports.sign = sign;
286
68
  //# sourceMappingURL=yunzhiyan.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"yunzhiyan.js","sources":["../../../../../../../packages/components/tzj-player/src/yunzhiyan.ts"],"sourcesContent":["import CryptoJS from \"crypto-js\";\n\n/**\n * 获取访问密钥,支持 SSR 环境\n */\nfunction getAccessKey(): string {\n if (typeof localStorage !== \"undefined\") {\n return localStorage.getItem(\"YZYAK\") || \"\";\n }\n return \"\";\n}\n\n/**\n * 获取签名密钥,支持 SSR 环境\n */\nfunction getSecretKey(): string {\n if (typeof localStorage !== \"undefined\") {\n return localStorage.getItem(\"YZYSK\") || \"\";\n }\n return \"\";\n}\n\n/**\n * 签名函数\n * @param headers 请求头参数\n * @param params 请求参数\n * @param sk 签名密钥\n * @returns string 签名结果\n */\nexport function sign(\n headers: Record<string, string | number>,\n params: Record<string, any>,\n sk: string = getSecretKey(),\n): string {\n if (!sk) {\n console.warn(\n \"[tzj-player] 签名密钥 YZYSK 为空,签名结果将不被服务端认可,请确认已写入 localStorage\",\n );\n }\n const obj = Object.assign({}, headers, params);\n const keys = Object.keys(obj).sort();\n let str = \"\";\n // 拼接字符串\n keys.forEach((key, index) => {\n str += `${key}=\"${obj[key]}\"`;\n if (index !== keys.length - 1) {\n str += \"&\";\n }\n });\n console.log(\"未加签的字符串\", str);\n // 加密\n const hash = CryptoJS.HmacSHA256(str, sk);\n console.log(\"加签后的字符串\", hash.toString(CryptoJS.enc.Hex));\n return hash.toString(CryptoJS.enc.Hex);\n}\n/**\n * 获取云智眼设备通道ID\n * @param deviceId 设备ID\n * @returns Promise<string | false> 成功返回通道ID,失败返回false\n */\nexport async function GetYunZhiYanDeviceChannel(\n deviceId: string,\n): Promise<string | false> {\n try {\n const headers: Record<string, string | number> = {\n algorithm: \"HmacSHA256\",\n requestTime: Date.now(),\n accessKey: getAccessKey(),\n };\n const params = { deviceId };\n headers.sign = sign(headers, params);\n\n const controller = new AbortController();\n const timeoutId = setTimeout(() => controller.abort(), 10000); // 10秒超时\n\n const response = await fetch(\"/vsuap-platform-api/v1/device/queryChannel\", {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n ...headers,\n },\n body: JSON.stringify(params),\n signal: controller.signal,\n });\n\n clearTimeout(timeoutId);\n\n if (!response.ok) {\n console.error(`HTTP错误: ${response.status} ${response.statusText}`);\n return false;\n }\n\n const res = await response.json();\n const { code, data } = res;\n\n if (\n code === 200 &&\n Array.isArray(data) &&\n data.length > 0 &&\n data[0].channelCodeId\n ) {\n return data[0].channelCodeId || \"\";\n } else {\n console.error(\n `业务错误: code=${code}, message=${res.message || \"未知错误\"}`,\n );\n return false;\n }\n } catch (error) {\n if (error instanceof Error) {\n if (error.name === \"AbortError\") {\n console.error(\"请求超时: GetYunZhiYanDeviceChannel\");\n } else if (error.name === \"TypeError\") {\n console.error(\"网络错误: GetYunZhiYanDeviceChannel\", error.message);\n } else {\n console.error(\n \"JSON解析错误或其他错误: GetYunZhiYanDeviceChannel\",\n error.message,\n );\n }\n } else {\n console.error(\"未知错误: GetYunZhiYanDeviceChannel\", error);\n }\n return false;\n }\n}\n\n/**\n * 获取云智眼设备视频播放地址\n * @param deviceId 设备ID\n * @param channelCodeId 通道ID\n * @returns Promise<string | false> 成功返回视频播放地址,失败返回false\n */\nexport async function GetYunZhiYanDeviceVideoUrl(\n deviceId: string,\n channelCodeId: string,\n): Promise<string | false> {\n try {\n const headers: Record<string, string | number> = {\n algorithm: \"HmacSHA256\",\n requestTime: Date.now(),\n accessKey: getAccessKey(),\n };\n const params = { deviceId, channelCodeId };\n headers.sign = sign(headers, params);\n\n const controller = new AbortController();\n const timeoutId = setTimeout(() => controller.abort(), 10000); // 10秒超时\n\n const response = await fetch(\"/vsuap-platform-api/v1/device/playOn\", {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n ...headers,\n },\n body: JSON.stringify(params),\n signal: controller.signal,\n });\n\n clearTimeout(timeoutId);\n\n if (!response.ok) {\n console.error(`HTTP错误: ${response.status} ${response.statusText}`);\n return false;\n }\n\n const res = await response.json();\n const { code, data } = res;\n\n if (code === 200) {\n return data?.flv || \"\";\n } else {\n console.error(\n `业务错误: code=${code}, message=${res.message || \"未知错误\"}`,\n );\n return false;\n }\n } catch (error) {\n if (error instanceof Error) {\n if (error.name === \"AbortError\") {\n console.error(\"请求超时: GetYunZhiYanDeviceVideoUrl\");\n } else if (error.name === \"TypeError\") {\n console.error(\"网络错误: GetYunZhiYanDeviceVideoUrl\", error.message);\n } else {\n console.error(\n \"JSON解析错误或其他错误: GetYunZhiYanDeviceVideoUrl\",\n error.message,\n );\n }\n } else {\n console.error(\"未知错误: GetYunZhiYanDeviceVideoUrl\", error);\n }\n return false;\n }\n}\n\n/**\n * API权限注册(云智眼 Open API 2.4.2)\n * 说明:主账号与子账号权限独立,需分别注册;注册一次后该账号下的所有密钥均生效,无需逐个注册。\n * 注意:调用前请确保 localStorage 中已写入 YZYAK / YZYSK,否则签名不通过。\n * @param params 注册信息\n * @param params.projectName 项目名称(请填写全称)\n * @param params.projectContact 项目联系人\n * @param params.contactInfo 联系人电话(必须是11位数字)\n * @param params.remark 备注(可选)\n * @param params.requestId 请求ID(可选,不传由服务端生成,长度不超过16位)\n * @returns Promise<{ code, message, requestId, errCode }> code 为 200 表示注册成功\n */\nexport async function ApiEnroll(params: {\n projectName: string;\n projectContact: string;\n contactInfo: string;\n remark?: string;\n requestId?: string;\n}): Promise<{\n code: number;\n message?: string;\n requestId?: string;\n errCode?: string | null;\n}> {\n const { projectName, projectContact, contactInfo, remark, requestId } =\n params;\n\n // 边界处理:文档要求三项必填,且联系人电话必须是11位数字\n if (!projectName || !projectContact || !contactInfo) {\n console.warn(\n \"[tzj-player] ApiEnroll: projectName / projectContact / contactInfo 均为必填\",\n );\n return {\n code: -1,\n message: \"projectName、projectContact、contactInfo 均为必填\",\n };\n }\n if (!/^\\d{11}$/.test(contactInfo)) {\n console.warn(\"[tzj-player] ApiEnroll: contactInfo 必须是11位数字\");\n return { code: -1, message: \"contactInfo 必须是11位数字的电话号码\" };\n }\n\n const body: Record<string, string> = {\n projectName,\n projectContact,\n contactInfo,\n };\n if (remark) body.remark = remark;\n if (requestId) body.requestId = requestId;\n\n const headers: Record<string, string | number> = {\n algorithm: \"HmacSHA256\",\n requestTime: Date.now(),\n accessKey: getAccessKey(),\n };\n headers.sign = sign(headers, body);\n\n const controller = new AbortController();\n const timeoutId = setTimeout(() => controller.abort(), 10000); // 10秒超时\n\n try {\n const response = await fetch(\"/vsuap-platform-api/v1/user/apiEnroll\", {\n method: \"POST\",\n headers: {\n // POST 必须带 Content-Type,否则网关无法解析入参(GET 则不允许携带)\n \"Content-Type\": \"application/json\",\n ...headers,\n },\n body: JSON.stringify(body),\n signal: controller.signal,\n });\n\n if (!response.ok) {\n console.error(\n `HTTP错误: ${response.status} ${response.statusText} - ApiEnroll`,\n );\n return { code: response.status, message: response.statusText };\n }\n\n // 返回结构:{ code, errCode, message, requestId }\n const res = await response.json();\n if (res.code !== 200) {\n console.error(\n `API权限注册失败: code=${res.code}, message=${res.message || \"未知错误\"}`,\n );\n }\n return res;\n } catch (error) {\n if (error instanceof Error && error.name === \"AbortError\") {\n console.error(\"请求超时: ApiEnroll\");\n return { code: -1, message: \"请求超时\" };\n }\n console.error(\"请求失败: ApiEnroll\", error);\n return {\n code: -1,\n message: error instanceof Error ? error.message : \"未知错误\",\n };\n } finally {\n clearTimeout(timeoutId);\n }\n}\n\n/**\n * 从cookie读取 authorized‑token,并解析出 accessToken\n */\nexport function parseAuthorizedTokenCookie(): string | null {\n // 1. 取出cookie字符串\n const match = document.cookie.match(/authorized-token=([^;]+)/);\n if (!match) return null;\n\n // 2. 先 decodeURIComponent 解码url编码\n const rawStr = decodeURIComponent(match[1]);\n try {\n // 3. 解析json对象\n const obj = JSON.parse(rawStr);\n return \"Bearer \" + obj.accessToken; // 拿到真正的token字符串\n } catch (e) {\n console.error(\"解析authorized‑token失败\", e);\n return null;\n }\n}\n\n/**\n * 根据设备ID获取视频播放地址\n * @param deviceId 设备ID\n * @returns Promise<{ code, data, msg }> code 为 200 时 data 即播放地址,失败时 code 为非 200\n */\nexport async function getVideoUrlByCamreaId(deviceId?: string) {\n // 边界处理:deviceId 为空时不再发出 /device/undefined/play-url 这类无效请求\n if (!deviceId) {\n console.warn(\n \"[tzj-player] getVideoUrlByCamreaId: deviceId 为空,已跳过请求\",\n );\n return { code: -1, data: null, msg: \"deviceId 不能为空\" };\n }\n\n // token 可能不存在或解析失败,不能把 null 直接塞进请求头\n const token = parseAuthorizedTokenCookie();\n const headers: Record<string, string> = {};\n if (token) {\n headers.authorization = token;\n } else {\n console.warn(\n \"[tzj-player] 未获取到 authorized-token,本次请求将不带鉴权头\",\n );\n }\n\n const controller = new AbortController();\n const timeoutId = setTimeout(() => controller.abort(), 10000); // 10秒超时\n\n try {\n const response = await fetch(\n `/production/assetDevice/device/${deviceId}/play-url`,\n { method: \"GET\", headers, signal: controller.signal },\n );\n\n // 网关异常时可能返回 HTML 或空 body,先校验状态码再解析,避免抛出晦涩的 JSON 解析错误\n if (!response.ok) {\n console.error(\n `HTTP错误: ${response.status} ${response.statusText} - getVideoUrlByCamreaId`,\n );\n return { code: response.status, data: null, msg: response.statusText };\n }\n\n const { code, data, msg } = await response.json();\n return { code, data, msg };\n } catch (error) {\n if (error instanceof Error && error.name === \"AbortError\") {\n console.error(\"请求超时: getVideoUrlByCamreaId\");\n return { code: -1, data: null, msg: \"请求超时\" };\n }\n console.error(\"请求失败: getVideoUrlByCamreaId\", error);\n return {\n code: -1,\n data: null,\n msg: error instanceof Error ? error.message : \"未知错误\",\n };\n } finally {\n clearTimeout(timeoutId);\n }\n}\n"],"names":[],"mappings":";;;;;;AAKA,SAAS,YAAuB,GAAA;AAC9B,EAAI,IAAA,OAAO,iBAAiB,WAAa,EAAA;AACvC,IAAO,OAAA,YAAA,CAAa,OAAQ,CAAA,OAAO,CAAK,IAAA,EAAA;AAAA;AAE1C,EAAO,OAAA,EAAA;AACT;AALS,MAAA,CAAA,YAAA,EAAA,cAAA,CAAA;AAUT,SAAS,YAAuB,GAAA;AAC9B,EAAI,IAAA,OAAO,iBAAiB,WAAa,EAAA;AACvC,IAAO,OAAA,YAAA,CAAa,OAAQ,CAAA,OAAO,CAAK,IAAA,EAAA;AAAA;AAE1C,EAAO,OAAA,EAAA;AACT;AALS,MAAA,CAAA,YAAA,EAAA,cAAA,CAAA;AAcF,SAAS,IACd,CAAA,OAAA,EACA,MACA,EAAA,EAAA,GAAa,cACL,EAAA;AACR,EAAA,IAAI,CAAC,EAAI,EAAA;AACP,IAAQ,OAAA,CAAA,IAAA;AAAA,MACN;AAAA,KACF;AAAA;AAEF,EAAA,MAAM,MAAM,MAAO,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ACN,CAAW,kBAAA,EAAA,QAAA,CAAS,MAAM,CAAA,CAAA,EAAI,SAAS,UAAU,CAAA,wBAAA;AAAA,OACnD;AACA,MAAO,OAAA,EAAE,MAAM,QAAS,CAAA,MAAA,EAAQ,MAAM,IAAM,EAAA,GAAA,EAAK,SAAS,UAAW,EAAA;AAAA;AAGvE,IAAA,MAAM,EAAE,IAAM,EAAA,IAAA,EAAM,KAAQ,GAAA,MAAM,SAAS,IAAK,EAAA;AAChD,IAAO,OAAA,EAAE,IAAM,EAAA,IAAA,EAAM,GAAI,EAAA;AAAA,WAClB,KAAO,EAAA;AACd,IAAA,IAAI,KAAiB,YAAA,KAAA,IAAS,KAAM,CAAA,IAAA,KAAS,YAAc,EAAA;AACzD,MAAA,OAAA,CAAQ,MAAM,iDAA6B,CAAA;AAC3C,MAAA,OAAO,EAAE,IAAM,EAAA,CAAA,CAAA,EAAI,IAAM,EAAA,IAAA,EAAM,KAAK,0BAAO,EAAA;AAAA;AAE7C,IAAQ,OAAA,CAAA,KAAA,CAAM,mDAA+B,KAAK,CAAA;AAClD,IAAO,OAAA;AAAA,MACL,IAAM,EAAA,CAAA,CAAA;AAAA,MACN,IAAM,EAAA,IAAA;AAAA,MACN,GAAK,EAAA,KAAA,YAAiB,KAAQ,GAAA,KAAA,CAAM,OAAU,GAAA;AAAA,KAChD;AAAA,GACA,SAAA;AACA,IAAA,YAAA,CAAa,SAAS,CAAA;AAAA;AAE1B;AArDsB,MAAA,CAAA,qBAAA,EAAA,uBAAA,CAAA;;;;;;;;;"}
1
+ {"version":3,"file":"yunzhiyan.js","sources":["../../../../../../../packages/components/tzj-player/src/yunzhiyan.ts"],"sourcesContent":["/**\n * 从cookie读取 authorized‑token,并解析出 accessToken\n */\nexport function parseAuthorizedTokenCookie(): string | null {\n // 1. 取出cookie字符串\n const match = document.cookie.match(/authorized-token=([^;]+)/);\n if (!match) return null;\n\n // 2. 先 decodeURIComponent 解码url编码\n const rawStr = decodeURIComponent(match[1]);\n try {\n // 3. 解析json对象\n const obj = JSON.parse(rawStr);\n return \"Bearer \" + obj.accessToken; // 拿到真正的token字符串\n } catch (e) {\n console.error(\"解析authorized‑token失败\", e);\n return null;\n }\n}\n\n/**\n * 根据设备ID获取视频播放地址\n * @param deviceId 设备ID\n * @returns Promise<{ code, data, msg }> code 为 200 时 data 即播放地址,失败时 code 为非 200\n */\nexport async function getVideoUrlByCamreaId(deviceId?: string) {\n // 边界处理:deviceId 为空时不再发出 /device/undefined/play-url 这类无效请求\n if (!deviceId) {\n console.warn(\n \"[tzj-player] getVideoUrlByCamreaId: deviceId 为空,已跳过请求\",\n );\n return { code: -1, data: null, msg: \"deviceId 不能为空\" };\n }\n\n // token 可能不存在或解析失败,不能把 null 直接塞进请求头\n const token = parseAuthorizedTokenCookie();\n const headers: Record<string, string> = {};\n if (token) {\n headers.authorization = token;\n } else {\n console.warn(\n \"[tzj-player] 未获取到 authorized-token,本次请求将不带鉴权头\",\n );\n }\n\n const controller = new AbortController();\n const timeoutId = setTimeout(() => controller.abort(), 10000); // 10秒超时\n\n try {\n const response = await fetch(\n `/production/assetDevice/device/${deviceId}/play-url`,\n { method: \"GET\", headers, signal: controller.signal },\n );\n\n // 网关异常时可能返回 HTML 或空 body,先校验状态码再解析,避免抛出晦涩的 JSON 解析错误\n if (!response.ok) {\n console.error(\n `HTTP错误: ${response.status} ${response.statusText} - getVideoUrlByCamreaId`,\n );\n return { code: response.status, data: null, msg: response.statusText };\n }\n\n const { code, data, msg } = await response.json();\n return { code, data, msg };\n } catch (error) {\n if (error instanceof Error && error.name === \"AbortError\") {\n console.error(\"请求超时: getVideoUrlByCamreaId\");\n return { code: -1, data: null, msg: \"请求超时\" };\n }\n console.error(\"请求失败: getVideoUrlByCamreaId\", error);\n return {\n code: -1,\n data: null,\n msg: error instanceof Error ? error.message : \"未知错误\",\n };\n } finally {\n clearTimeout(timeoutId);\n }\n}\n"],"names":[],"mappings":";;;;AAGO,SAAS,0BAA4C,GAAA;AAE1D,EAAA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W,MAAO;AAAA,KACtD;AAGA,IAAI,IAAA,CAAC,SAAS,EAAI,EAAA;AAChB,MAAQ,OAAA,CAAA,KAAA;AAAA,QACN,CAAW,kBAAA,EAAA,QAAA,CAAS,MAAM,CAAA,CAAA,EAAI,SAAS,UAAU,CAAA,wBAAA;AAAA,OACnD;AACA,MAAO,OAAA,EAAE,MAAM,QAAS,CAAA,MAAA,EAAQ,MAAM,IAAM,EAAA,GAAA,EAAK,SAAS,UAAW,EAAA;AAAA;AAGvE,IAAA,MAAM,EAAE,IAAM,EAAA,IAAA,EAAM,KAAQ,GAAA,MAAM,SAAS,IAAK,EAAA;AAChD,IAAO,OAAA,EAAE,IAAM,EAAA,IAAA,EAAM,GAAI,EAAA;AAAA,WAClB,KAAO,EAAA;AACd,IAAA,IAAI,KAAiB,YAAA,KAAA,IAAS,KAAM,CAAA,IAAA,KAAS,YAAc,EAAA;AACzD,MAAA,OAAA,CAAQ,MAAM,iDAA6B,CAAA;AAC3C,MAAA,OAAO,EAAE,IAAM,EAAA,CAAA,CAAA,EAAI,IAAM,EAAA,IAAA,EAAM,KAAK,0BAAO,EAAA;AAAA;AAE7C,IAAQ,OAAA,CAAA,KAAA,CAAM,mDAA+B,KAAK,CAAA;AAClD,IAAO,OAAA;AAAA,MACL,IAAM,EAAA,CAAA,CAAA;AAAA,MACN,IAAM,EAAA,IAAA;AAAA,MACN,GAAK,EAAA,KAAA,YAAiB,KAAQ,GAAA,KAAA,CAAM,OAAU,GAAA;AAAA,KAChD;AAAA,GACA,SAAA;AACA,IAAA,YAAA,CAAa,SAAS,CAAA;AAAA;AAE1B;AArDsB,MAAA,CAAA,qBAAA,EAAA,uBAAA,CAAA;;;;;"}
@@ -65,7 +65,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
65
65
  showBottomBar: import("vue").Ref<boolean, boolean>;
66
66
  playerRef: import("vue").ShallowRef<any, any>;
67
67
  isPlaying: import("vue").Ref<boolean, boolean>;
68
- isFullscreen: import("vue").Ref<boolean, boolean>;
69
68
  isVolumeMuted: import("vue").Ref<boolean, boolean>;
70
69
  audioMsg: import("vue").Ref<{
71
70
  type: string;
@@ -78,13 +77,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
78
77
  msg: string;
79
78
  }>;
80
79
  initPlayer: () => Promise<void>;
81
- playerPlay: () => void;
82
- playerPause: () => void;
83
- playerScreenShot: () => void;
84
- playerFullscreen: (fullscreen: boolean) => void;
85
80
  handleVideoInfo: () => void;
86
81
  handleMute: (mute: boolean) => void;
87
- handleSetMute: (volume: number) => void;
88
82
  EasyPlayer: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
89
83
  url: {
90
84
  type: StringConstructor;
@@ -13,20 +13,6 @@ var easyPlayer_vue_vue_type_script_setup_true_lang = require('./easyPlayer.vue2.
13
13
 
14
14
  var __defProp = Object.defineProperty;
15
15
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
16
- const _hoisted_1 = {
17
- key: 0,
18
- class: "i-easy-player-bar"
19
- };
20
- const _hoisted_2 = { class: "i-easy-player-bar-item i-easy-player-bar-left" };
21
- const _hoisted_3 = {
22
- key: 2,
23
- class: "i-easy-player-bottom-bar"
24
- };
25
- const _hoisted_4 = {
26
- key: 3,
27
- class: "i-easy-player-bottom-bar"
28
- };
29
- const _hoisted_5 = { class: "i-easy-player-bar-item i-easy-player-bar-right" };
30
16
  var _sfc_main = /* @__PURE__ */ vue.defineComponent({
31
17
  ...{
32
18
  name: "YunzhiyanPlayer"
@@ -40,7 +26,6 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
40
26
  const showBottomBar = vue.ref(false);
41
27
  const playerRef = vue.shallowRef();
42
28
  const isPlaying = vue.ref(false);
43
- const isFullscreen = vue.ref(false);
44
29
  const isVolumeMuted = vue.ref(true);
45
30
  const audioMsg = vue.ref({
46
31
  type: "",
@@ -70,23 +55,6 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
70
55
  errorMsg.value = `\u521D\u59CB\u5316\u5931\u8D25: ${error instanceof Error ? error.message : "\u672A\u77E5\u9519\u8BEF"}`;
71
56
  }
72
57
  }, "initPlayer");
73
- const playerPlay = /* @__PURE__ */ __name(() => {
74
- var _a;
75
- (_a = playerRef.value) == null ? void 0 : _a.play();
76
- }, "playerPlay");
77
- const playerPause = /* @__PURE__ */ __name(() => {
78
- var _a;
79
- (_a = playerRef.value) == null ? void 0 : _a.pause();
80
- }, "playerPause");
81
- const playerScreenShot = /* @__PURE__ */ __name(() => {
82
- var _a;
83
- (_a = playerRef.value) == null ? void 0 : _a.screenshot();
84
- }, "playerScreenShot");
85
- const playerFullscreen = /* @__PURE__ */ __name((fullscreen) => {
86
- var _a;
87
- isFullscreen.value = fullscreen;
88
- (_a = playerRef.value) == null ? void 0 : _a.fullscreen(fullscreen);
89
- }, "playerFullscreen");
90
58
  const handleVideoInfo = /* @__PURE__ */ __name(() => {
91
59
  var _a;
92
60
  isVolumeMuted.value = (_a = playerRef.value) == null ? void 0 : _a.isMute();
@@ -94,10 +62,6 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
94
62
  const handleMute = /* @__PURE__ */ __name((mute) => {
95
63
  isVolumeMuted.value = mute;
96
64
  }, "handleMute");
97
- const handleSetMute = /* @__PURE__ */ __name((volume) => {
98
- var _a;
99
- (_a = playerRef.value) == null ? void 0 : _a.setMute(volume);
100
- }, "handleSetMute");
101
65
  vue.onMounted(async () => {
102
66
  initPlayer();
103
67
  });
@@ -120,115 +84,13 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
120
84
  "device-serial": _ctx.deviceSerial,
121
85
  "area-name": _ctx.areaName,
122
86
  "pause-mode": _ctx.pauseMode,
123
- onMouseenter: _cache[4] || (_cache[4] = ($event) => showBottomBar.value = true),
124
- onMouseleave: _cache[5] || (_cache[5] = ($event) => showBottomBar.value = false),
125
- onPause: _cache[6] || (_cache[6] = ($event) => isPlaying.value = false),
126
- onPlay: _cache[7] || (_cache[7] = ($event) => isPlaying.value = true),
87
+ onMouseenter: _cache[0] || (_cache[0] = ($event) => showBottomBar.value = true),
88
+ onMouseleave: _cache[1] || (_cache[1] = ($event) => showBottomBar.value = false),
89
+ onPause: _cache[2] || (_cache[2] = ($event) => isPlaying.value = false),
90
+ onPlay: _cache[3] || (_cache[3] = ($event) => isPlaying.value = true),
127
91
  onVideoInfo: handleVideoInfo,
128
92
  onMute: handleMute
129
- }, {
130
- customBar: vue.withCtx(() => [
131
- showBottomBar.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
132
- vue.createCommentVNode(" \u5DE6\u4FA7\uFF1A\u64AD\u653E/\u6682\u505C "),
133
- vue.createElementVNode("div", _hoisted_2, [
134
- vue.createCommentVNode(" \u64AD\u653E "),
135
- !isPlaying.value ? (vue.openBlock(), vue.createElementBlock("div", {
136
- key: 0,
137
- class: "i-easy-player-bottom-bar",
138
- onClick: playerPlay
139
- }, _cache[8] || (_cache[8] = [
140
- vue.createElementVNode(
141
- "i",
142
- { class: "iconfont icon-playfill" },
143
- null,
144
- -1
145
- /* CACHED */
146
- )
147
- ]))) : (vue.openBlock(), vue.createElementBlock(
148
- vue.Fragment,
149
- { key: 1 },
150
- [
151
- vue.createCommentVNode(" \u6682\u505C "),
152
- vue.createElementVNode("div", {
153
- class: "i-easy-player-bottom-bar",
154
- onClick: playerPause
155
- }, _cache[9] || (_cache[9] = [
156
- vue.createElementVNode(
157
- "i",
158
- { class: "iconfont icon-stop" },
159
- null,
160
- -1
161
- /* CACHED */
162
- )
163
- ]))
164
- ],
165
- 2112
166
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
167
- )),
168
- !isVolumeMuted.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, [
169
- vue.createCommentVNode(" \u97F3\u91CF\u56FE\u6807 "),
170
- vue.createElementVNode("i", {
171
- class: "iconfont icon-notificationfill",
172
- onClick: _cache[0] || (_cache[0] = ($event) => handleSetMute(1))
173
- })
174
- ])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [
175
- vue.createCommentVNode(" \u9759\u97F3\u56FE\u6807 "),
176
- vue.createElementVNode("i", {
177
- class: "iconfont icon-notificationforbidfill",
178
- onClick: _cache[1] || (_cache[1] = ($event) => handleSetMute(0))
179
- })
180
- ]))
181
- ]),
182
- vue.createCommentVNode(" \u622A\u56FE,\u5168\u5C4F "),
183
- vue.createElementVNode("div", _hoisted_5, [
184
- vue.createCommentVNode(" \u622A\u56FE "),
185
- vue.createElementVNode("div", {
186
- class: "i-easy-player-bottom-bar",
187
- onClick: playerScreenShot
188
- }, _cache[10] || (_cache[10] = [
189
- vue.createElementVNode(
190
- "i",
191
- { class: "iconfont icon-picfill" },
192
- null,
193
- -1
194
- /* CACHED */
195
- )
196
- ])),
197
- vue.createCommentVNode(" \u5168\u5C4F "),
198
- !isFullscreen.value ? (vue.openBlock(), vue.createElementBlock("div", {
199
- key: 0,
200
- title: "\u5168\u5C4F",
201
- class: "i-easy-player-bottom-bar",
202
- onClick: _cache[2] || (_cache[2] = ($event) => playerFullscreen(true))
203
- }, _cache[11] || (_cache[11] = [
204
- vue.createElementVNode(
205
- "i",
206
- { class: "iconfont icon-full" },
207
- null,
208
- -1
209
- /* CACHED */
210
- )
211
- ]))) : vue.createCommentVNode("v-if", true),
212
- vue.createCommentVNode(" \u53D6\u6D88\u5168\u5C4F "),
213
- isFullscreen.value ? (vue.openBlock(), vue.createElementBlock("div", {
214
- key: 1,
215
- class: "i-easy-player-bottom-bar",
216
- onClick: _cache[3] || (_cache[3] = ($event) => playerFullscreen(false))
217
- }, _cache[12] || (_cache[12] = [
218
- vue.createElementVNode(
219
- "i",
220
- { class: "iconfont icon-reduction" },
221
- null,
222
- -1
223
- /* CACHED */
224
- )
225
- ]))) : vue.createCommentVNode("v-if", true)
226
- ])
227
- ])) : vue.createCommentVNode("v-if", true)
228
- ]),
229
- _: 1
230
- /* STABLE */
231
- }, 8, ["url", "debug", "access-token", "platform-type-name", "device-serial", "area-name", "pause-mode"])) : vue.createCommentVNode("v-if", true),
93
+ }, null, 8, ["url", "debug", "access-token", "platform-type-name", "device-serial", "area-name", "pause-mode"])) : vue.createCommentVNode("v-if", true),
232
94
  vue.createCommentVNode(" \u8BED\u97F3\u5BF9\u8BB2\u9519\u8BEF\u63D0\u793A "),
233
95
  audioMsg.value.msg ? (vue.openBlock(), vue.createElementBlock(
234
96
  "div",
@@ -1 +1 @@
1
- {"version":3,"file":"yunzhiyanPlayer.vue2.js","sources":["../../../../../../../packages/components/tzj-player/src/yunzhiyanPlayer.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { onMounted, ref, shallowRef } from \"vue\";\nimport { ElMessage } from \"element-plus\";\nimport EasyPlayer from \"./easyPlayer.vue\";\nimport ErrorPage from \"./errorPage.vue\";\nimport { TzjPlayerProps } from \"./tzj-player\";\nimport { getVideoUrlByCamreaId } from \"./yunzhiyan\";\n\ndefineOptions({\n name: \"YunzhiyanPlayer\",\n});\n\nconst props = defineProps(TzjPlayerProps);\nconst videoUrl = ref(\"\");\nconst errorMsg = ref(\"\");\nconst showBottomBar = ref(false);\n\n// 播放器相关状态\nconst playerRef = shallowRef();\nconst isPlaying = ref(false); // 是否播放,播放true,暂停false\nconst isFullscreen = ref(false);\nconst isVolumeMuted = ref(true);\n\nconst audioMsg = ref({\n type: \"\",\n msg: \"\",\n}); // 语音对讲提示信息\n\n/**\n * 初始化云智眼播放器\n * 获取设备通道ID和视频播放地址\n */\nconst initPlayer = async (): Promise<void> => {\n try {\n if (!props.deviceSerial) {\n errorMsg.value = \"设备序列号不能为空\";\n return;\n }\n\n const { code, data, msg } = await getVideoUrlByCamreaId(props.deviceSerial);\n\n if (props.debug) {\n console.log(\"获取云智眼设备视频播放地址\", data);\n }\n\n if (code !== 200) {\n errorMsg.value = \"获取视频播放地址失败\";\n ElMessage.error(msg || \"数据获取失败!\");\n return;\n }\n\n videoUrl.value = data;\n errorMsg.value = \"\"; // 清除错误信息\n } catch (error) {\n if (props.debug) {\n console.error(\"初始化云智眼播放器失败:\", error);\n }\n errorMsg.value = `初始化失败: ${error instanceof Error ? error.message : \"未知错误\"}`;\n }\n};\n\n/**\n * 播放视频\n */\nconst playerPlay = (): void => {\n playerRef.value?.play();\n};\n\n/**\n * 暂停视频\n */\nconst playerPause = (): void => {\n playerRef.value?.pause();\n};\n\n/**\n * 截图\n */\nconst playerScreenShot = (): void => {\n playerRef.value?.screenshot();\n};\n\n/**\n * 切换全屏状态\n * @param fullscreen 是否全屏\n */\nconst playerFullscreen = (fullscreen: boolean): void => {\n isFullscreen.value = fullscreen;\n playerRef.value?.fullscreen(fullscreen);\n};\n\n// 获取视频信息,判断当前是否为静音状态\nconst handleVideoInfo = () => {\n // 判断是否静音\n isVolumeMuted.value = playerRef.value?.isMute();\n};\nconst handleMute = (mute: boolean) => {\n isVolumeMuted.value = mute;\n};\nconst handleSetMute = (volume: number) => {\n playerRef.value?.setMute(volume);\n};\n\nonMounted(async () => {\n initPlayer();\n});\n</script>\n\n<template>\n <ErrorPage v-if=\"errorMsg\" :message=\"errorMsg\" />\n <EasyPlayer\n v-else-if=\"videoUrl\"\n ref=\"playerRef\"\n :url=\"videoUrl\"\n :debug=\"debug\"\n :access-token=\"accessToken\"\n :platform-type-name=\"platformTypeName\"\n :device-serial=\"deviceSerial\"\n :area-name=\"areaName\"\n :pause-mode=\"pauseMode\"\n @mouseenter=\"showBottomBar = true\"\n @mouseleave=\"showBottomBar = false\"\n @pause=\"isPlaying = false\"\n @play=\"isPlaying = true\"\n @video-info=\"handleVideoInfo\"\n @mute=\"handleMute\"\n >\n <template #customBar>\n <div v-if=\"showBottomBar\" class=\"i-easy-player-bar\">\n <!-- 左侧:播放/暂停 -->\n <div class=\"i-easy-player-bar-item i-easy-player-bar-left\">\n <!-- 播放 -->\n <div\n v-if=\"!isPlaying\"\n class=\"i-easy-player-bottom-bar\"\n @click=\"playerPlay\"\n >\n <i class=\"iconfont icon-playfill\" />\n </div>\n <!-- 暂停 -->\n <div v-else class=\"i-easy-player-bottom-bar\" @click=\"playerPause\">\n <i class=\"iconfont icon-stop\" />\n </div>\n\n <div v-if=\"!isVolumeMuted\" class=\"i-easy-player-bottom-bar\">\n <!-- 音量图标 -->\n <i\n class=\"iconfont icon-notificationfill\"\n @click=\"handleSetMute(1)\"\n />\n </div>\n <div v-else class=\"i-easy-player-bottom-bar\">\n <!-- 静音图标 -->\n <i\n class=\"iconfont icon-notificationforbidfill\"\n @click=\"handleSetMute(0)\"\n />\n </div>\n </div>\n <!-- 截图,全屏 -->\n <div class=\"i-easy-player-bar-item i-easy-player-bar-right\">\n <!-- 截图 -->\n <div class=\"i-easy-player-bottom-bar\" @click=\"playerScreenShot\">\n <i class=\"iconfont icon-picfill\" />\n </div>\n <!-- 全屏 -->\n <div\n v-if=\"!isFullscreen\"\n title=\"全屏\"\n class=\"i-easy-player-bottom-bar\"\n @click=\"playerFullscreen(true)\"\n >\n <i class=\"iconfont icon-full\" />\n </div>\n <!-- 取消全屏 -->\n <div\n v-if=\"isFullscreen\"\n class=\"i-easy-player-bottom-bar\"\n @click=\"playerFullscreen(false)\"\n >\n <i class=\"iconfont icon-reduction\" />\n </div>\n </div>\n </div>\n </template>\n </EasyPlayer>\n\n <!-- 语音对讲错误提示 -->\n <div\n v-if=\"audioMsg.msg\"\n class=\"i-tzj-player__voice-default\"\n :class=\"`i-tzj-player__voice-${audioMsg.type}`\"\n >\n {{ audioMsg.msg }}\n </div>\n</template>\n"],"names":["ref","shallowRef","getVideoUrlByCamreaId","ElMessage","onMounted","_createBlock","ErrorPage","EasyPlayer","debug","accessToken","platformTypeName","deviceSerial","areaName","pauseMode","_openBlock","_createElementBlock","_createCommentVNode","_createElementVNode","_Fragment","_normalizeClass","_toDisplayString"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,IAAA,MAAM,KAAQ,GAAA,OAAA;AACd,IAAM,MAAA,QAAA,GAAWA,QAAI,EAAE,CAAA;AACvB,IAAM,MAAA,QAAA,GA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zhiyanPlayer.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { onMounted, ref, shallowRef } from \"vue\";\nimport { ElMessage } from \"element-plus\";\nimport EasyPlayer from \"./easyPlayer.vue\";\nimport ErrorPage from \"./errorPage.vue\";\nimport { TzjPlayerProps } from \"./tzj-player\";\nimport { getVideoUrlByCamreaId } from \"./yunzhiyan\";\n\ndefineOptions({\n name: \"YunzhiyanPlayer\",\n});\n\nconst props = defineProps(TzjPlayerProps);\nconst videoUrl = ref(\"\");\nconst errorMsg = ref(\"\");\nconst showBottomBar = ref(false);\n\n// 播放器相关状态\nconst playerRef = shallowRef();\nconst isPlaying = ref(false); // 是否播放,播放true,暂停false\nconst isVolumeMuted = ref(true);\n\nconst audioMsg = ref({\n type: \"\",\n msg: \"\",\n}); // 语音对讲提示信息\n\n/**\n * 初始化云智眼播放器\n * 获取设备通道ID和视频播放地址\n */\nconst initPlayer = async (): Promise<void> => {\n try {\n if (!props.deviceSerial) {\n errorMsg.value = \"设备序列号不能为空\";\n return;\n }\n\n const { code, data, msg } = await getVideoUrlByCamreaId(props.deviceSerial);\n\n if (props.debug) {\n console.log(\"获取云智眼设备视频播放地址\", data);\n }\n\n if (code !== 200) {\n errorMsg.value = \"获取视频播放地址失败\";\n ElMessage.error(msg || \"数据获取失败!\");\n return;\n }\n\n videoUrl.value = data;\n errorMsg.value = \"\"; // 清除错误信息\n } catch (error) {\n if (props.debug) {\n console.error(\"初始化云智眼播放器失败:\", error);\n }\n errorMsg.value = `初始化失败: ${error instanceof Error ? error.message : \"未知错误\"}`;\n }\n};\n\n// 获取视频信息,判断当前是否为静音状态\nconst handleVideoInfo = () => {\n // 判断是否静音\n isVolumeMuted.value = playerRef.value?.isMute();\n};\nconst handleMute = (mute: boolean) => {\n isVolumeMuted.value = mute;\n};\n\nonMounted(async () => {\n initPlayer();\n});\n</script>\n\n<template>\n <ErrorPage v-if=\"errorMsg\" :message=\"errorMsg\" />\n <EasyPlayer\n v-else-if=\"videoUrl\"\n ref=\"playerRef\"\n :url=\"videoUrl\"\n :debug=\"debug\"\n :access-token=\"accessToken\"\n :platform-type-name=\"platformTypeName\"\n :device-serial=\"deviceSerial\"\n :area-name=\"areaName\"\n :pause-mode=\"pauseMode\"\n @mouseenter=\"showBottomBar = true\"\n @mouseleave=\"showBottomBar = false\"\n @pause=\"isPlaying = false\"\n @play=\"isPlaying = true\"\n @video-info=\"handleVideoInfo\"\n @mute=\"handleMute\"\n >\n </EasyPlayer>\n\n <!-- 语音对讲错误提示 -->\n <div\n v-if=\"audioMsg.msg\"\n class=\"i-tzj-player__voice-default\"\n :class=\"`i-tzj-player__voice-${audioMsg.type}`\"\n >\n {{ audioMsg.msg }}\n </div>\n</template>\n"],"names":["ref","shallowRef","getVideoUrlByCamreaId","ElMessage","onMounted","_createBlock","ErrorPage","EasyPlayer","debug","accessToken","platformTypeName","deviceSerial","areaName","pauseMode","_createCommentVNode","_createElementBlock","_normalizeClass","_toDisplayString"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAYA,IAAA,MAAM,KAAQ,GAAA,OAAA;AACd,IAAM,MAAA,QAAA,GAAWA,QAAI,EAAE,CAAA;AACvB,IAAM,MAAA,QAAA,GAAWA,QAAI,EAAE,CAAA;AACvB,IAAM,MAAA,aAAA,GAAgBA,QAAI,KAAK,CAAA;AAG/B,IAAA,MAAM,YAAYC,cAAW,EAAA;AAC7B,IAAM,MAAA,SAAA,GAAYD,QAAI,KAAK,CAAA;AAC3B,IAAM,MAAA,aAAA,GAAgBA,QAAI,IAAI,CAAA;AAE9B,IAAA,MAAM,WAAWA,OAAI,CAAA;AAAA,MACnB,IAAM,EAAA,EAAA;AAAA,MACN,GAAK,EAAA;AAAA,KACN,CAAA;AAMD,IAAA,MAAM,6BAAwC,MAAA,CAAA,YAAA;AAC5C,MAAI,IAAA;AACF,QAAI,IAAA,CAAC,MAAM,YAAc,EAAA;AACvB,UAAA,QAAA,CAAS,KAAQ,GAAA,wDAAA;AACjB,UAAA;AAAA;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AAA,QAAA,CAAQ,wBADrB,EAAAD,eAAA,CAiBaE,sDAAA,EAAA;AAAA;mBAfP,EAAA,WAAA;AAAA,YAAJ,GAAI,EAAA,SAAA;AAAA,YACH,KAAK,QAAQ,CAAA,KAAA;AAAA,YACb,OAAOC,IAAK,CAAA,KAAA;AAAA,YACZ,gBAAcC,IAAW,CAAA,WAAA;AAAA,YACzB,sBAAoBC,IAAgB,CAAA,gBAAA;AAAA,YACpC,iBAAeC,IAAY,CAAA,YAAA;AAAA,YAC3B,aAAWC,IAAQ,CAAA,QAAA;AAAA,YACnB,cAAYC,IAAS,CAAA,SAAA;AAAA,YACrB,YAAA,mCAAY,KAAA,aAAA,CAAa,KAAA,GAAA,IAAA,CAAA;AAAA,YACzB,YAAA,mCAAY,KAAA,aAAA,CAAa,KAAA,GAAA,KAAA,CAAA;AAAA,YACzB,OAAA,mCAAO,KAAA,SAAA,CAAS,KAAA,GAAA,KAAA,CAAA;AAAA,YAChB,MAAA,mCAAM,KAAA,SAAA,CAAS,KAAA,GAAA,IAAA,CAAA;AAAA,YACf,WAAY,EAAA,eAAA;AAAA,YACZ,MAAM,EAAA;AAAA;UAITC,uBAAiB,oDAAA,CAAA;AAAA,UAET,QAAA,CAAA,KAAA,CAAS,sBADjB,EAAAC,sBAAA;AAAA,YAMM,KAAA;AAAA,YAAA;AAAA;cAJJ,KAAA,EAAMC,mBAAA,CAAA,6BAAA,EACyB,uBAAA,QAAA,CAAA,KAAA,CAAS,IAAI,CAAA,CAAA,CAAA;AAAA,aAEzC;AAAA,YAAAC,mBAAA,CAAA,QAAA,CAAA,KAAA,CAAS,GAAG,CAAA;AAAA,YAAA;AAAA;AAAA,WAAA;;;;;;;;;;;"}
package/lib/index.js CHANGED
@@ -80,12 +80,8 @@ exports.TenantEnterpriseProps = tenantEnterprise.TenantEnterpriseProps;
80
80
  exports.ITenantEnterprise = index$k.ITenantEnterprise;
81
81
  exports.ITextButton = index$l.ITextButton;
82
82
  exports.ITextButtonGroup = index$l.ITextButtonGroup;
83
- exports.ApiEnroll = yunzhiyan.ApiEnroll;
84
- exports.GetYunZhiYanDeviceChannel = yunzhiyan.GetYunZhiYanDeviceChannel;
85
- exports.GetYunZhiYanDeviceVideoUrl = yunzhiyan.GetYunZhiYanDeviceVideoUrl;
86
83
  exports.getVideoUrlByCamreaId = yunzhiyan.getVideoUrlByCamreaId;
87
84
  exports.parseAuthorizedTokenCookie = yunzhiyan.parseAuthorizedTokenCookie;
88
- exports.sign = yunzhiyan.sign;
89
85
  exports.ITzjPlayer = index$m.ITzjPlayer;
90
86
  exports.GeoMarkProps = geoMark.GeoMarkProps;
91
87
  exports.IGeoMark = index$n.IGeoMark;
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yimou6/common-ui",
3
- "version": "1.14.1",
3
+ "version": "1.14.3",
4
4
  "description": "Vue3 Component Library",
5
5
  "author": "yimou6",
6
6
  "license": "MIT",
@@ -1 +1 @@
1
- .i-tzj-player{display:flex;position:relative;flex-direction:column;align-items:center;justify-content:flex-start;width:100%;height:100%;overflow:hidden;background-color:#000;color:#fff;font-size:14px}.i-tzj-player .i-tzj-player-content{width:100%;height:100%;background-color:#000}.i-tzj-player__header{display:flex;align-items:center;justify-content:flex-start;width:100%;height:32px;flex-shrink:0;background-color:rgba(43,51,63,.7);color:#fff;font-size:12px}.i-tzj-player__header .iconfont{margin-right:4px;margin-left:10px;font-size:12px}.i-tzj-player .i-tzj-easyPlayer,.i-tzj-player .i-tzj-xgplayer,.i-tzj-player .i-tzj-ysplayer{display:flex;position:relative;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;overflow:hidden}.i-tzj-player .i-tzj-xgplayer{width:100%;height:100%;display:flex;flex-direction:column}.i-tzj-player .i-tzj-xgplayer__top{padding:8px 12px;background:rgba(0,0,0,.7);color:#fff;font-size:14px;display:flex;align-items:center}.i-tzj-player .i-tzj-xgplayer__browser-tip{flex:1;display:flex;align-items:center;justify-content:center;background:#000;color:#fff}.i-tzj-player .i-tzj-xgplayer__browser-tip .browser-tip-content{background:rgba(255,152,0,.1);border:1px solid #ff9800;border-radius:4px;padding:20px;text-align:center;max-width:80%;display:flex;align-items:center;font-size:14px}.i-tzj-player__error{display:flex;flex-direction:column;z-index:999;width:100%;flex:1;height:0;background-color:#000;color:#efefef;font-size:12px}.i-tzj-player__error_content{flex:1;height:0;display:flex;align-items:center;justify-content:center}.i-tzj-player .i-tzj-easyPlayer__top,.i-tzj-player .i-tzj-xgplayer__top{display:flex;align-items:center;justify-content:flex-start;width:100%;height:32px;background-color:rgba(43,51,63,.7);color:#fff;font-size:12px}.i-tzj-player .i-tzj-easyPlayer__top .iconfont,.i-tzj-player .i-tzj-xgplayer__top .iconfont{margin-right:4px;margin-left:10px;font-size:12px}.i-tzj-player .i-tzj-easyPlayer--custom .easyplayer-controls{display:none}.i-tzj-player .i-easy-player-bar{display:flex;position:absolute;z-index:10;bottom:0;left:0;align-items:center;justify-content:space-between;width:100%;height:40px;background-color:rgba(43,51,63,.7);-webkit-user-select:none;user-select:none}.i-tzj-player .i-easy-player-bar-item{display:inline-flex;align-items:center;justify-content:flex-start;height:100%}.i-tzj-player .i-easy-player-bar-item .i-easy-player-bottom-bar{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;cursor:pointer}.i-tzj-player .i-easy-player-bar-item .i-easy-player-bottom-bar .iconfont{color:#c7c9ce;font-size:20px}.i-tzj-player .i-easy-player-bar-item .i-easy-player-bottom-bar:hover .iconfont{color:#fff}.i-tzj-player .i-easy-player-bar-item .i-easy-player-bottom-bar+.i-easy-player-bottom-bar{margin-left:4px}.i-tzj-player__voice-default{display:flex;position:absolute;z-index:10;top:6px;right:6px;align-items:center;justify-content:center;height:28px;padding:0 10px;border-radius:14px;color:#fff;font-size:12px;text-align:center}.i-tzj-player__voice-success{background-color:#67c23a}.i-tzj-player__voice-info{background-color:#909399}.i-tzj-player__voice-error{background-color:#f56c6c}
1
+ .i-tzj-player{display:flex;position:relative;flex-direction:column;align-items:center;justify-content:flex-start;width:100%;height:100%;overflow:hidden;background-color:#000;color:#fff;font-size:14px}.i-tzj-player .i-tzj-player-content{width:100%;height:100%;background-color:#000}.i-tzj-player__header{display:flex;align-items:center;justify-content:flex-start;width:100%;height:32px;flex-shrink:0;background-color:rgba(43,51,63,.7);color:#fff;font-size:12px}.i-tzj-player__header .iconfont{margin-right:4px;margin-left:10px;font-size:12px}.i-tzj-player .i-tzj-easyPlayer,.i-tzj-player .i-tzj-xgplayer,.i-tzj-player .i-tzj-ysplayer{display:flex;position:relative;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;overflow:hidden}.i-tzj-player .i-tzj-xgplayer{width:100%;height:100%;display:flex;flex-direction:column}.i-tzj-player .i-tzj-xgplayer__top{padding:8px 12px;background:rgba(0,0,0,.7);color:#fff;font-size:14px;display:flex;align-items:center}.i-tzj-player .i-tzj-xgplayer__browser-tip{flex:1;display:flex;align-items:center;justify-content:center;background:#000;color:#fff}.i-tzj-player .i-tzj-xgplayer__browser-tip .browser-tip-content{background:rgba(255,152,0,.1);border:1px solid #ff9800;border-radius:4px;padding:20px;text-align:center;max-width:80%;display:flex;align-items:center;font-size:14px}.i-tzj-player__error{display:flex;flex-direction:column;z-index:999;width:100%;flex:1;height:0;background-color:#000;color:#efefef;font-size:12px}.i-tzj-player__error_content{flex:1;height:0;display:flex;align-items:center;justify-content:center}.i-tzj-player .i-tzj-easyPlayer__top,.i-tzj-player .i-tzj-xgplayer__top{display:flex;align-items:center;justify-content:flex-start;width:100%;height:32px;background-color:rgba(43,51,63,.7);color:#fff;font-size:12px}.i-tzj-player .i-tzj-easyPlayer__top .iconfont,.i-tzj-player .i-tzj-xgplayer__top .iconfont{margin-right:4px;margin-left:10px;font-size:12px}.i-tzj-player .i-tzj-easyPlayer--custom .easyplayer-controls{display:none}.i-tzj-player .i-easy-player-bar{display:flex;position:absolute;z-index:10;bottom:0;left:0;align-items:center;justify-content:space-between;width:100%;height:40px;background-color:rgba(43,51,63,.7);-webkit-user-select:none;user-select:none}.i-tzj-player .i-easy-player-bar-item{display:inline-flex;align-items:center;justify-content:flex-start;height:100%}.i-tzj-player .i-easy-player-bar-item .i-easy-player-bottom-bar{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;cursor:pointer}.i-tzj-player .i-easy-player-bar-item .i-easy-player-bottom-bar .iconfont{color:#c7c9ce;font-size:20px}.i-tzj-player .i-easy-player-bar-item .i-easy-player-bottom-bar:hover .iconfont{color:#fff}.i-tzj-player .i-easy-player-bar-item .i-easy-player-bottom-bar+.i-easy-player-bottom-bar{margin-left:4px}.i-tzj-player .easyplayer-container .easyplayer-speed{display:none!important}.i-tzj-player__voice-default{display:flex;position:absolute;z-index:10;top:6px;right:6px;align-items:center;justify-content:center;height:28px;padding:0 10px;border-radius:14px;color:#fff;font-size:12px;text-align:center}.i-tzj-player__voice-success{background-color:#67c23a}.i-tzj-player__voice-info{background-color:#909399}.i-tzj-player__voice-error{background-color:#f56c6c}