@video-supply/dahua-player 0.1.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.
Files changed (119) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/LICENSE +1 -0
  3. package/README.md +192 -0
  4. package/README.zh-CN.md +202 -0
  5. package/dist/bin/copy-assets.cjs +51 -0
  6. package/dist/bin/copy-assets.cjs.map +1 -0
  7. package/dist/index.cjs +1447 -0
  8. package/dist/index.cjs.map +1 -0
  9. package/dist/index.d.cts +157 -0
  10. package/dist/index.d.ts +157 -0
  11. package/dist/index.js +1418 -0
  12. package/dist/index.js.map +1 -0
  13. package/package.json +55 -0
  14. package/wsplayer-gov/Version.xml +4 -0
  15. package/wsplayer-gov/WSPlayer/PlaySDKInterface.js +1 -0
  16. package/wsplayer-gov/WSPlayer/WSPlayer.js +1 -0
  17. package/wsplayer-gov/WSPlayer/audioTalkWorker.js +1 -0
  18. package/wsplayer-gov/WSPlayer/commonThread/libH264Enc.js +21 -0
  19. package/wsplayer-gov/WSPlayer/commonThread/libH264Enc.wasm +0 -0
  20. package/wsplayer-gov/WSPlayer/commonThread/libIVSDrawer.js +21 -0
  21. package/wsplayer-gov/WSPlayer/commonThread/libIVSDrawer.wasm +0 -0
  22. package/wsplayer-gov/WSPlayer/commonThread/libRenderEngine.js +21 -0
  23. package/wsplayer-gov/WSPlayer/commonThread/libRenderEngine.wasm +0 -0
  24. package/wsplayer-gov/WSPlayer/commonThread/libmavasp_litepacket.data +50 -0
  25. package/wsplayer-gov/WSPlayer/commonThread/libmavasp_litepacket.js +21 -0
  26. package/wsplayer-gov/WSPlayer/commonThread/libmavasp_litepacket.wasm +0 -0
  27. package/wsplayer-gov/WSPlayer/icon/RecordHover.svg +13 -0
  28. package/wsplayer-gov/WSPlayer/icon/RecordNormal.svg +13 -0
  29. package/wsplayer-gov/WSPlayer/icon/Recording.svg +15 -0
  30. package/wsplayer-gov/WSPlayer/icon/arrow-b.svg +9 -0
  31. package/wsplayer-gov/WSPlayer/icon/arrow-l.svg +9 -0
  32. package/wsplayer-gov/WSPlayer/icon/arrow-lb.svg +10 -0
  33. package/wsplayer-gov/WSPlayer/icon/arrow-lt.svg +10 -0
  34. package/wsplayer-gov/WSPlayer/icon/arrow-r.svg +9 -0
  35. package/wsplayer-gov/WSPlayer/icon/arrow-rb.svg +10 -0
  36. package/wsplayer-gov/WSPlayer/icon/arrow-rt.svg +10 -0
  37. package/wsplayer-gov/WSPlayer/icon/arrow-t.svg +9 -0
  38. package/wsplayer-gov/WSPlayer/icon/close-all-hover.svg +18 -0
  39. package/wsplayer-gov/WSPlayer/icon/close-all.svg +18 -0
  40. package/wsplayer-gov/WSPlayer/icon/close.svg +16 -0
  41. package/wsplayer-gov/WSPlayer/icon/close_hover.svg +16 -0
  42. package/wsplayer-gov/WSPlayer/icon/default.png +0 -0
  43. package/wsplayer-gov/WSPlayer/icon/draw-triangle_off.svg +14 -0
  44. package/wsplayer-gov/WSPlayer/icon/draw-triangle_off_hover.svg +14 -0
  45. package/wsplayer-gov/WSPlayer/icon/draw-triangle_on.svg +15 -0
  46. package/wsplayer-gov/WSPlayer/icon/draw-triangle_on_hover.svg +15 -0
  47. package/wsplayer-gov/WSPlayer/icon/fullscreen-hover.svg +13 -0
  48. package/wsplayer-gov/WSPlayer/icon/fullscreen.svg +13 -0
  49. package/wsplayer-gov/WSPlayer/icon/more.svg +13 -0
  50. package/wsplayer-gov/WSPlayer/icon/play-h.png +0 -0
  51. package/wsplayer-gov/WSPlayer/icon/play-n.png +0 -0
  52. package/wsplayer-gov/WSPlayer/icon/play-p.png +0 -0
  53. package/wsplayer-gov/WSPlayer/icon/ptz-icon1.svg +4 -0
  54. package/wsplayer-gov/WSPlayer/icon/ptz-icon2.svg +13 -0
  55. package/wsplayer-gov/WSPlayer/icon/ptz-icon3.svg +10 -0
  56. package/wsplayer-gov/WSPlayer/icon/ptz-icon4.svg +10 -0
  57. package/wsplayer-gov/WSPlayer/icon/ptz-icon5.svg +12 -0
  58. package/wsplayer-gov/WSPlayer/icon/ptz-icon6.svg +14 -0
  59. package/wsplayer-gov/WSPlayer/icon/ptz-select-hover.svg +3 -0
  60. package/wsplayer-gov/WSPlayer/icon/ptz-select.svg +3 -0
  61. package/wsplayer-gov/WSPlayer/icon/record_pause.svg +5 -0
  62. package/wsplayer-gov/WSPlayer/icon/record_play.svg +5 -0
  63. package/wsplayer-gov/WSPlayer/icon/screen_1.svg +11 -0
  64. package/wsplayer-gov/WSPlayer/icon/screen_16.svg +18 -0
  65. package/wsplayer-gov/WSPlayer/icon/screen_16_hover.svg +18 -0
  66. package/wsplayer-gov/WSPlayer/icon/screen_1_hover.svg +11 -0
  67. package/wsplayer-gov/WSPlayer/icon/screen_2.svg +18 -0
  68. package/wsplayer-gov/WSPlayer/icon/screen_25.svg +19 -0
  69. package/wsplayer-gov/WSPlayer/icon/screen_25_hover.svg +19 -0
  70. package/wsplayer-gov/WSPlayer/icon/screen_2_hover.svg +18 -0
  71. package/wsplayer-gov/WSPlayer/icon/screen_3.svg +13 -0
  72. package/wsplayer-gov/WSPlayer/icon/screen_3_hover.svg +13 -0
  73. package/wsplayer-gov/WSPlayer/icon/screen_4.svg +12 -0
  74. package/wsplayer-gov/WSPlayer/icon/screen_4_hover.svg +12 -0
  75. package/wsplayer-gov/WSPlayer/icon/screen_6.svg +16 -0
  76. package/wsplayer-gov/WSPlayer/icon/screen_6_hover.svg +16 -0
  77. package/wsplayer-gov/WSPlayer/icon/screen_8.svg +18 -0
  78. package/wsplayer-gov/WSPlayer/icon/screen_8_hover.svg +18 -0
  79. package/wsplayer-gov/WSPlayer/icon/screen_9.svg +17 -0
  80. package/wsplayer-gov/WSPlayer/icon/screen_9_hover.svg +17 -0
  81. package/wsplayer-gov/WSPlayer/icon/screen_custom_division.svg +9 -0
  82. package/wsplayer-gov/WSPlayer/icon/screen_custom_division_hover.svg +9 -0
  83. package/wsplayer-gov/WSPlayer/icon/screen_custom_division_merge.svg +3 -0
  84. package/wsplayer-gov/WSPlayer/icon/screen_custom_division_split.svg +6 -0
  85. package/wsplayer-gov/WSPlayer/icon/screen_more.svg +15 -0
  86. package/wsplayer-gov/WSPlayer/icon/snapshot.svg +38 -0
  87. package/wsplayer-gov/WSPlayer/icon/snapshot_hover.svg +38 -0
  88. package/wsplayer-gov/WSPlayer/icon/speed_left.svg +15 -0
  89. package/wsplayer-gov/WSPlayer/icon/speed_right.svg +15 -0
  90. package/wsplayer-gov/WSPlayer/icon/spread.png +0 -0
  91. package/wsplayer-gov/WSPlayer/icon/talk-off-hover.svg +11 -0
  92. package/wsplayer-gov/WSPlayer/icon/talk-off.svg +11 -0
  93. package/wsplayer-gov/WSPlayer/icon/talk-on.svg +9 -0
  94. package/wsplayer-gov/WSPlayer/icon/voice-have.svg +43 -0
  95. package/wsplayer-gov/WSPlayer/icon/voice-have_hover.svg +43 -0
  96. package/wsplayer-gov/WSPlayer/icon/voice-null.svg +38 -0
  97. package/wsplayer-gov/WSPlayer/icon/voice-null_hover.svg +38 -0
  98. package/wsplayer-gov/WSPlayer/icon/ws-ctrl-ellipsis-hover.svg +14 -0
  99. package/wsplayer-gov/WSPlayer/icon/ws-ctrl-ellipsis.svg +14 -0
  100. package/wsplayer-gov/WSPlayer/locale/lang/en_US.js +123 -0
  101. package/wsplayer-gov/WSPlayer/locale/lang/zh_CN.js +124 -0
  102. package/wsplayer-gov/WSPlayer/locale/localProvider.js +7 -0
  103. package/wsplayer-gov/WSPlayer/locale/locale.js +34 -0
  104. package/wsplayer-gov/WSPlayer/multiThread/libStreamClient.js +21 -0
  105. package/wsplayer-gov/WSPlayer/multiThread/libStreamClient.wasm +0 -0
  106. package/wsplayer-gov/WSPlayer/multiThread/libStreamClient.worker.js +1 -0
  107. package/wsplayer-gov/WSPlayer/multiThread/libplay.data +0 -0
  108. package/wsplayer-gov/WSPlayer/multiThread/libplay.js +1 -0
  109. package/wsplayer-gov/WSPlayer/multiThread/libplay.wasm +0 -0
  110. package/wsplayer-gov/WSPlayer/multiThread/libplay.worker.js +1 -0
  111. package/wsplayer-gov/WSPlayer/player.css +1098 -0
  112. package/wsplayer-gov/WSPlayer/singleThread/VideoDecodeWorker.js +1245 -0
  113. package/wsplayer-gov/WSPlayer/singleThread/libStreamClient.js +21 -0
  114. package/wsplayer-gov/WSPlayer/singleThread/libStreamClient.wasm +0 -0
  115. package/wsplayer-gov/WSPlayer/singleThread/libplay.data +0 -0
  116. package/wsplayer-gov/WSPlayer/singleThread/libplay.js +1 -0
  117. package/wsplayer-gov/WSPlayer/singleThread/libplay.wasm +0 -0
  118. package/wsplayer-gov/WSPlayer/window.division.css +80 -0
  119. package/wsplayer-gov/wsplayer.min.js +6 -0
@@ -0,0 +1,124 @@
1
+ export default{
2
+ "common.close": "关闭",
3
+ "common.ok": "确定",
4
+ "common.cancel": "取消",
5
+ "common.reset": "重置",
6
+ "storagePlan.stream.main": "主码流",
7
+ "video.player.sub.stream": "辅码流{0}",
8
+ "video.player.ptz.down": "下",
9
+ "video.player.ptz.left": "左",
10
+ "video.player.ptz.lower.left": "左下",
11
+ "video.player.ptz.lower.right": "右下",
12
+ "video.player.ptz.right": "右",
13
+ "video.player.ptz.up": "上",
14
+ "video.player.ptz.upper.left": "左上",
15
+ "video.player.ptz.upper.right": "右上",
16
+ "inspec.ptz.position1": "三维定位",
17
+ "video.player.ptz.zoom": "变倍",
18
+ "video.player.ptz.focus": "聚焦",
19
+ "video.player.ptz.halo": "光圈",
20
+
21
+ "wsPlayer.proxy": "代理模式, 此模式不做自动处理",
22
+ "wsPlayer.recording": "录像",
23
+ "wsplayer.more": "更多",
24
+ "wsPlayer.request.realtime.preview.interface": "请求实时预览接口",
25
+ "wsPlayer.request.realtime.preview.interface.error.tip": "在传入的 {0} 方法上,resolve 返回的值应该为一个icc返回的标准对象",
26
+ "wsPlayer.request.recording.interface": "请求录像接口",
27
+ "wsPlayer.request.talk.interface": "请求对讲接口",
28
+ "wsPlayer.screen.custom.split": "自定义分屏",
29
+ "wsPlayer.screen.four": "四分屏",
30
+ "wsPlayer.screen.full": "全屏",
31
+ "wsPlayer.screen.nine": "九分屏",
32
+ "wsPlayer.screen.one": "单屏",
33
+ "wsPlayer.screen.selfAdaption": "自适应",
34
+ "wsPlayer.screen.split": "{0}分屏",
35
+ "wsPlayer.screen.stretching": "拉伸",
36
+ "wsPlayer.sound": "声音",
37
+ "wsPlayer.talk": "对讲",
38
+ "wsPlayer.talking": "对讲中...",
39
+ "wsPlayer.income.format.error": "传入格式错误,请重新传入",
40
+ "wsPlayer.one.click.off": "一键关闭",
41
+ "wsPlayer.pause": "暂停",
42
+ "wsPlayer.play": "播放",
43
+ "wsPlayer.speed.sub": "倍速-",
44
+ "wsPlayer.speed.add": "倍速+",
45
+ "ws.device.awakening": "{0}通道正在唤醒中",
46
+ "wsPlayer.auto.recognition.failed": "自动识别失败,存在端口为非默认端口,开始通过参数判断,请注意传参!",
47
+ "wsPlayer.capture": "抓图",
48
+ "wsPlayer.video": "视频",
49
+ "wsPlayer.current.window.cannot.be.merged": "当前窗口无法被合并",
50
+ "wsPlayer.custom.player.max.support.tip": "自定义播放器只支持最大分割{0}个窗口",
51
+ "wsPlayer.drag.tip": "不能拖拽到当前位置,请重新拖拽",
52
+
53
+ "wsPlayer.play.error.101": "当前浏览器不支持硬解码",
54
+ "wsPlayer.play.error.102": "硬解码播放失败",
55
+ "wsPlayer.play.error.103": "硬解码播放延时超过8秒",
56
+ "wsPlayer.play.error.104": "硬解码失败",
57
+ "wsPlayer.play.error.201": "当前音频无法播放",
58
+ "wsPlayer.play.error.202": "websocket连接错误",
59
+ "wsPlayer.play.error.203": "文件播放完成",
60
+ "wsPlayer.play.error.401": "该用户无操作权限",
61
+ "wsPlayer.play.error.404": "请求超时或未找到",
62
+ "wsPlayer.play.error.405": "播放超时",
63
+ "wsPlayer.play.error.406": "视频流类型解析失败,请检查通道配置",
64
+ "wsPlayer.play.error.407": "请求超时",
65
+ "wsPlayer.play.error.408": "请求超时或码流不支持",
66
+ "wsPlayer.play.error.409": "请求超时或码流不支持",
67
+ "wsPlayer.play.error.410": "视频流异常断开",
68
+ "wsPlayer.play.error.411": "录像已播放完成",
69
+ "wsPlayer.play.error.457": "时间设置错误",
70
+ "wsPlayer.play.error.503": "WS连接地址错误,非当前连接的ICC服务器返回",
71
+ "wsPlayer.play.error.504": "对讲失败",
72
+ "wsPlayer.play.error.701": "Chrome版本低,请升级到最新的Chrome版本",
73
+ "wsPlayer.play.error.702": "Firefox版本低,请升级到最新的Firefox版本",
74
+ "wsPlayer.play.error.703": "Edge版本低,请升级到最新的Edge版本",
75
+ "wsPlayer.play.error.default": "播放失败,请检查配置",
76
+
77
+ "wsPlayer.error.101": "所选通道离线,无法播放",
78
+ "wsPlayer.error.102": "登录权限过期,查询实时预览rtsp失败",
79
+ "wsPlayer.error.103": "接口未通,请检查项目后端是否未转发接口。",
80
+ "wsPlayer.error.104": "接口返回的格式不正确, 请透传ICC服务返回的数据",
81
+ "wsPlayer.error.105": "通道休眠,正在唤醒中,请稍后再试",
82
+ "wsPlayer.error.106": "请传入rtsp地址和websocket地址",
83
+ "wsPlayer.error.107": "当前未传records录像文件, 将无法拖动进度条",
84
+ "wsPlayer.error.201": "所选通道未查询到录像文件",
85
+ "wsPlayer.error.202": "查询录像文件列表失败",
86
+ "wsPlayer.error.203": "查询录像rtsp失败",
87
+ "wsPlayer.error.204": "{0}倍速无法播放音频",
88
+ "wsPlayer.error.205": "通道休眠,正在唤醒中,请稍后再试",
89
+ "wsPlayer.error.206": "当前倍速不支持",
90
+ "wsPlayer.error.301": "正在对讲,无法关闭音频",
91
+ "wsPlayer.error.302": "其他设备对讲中,无法开启音频",
92
+ "wsPlayer.error.303": "其他设备对讲中,无法开启对讲",
93
+ "wsPlayer.error.304": "查询对讲rtsp失败",
94
+ "wsPlayer.error.305": "http协议不支持对讲",
95
+ "wsPlayer.error.306": "设备对讲失败",
96
+ "wsPlayer.error.307": "不支持PCM音频格式对讲",
97
+ "wsPlayer.error.308": "不支持ARM音频格式对讲",
98
+ "wsPlayer.error.309": "不支持G711u音频格式对讲",
99
+ "wsPlayer.error.310": "不支持G726音频格式对讲",
100
+ "wsPlayer.error.311": "不支持AAC音频格式对讲",
101
+ "wsPlayer.error.312": "不支持G722音频格式对讲",
102
+ "wsPlayer.error.501": "解码库未初始化完成,请稍后播放!",
103
+ "wsPlayer.error.502": "解码库未初始化完成,请稍后对讲!",
104
+ "wsPlayer.error.503": "请检查创建播放器时,播放器容器是否存在",
105
+ "wsPlayer.error.601": "所操作播放器不存在",
106
+ "wsPlayer.error.602": "所选播放器正在本地录像中,不可重复本地录像",
107
+ "wsPlayer.error.603": "所选播放器未播放录像,不可本地录像",
108
+ "wsPlayer.error.604": "所选播放器未开始本地录像,不可操作关闭本地录像",
109
+ "wsPlayer.error.605": "时间跳转播放传参错误",
110
+ "wsPlayer.error.606": "设置自适应拉伸传参错误",
111
+ "wsPlayer.error.607": "实时预览不支持倍速播放",
112
+ "wsPlayer.error.608": "需传入正确的{0}方法:{1}",
113
+ "wsPlayer.error.609": "超出当前设置最大窗口布局数量",
114
+ "wsPlayer.error.610": "操作自定义窗口布局失败:{0}",
115
+ "wsPlayer.error.611": "实时预览不支持播放方法",
116
+ "wsPlayer.error.612": "实时预览不支持暂停方法",
117
+ "wsPlayer.error.613": "实时预览不支持跳转播放",
118
+ "wsPlayer.error.701": "云台被用户{0}锁定,无法操作",
119
+ "wsPlayer.error.702": "控制云台三维定位失败{0}",
120
+ "wsPlayer.error.703": "控制云台{0}{1}失败{2}",
121
+ "wsPlayer.error.704": "控制云台方向失败{0}",
122
+
123
+ "error2084": "您无权限进行此操作"
124
+ }
@@ -0,0 +1,7 @@
1
+ import zhCN from "./lang/zh_CN.js";
2
+ import enUS from "./lang/en_US.js";
3
+
4
+ export const localProvider = {
5
+ zhCN,
6
+ enUS
7
+ }
@@ -0,0 +1,34 @@
1
+ import { localProvider } from "./localProvider.js";
2
+
3
+ let local = ""
4
+ let localJSON = {};
5
+ let customI18n = null
6
+
7
+ // 设置国际化语言
8
+ function setLocal(_local) {
9
+ local = _local;
10
+ localJSON = localProvider[_local];
11
+ }
12
+
13
+ function setI18n(i18n) {
14
+ customI18n = i18n
15
+ }
16
+
17
+ function $t(key, params) {
18
+ if(customI18n && customI18n.t) {
19
+ return customI18n.t(key, params);
20
+ }
21
+ let result = localJSON[key]
22
+ if(Array.isArray(params)) {
23
+ params.forEach((item, index) => {
24
+ result = result.replace(`{${index}}`, item)
25
+ })
26
+ }
27
+ return result;
28
+ }
29
+
30
+ export default {
31
+ setLocal,
32
+ setI18n,
33
+ $t,
34
+ }