@vtx/player 1.9.2 → 1.9.4

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 (117) hide show
  1. package/README.md +2 -2
  2. package/lib/api/fetch.js +69 -67
  3. package/lib/api/fetch.js.map +1 -1
  4. package/lib/api/index.js +47 -34
  5. package/lib/api/index.js.map +1 -1
  6. package/lib/api/types.d.ts +5 -5
  7. package/lib/api/types.js +1 -0
  8. package/lib/api/types.js.map +1 -1
  9. package/lib/bd/PlayerManager.d.ts +3 -2
  10. package/lib/bd/PlayerManager.js +63 -14
  11. package/lib/bd/PlayerManager.js.map +1 -1
  12. package/lib/bill-player/index.d.ts +1 -1
  13. package/lib/bill-player/index.js +11 -9
  14. package/lib/bill-player/index.js.map +1 -1
  15. package/lib/bill-player/style/index.less +320 -320
  16. package/lib/components/set-tag-video/index.js +8 -7
  17. package/lib/components/set-tag-video/index.js.map +1 -1
  18. package/lib/components/set-tag-video/style/index.less +125 -125
  19. package/lib/components/split-screen/index.d.ts +1 -1
  20. package/lib/components/split-screen/index.js +5 -3
  21. package/lib/components/split-screen/index.js.map +1 -1
  22. package/lib/components/tag-video/index.js +11 -10
  23. package/lib/components/tag-video/index.js.map +1 -1
  24. package/lib/components/tag-video/style/index.less +69 -69
  25. package/lib/components/video-scale/index.d.ts +1 -1
  26. package/lib/components/video-scale/index.js +3 -2
  27. package/lib/components/video-scale/index.js.map +1 -1
  28. package/lib/config.js +3 -2
  29. package/lib/config.js.map +1 -1
  30. package/lib/context/index.js +5 -3
  31. package/lib/context/index.js.map +1 -1
  32. package/lib/controls/index.d.ts +11 -11
  33. package/lib/controls/index.js +22 -14
  34. package/lib/controls/index.js.map +1 -1
  35. package/lib/controls/style/index.less +192 -192
  36. package/lib/h264/PlayerManager.js +7 -8
  37. package/lib/h264/PlayerManager.js.map +1 -1
  38. package/lib/history-control/index.d.ts +2 -2
  39. package/lib/history-control/index.js +10 -8
  40. package/lib/history-control/index.js.map +1 -1
  41. package/lib/history-control/style/index.less +252 -252
  42. package/lib/history-control-v2/components/grid-item/index.js +15 -11
  43. package/lib/history-control-v2/components/grid-item/index.js.map +1 -1
  44. package/lib/history-control-v2/components/panel/VideoTable.d.ts +1 -1
  45. package/lib/history-control-v2/components/panel/VideoTable.js +54 -51
  46. package/lib/history-control-v2/components/panel/VideoTable.js.map +1 -1
  47. package/lib/history-control-v2/components/panel/index.d.ts +1 -0
  48. package/lib/history-control-v2/components/panel/index.js +19 -12
  49. package/lib/history-control-v2/components/panel/index.js.map +1 -1
  50. package/lib/history-control-v2/context.d.ts +1 -0
  51. package/lib/history-control-v2/context.js +2 -1
  52. package/lib/history-control-v2/context.js.map +1 -1
  53. package/lib/history-control-v2/index.d.ts +4 -4
  54. package/lib/history-control-v2/index.js +84 -72
  55. package/lib/history-control-v2/index.js.map +1 -1
  56. package/lib/history-control-v2/style/index.less +437 -437
  57. package/lib/history-control-v2/utils.js +18 -13
  58. package/lib/history-control-v2/utils.js.map +1 -1
  59. package/lib/history-player/index.d.ts +2 -1
  60. package/lib/history-player/index.js +166 -117
  61. package/lib/history-player/index.js.map +1 -1
  62. package/lib/history-player/style/index.less +102 -102
  63. package/lib/hooks/useSettings.js +2 -1
  64. package/lib/hooks/useSettings.js.map +1 -1
  65. package/lib/icc/PlayerManager.js +8 -9
  66. package/lib/icc/PlayerManager.js.map +1 -1
  67. package/lib/icc/api.d.ts +68 -0
  68. package/lib/icc/api.js +3 -2
  69. package/lib/icc/api.js.map +1 -1
  70. package/lib/icons/index.d.ts +36 -36
  71. package/lib/icons/index.js +73 -37
  72. package/lib/icons/index.js.map +1 -1
  73. package/lib/icons/index.less +32 -32
  74. package/lib/index.js +1 -1
  75. package/lib/index.js.map +1 -1
  76. package/lib/live-channel-player/index.d.ts +1 -1
  77. package/lib/live-channel-player/index.js +32 -29
  78. package/lib/live-channel-player/index.js.map +1 -1
  79. package/lib/live-control/index.d.ts +2 -2
  80. package/lib/live-control/index.js +13 -12
  81. package/lib/live-control/index.js.map +1 -1
  82. package/lib/live-control/style/index.less +99 -99
  83. package/lib/live-control-v2/index.d.ts +3 -3
  84. package/lib/live-control-v2/index.js +22 -19
  85. package/lib/live-control-v2/index.js.map +1 -1
  86. package/lib/live-control-v2/style/index.less +192 -192
  87. package/lib/live-player/index.d.ts +1 -0
  88. package/lib/live-player/index.js +74 -66
  89. package/lib/live-player/index.js.map +1 -1
  90. package/lib/live-player/style/index.less +75 -75
  91. package/lib/mpegts/PlayerManager.js +7 -8
  92. package/lib/mpegts/PlayerManager.js.map +1 -1
  93. package/lib/player/index.d.ts +3 -1
  94. package/lib/player/index.js +105 -91
  95. package/lib/player/index.js.map +1 -1
  96. package/lib/rsl/PlayerManager.d.ts +1 -1
  97. package/lib/rsl/PlayerManager.js +7 -8
  98. package/lib/rsl/PlayerManager.js.map +1 -1
  99. package/lib/typings/@vtx/utils/index.d.ts +28 -28
  100. package/lib/typings/h5player.d.ts +150 -150
  101. package/lib/typings/mpegts.d.ts +7 -7
  102. package/lib/typings/webrtcplayer.d.ts +56 -56
  103. package/lib/typings/wfsplayer.d.ts +56 -56
  104. package/lib/typings/wsplayer.d.ts +99 -99
  105. package/lib/utils/index.d.ts +1 -1
  106. package/lib/utils/index.js +30 -43
  107. package/lib/utils/index.js.map +1 -1
  108. package/lib/vite-env.d.ts +1 -1
  109. package/lib/vtxHls/PlayerManager.js +7 -8
  110. package/lib/vtxHls/PlayerManager.js.map +1 -1
  111. package/lib/vtxHls/WhepManager.js +10 -11
  112. package/lib/vtxHls/WhepManager.js.map +1 -1
  113. package/lib/webrtc/PlayerManager.js +7 -8
  114. package/lib/webrtc/PlayerManager.js.map +1 -1
  115. package/lib/wfs/PlayerManager.js +7 -8
  116. package/lib/wfs/PlayerManager.js.map +1 -1
  117. package/package.json +125 -125
@@ -1,192 +1,192 @@
1
- .player-control-popover {
2
- border-radius: 2px;
3
-
4
- .ant-popover-content {
5
- background: rgba(0, 0, 0, 0.75);
6
- box-shadow: 0 2px 8px 1px rgba(0, 0, 0, 0.15);
7
-
8
- .ant-popover-arrow-content {
9
- background: rgba(0, 0, 0, 0.75);
10
-
11
- &::before {
12
- background: none;
13
- }
14
- }
15
-
16
- .ant-popover-inner {
17
- background: transparent;
18
-
19
- .ant-popover-inner-content {
20
- padding: 0;
21
-
22
- .volume-content {
23
- display: flex;
24
- flex-direction: column;
25
- align-items: center;
26
- width: 44px;
27
- padding: 8px 0;
28
-
29
- .value {
30
- font-size: 14px;
31
- color: rgba(255, 255, 255, 0.847);
32
- }
33
-
34
- .ant-slider-vertical {
35
- height: 62px;
36
-
37
- .ant-slider-handle {
38
- background-color: #1890ff;
39
- border: solid 2px #1890ff;
40
- }
41
-
42
- .ant-slider-track {
43
- background-color: #1890ff;
44
- }
45
- }
46
- }
47
-
48
- .speed-content {
49
- .item {
50
- padding: 2px 10px;
51
- color: rgba(255, 255, 255, 0.65);
52
- cursor: pointer;
53
-
54
- &:hover {
55
- background-color: rgba(255, 255, 255, 0.25);
56
- }
57
- }
58
- }
59
- }
60
- }
61
- }
62
- }
63
-
64
- .vtx-player-speed-control {
65
- line-height: 24px;
66
- color: rgba(255, 255, 255, 0.65);
67
- cursor: pointer;
68
- }
69
-
70
- .vtx-player-header {
71
- display: flex;
72
- align-items: center;
73
- width: 100%;
74
- height: 26px;
75
- padding: 0 12px;
76
- background-color: #131d27;
77
-
78
- .title {
79
- width: 100%;
80
- font-size: 14px;
81
- color: white;
82
- padding-right: 5px;
83
- overflow: hidden;
84
- text-overflow: ellipsis;
85
- white-space: nowrap;
86
- }
87
-
88
- .close {
89
- margin-left: auto;
90
- }
91
- }
92
-
93
- .cloud-control-panel {
94
- position: absolute;
95
- top: 0;
96
- width: 100%;
97
- height: calc(100% - 24px);
98
-
99
- .arrow {
100
- position: absolute;
101
- cursor: pointer;
102
-
103
- &.up {
104
- top: 16px;
105
- left: 50%;
106
- transform: translateX(-50%) rotate(180deg);
107
- }
108
-
109
- &.down {
110
- bottom: 16px;
111
- left: 50%;
112
- transform: translateX(-50%);
113
- }
114
-
115
- &.left {
116
- top: 50%;
117
- left: 16px;
118
- transform: translateY(-50%) rotate(90deg);
119
- }
120
-
121
- &.right {
122
- top: 50%;
123
- right: 16px;
124
- transform: translateY(-50%) rotate(-90deg);
125
- }
126
-
127
- &.left-up {
128
- top: 16px;
129
- left: 16px;
130
- transform: rotate(135deg);
131
- }
132
-
133
- &.left-down {
134
- bottom: 16px;
135
- left: 16px;
136
- transform: rotate(45deg);
137
- }
138
-
139
- &.right-up {
140
- top: 16px;
141
- right: 16px;
142
- transform: rotate(225deg);
143
- }
144
-
145
- &.right-down {
146
- right: 16px;
147
- bottom: 16px;
148
- transform: rotate(-45deg);
149
- }
150
- }
151
-
152
- .buttons {
153
- position: absolute;
154
- bottom: 80px;
155
- left: 50%;
156
- transform: translateX(-50%);
157
-
158
- .control-button {
159
- display: flex;
160
- height: 32px;
161
- line-height: 32px;
162
- color: white;
163
- cursor: default;
164
- background-color: rgba(0, 0, 0, 0.35);
165
- border: 1px solid rgba(0, 0, 0, 0.15);
166
- border-radius: 2px;
167
-
168
- > span {
169
- height: 100%;
170
- padding: 0 8px;
171
- }
172
-
173
- .text {
174
- height: 100%;
175
- padding: 0 8px;
176
- white-space: nowrap;
177
- border-right: 1px solid rgba(0, 0, 0, 0.15);
178
- border-left: 1px solid rgba(0, 0, 0, 0.15);
179
- }
180
-
181
- .icon {
182
- padding: 0 12px;
183
- cursor: pointer;
184
- }
185
- }
186
- }
187
- }
188
-
189
- .infoPanel {
190
- position: absolute;
191
- color: red;
192
- }
1
+ .player-control-popover {
2
+ border-radius: 2px;
3
+
4
+ .ant-popover-content {
5
+ background: rgba(0, 0, 0, 0.75);
6
+ box-shadow: 0 2px 8px 1px rgba(0, 0, 0, 0.15);
7
+
8
+ .ant-popover-arrow-content {
9
+ background: rgba(0, 0, 0, 0.75);
10
+
11
+ &::before {
12
+ background: none;
13
+ }
14
+ }
15
+
16
+ .ant-popover-inner {
17
+ background: transparent;
18
+
19
+ .ant-popover-inner-content {
20
+ padding: 0;
21
+
22
+ .volume-content {
23
+ display: flex;
24
+ flex-direction: column;
25
+ align-items: center;
26
+ width: 44px;
27
+ padding: 8px 0;
28
+
29
+ .value {
30
+ font-size: 14px;
31
+ color: rgba(255, 255, 255, 0.847);
32
+ }
33
+
34
+ .ant-slider-vertical {
35
+ height: 62px;
36
+
37
+ .ant-slider-handle {
38
+ background-color: #1890ff;
39
+ border: solid 2px #1890ff;
40
+ }
41
+
42
+ .ant-slider-track {
43
+ background-color: #1890ff;
44
+ }
45
+ }
46
+ }
47
+
48
+ .speed-content {
49
+ .item {
50
+ padding: 2px 10px;
51
+ color: rgba(255, 255, 255, 0.65);
52
+ cursor: pointer;
53
+
54
+ &:hover {
55
+ background-color: rgba(255, 255, 255, 0.25);
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
61
+ }
62
+ }
63
+
64
+ .vtx-player-speed-control {
65
+ line-height: 24px;
66
+ color: rgba(255, 255, 255, 0.65);
67
+ cursor: pointer;
68
+ }
69
+
70
+ .vtx-player-header {
71
+ display: flex;
72
+ align-items: center;
73
+ width: 100%;
74
+ height: 26px;
75
+ padding: 0 12px;
76
+ background-color: #131d27;
77
+
78
+ .title {
79
+ width: 100%;
80
+ font-size: 14px;
81
+ color: white;
82
+ padding-right: 5px;
83
+ overflow: hidden;
84
+ text-overflow: ellipsis;
85
+ white-space: nowrap;
86
+ }
87
+
88
+ .close {
89
+ margin-left: auto;
90
+ }
91
+ }
92
+
93
+ .cloud-control-panel {
94
+ position: absolute;
95
+ top: 0;
96
+ width: 100%;
97
+ height: calc(100% - 24px);
98
+
99
+ .arrow {
100
+ position: absolute;
101
+ cursor: pointer;
102
+
103
+ &.up {
104
+ top: 16px;
105
+ left: 50%;
106
+ transform: translateX(-50%) rotate(180deg);
107
+ }
108
+
109
+ &.down {
110
+ bottom: 16px;
111
+ left: 50%;
112
+ transform: translateX(-50%);
113
+ }
114
+
115
+ &.left {
116
+ top: 50%;
117
+ left: 16px;
118
+ transform: translateY(-50%) rotate(90deg);
119
+ }
120
+
121
+ &.right {
122
+ top: 50%;
123
+ right: 16px;
124
+ transform: translateY(-50%) rotate(-90deg);
125
+ }
126
+
127
+ &.left-up {
128
+ top: 16px;
129
+ left: 16px;
130
+ transform: rotate(135deg);
131
+ }
132
+
133
+ &.left-down {
134
+ bottom: 16px;
135
+ left: 16px;
136
+ transform: rotate(45deg);
137
+ }
138
+
139
+ &.right-up {
140
+ top: 16px;
141
+ right: 16px;
142
+ transform: rotate(225deg);
143
+ }
144
+
145
+ &.right-down {
146
+ right: 16px;
147
+ bottom: 16px;
148
+ transform: rotate(-45deg);
149
+ }
150
+ }
151
+
152
+ .buttons {
153
+ position: absolute;
154
+ bottom: 80px;
155
+ left: 50%;
156
+ transform: translateX(-50%);
157
+
158
+ .control-button {
159
+ display: flex;
160
+ height: 32px;
161
+ line-height: 32px;
162
+ color: white;
163
+ cursor: default;
164
+ background-color: rgba(0, 0, 0, 0.35);
165
+ border: 1px solid rgba(0, 0, 0, 0.15);
166
+ border-radius: 2px;
167
+
168
+ > span {
169
+ height: 100%;
170
+ padding: 0 8px;
171
+ }
172
+
173
+ .text {
174
+ height: 100%;
175
+ padding: 0 8px;
176
+ white-space: nowrap;
177
+ border-right: 1px solid rgba(0, 0, 0, 0.15);
178
+ border-left: 1px solid rgba(0, 0, 0, 0.15);
179
+ }
180
+
181
+ .icon {
182
+ padding: 0 12px;
183
+ cursor: pointer;
184
+ }
185
+ }
186
+ }
187
+ }
188
+
189
+ .infoPanel {
190
+ position: absolute;
191
+ color: red;
192
+ }
@@ -4,12 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = void 0;
7
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
8
- function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
9
- function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
10
- function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
11
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
12
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
8
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
9
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
13
10
  /**
14
11
  */
15
12
  var H264PlayerManager = /*#__PURE__*/function () {
@@ -23,7 +20,7 @@ var H264PlayerManager = /*#__PURE__*/function () {
23
20
  /**
24
21
  * 初始化实时预览播放器
25
22
  */
26
- return _createClass(H264PlayerManager, [{
23
+ _createClass(H264PlayerManager, [{
27
24
  key: "initPlayer",
28
25
  value: function initPlayer(opt) {
29
26
  var jmuxer = new JMuxer({
@@ -126,6 +123,8 @@ var H264PlayerManager = /*#__PURE__*/function () {
126
123
  // this.player.jumpPlayByTime(time);
127
124
  }
128
125
  }]);
126
+ return H264PlayerManager;
129
127
  }();
130
- var _default = exports["default"] = H264PlayerManager;
128
+ var _default = H264PlayerManager;
129
+ exports["default"] = _default;
131
130
  //# sourceMappingURL=PlayerManager.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlayerManager.js","names":["H264PlayerManager","opt","_classCallCheck","player","id","url","initPlayer","_createClass","key","value","jmuxer","JMuxer","node","mode","flushingTime","fps","clearBuffer","debug","xhr","XMLHttpRequest","async","open","responseType","onreadystatechange","event","readyState","feed","video","Uint8Array","response","send","pause","recordPlayer","play","playSpeed","speed","close","destroy","setFullScreen","setPlayerAdapter","playerAdapter","setPlayerNum","number","setSelectIndex","index","jumpPlayByTime","time","_default","exports"],"sources":["h264/PlayerManager.js"],"sourcesContent":["/**\n */\nclass H264PlayerManager {\n constructor(opt) {\n this.player = null;\n this.id = opt.id;\n this.url = opt.url;\n this.initPlayer();\n }\n /**\n * 初始化实时预览播放器\n */\n initPlayer(opt) {\n const jmuxer = new JMuxer({\n node: 'playerh264',\n mode: 'video',\n flushingTime: 1000,\n fps: 12,\n clearBuffer: false,\n debug: true,\n });\n var xhr = new XMLHttpRequest();\n var async = true;\n if (!this.url)\n return;\n xhr.open('GET', this.url, async);\n xhr.responseType = 'arraybuffer';\n xhr.onreadystatechange = function (event) {\n if (xhr.readyState === 4) {\n jmuxer.feed({\n video: new Uint8Array(xhr.response),\n });\n this.player = jmuxer;\n }\n };\n xhr.send(null);\n }\n pause() {\n this.recordPlayer && this.player.pause();\n }\n /**\n * 录像暂停后播放\n * 只有暂停后的录像调用才有效\n */\n play() {\n //\n }\n /**\n * 倍速播放\n * @param {number} speed 速率 0.125 0.25 0.5 1 2 4 8 共7种速率\n */\n playSpeed(speed) {\n // this.recordPlayer && this.recordPlayer.playSpeed(speed);\n }\n /**\n * 关闭播放器\n * @param {number} index 可选,关闭指定索引的窗口的播放器,不传则表示关闭所有播放器\n */\n close() {\n this.player && this.player.destroy();\n }\n /**\n * 设置全屏\n */\n setFullScreen() {\n // this.player.setFullScreen();\n }\n /**\n * 设置窗口自适应还是拉伸\n * @param {string} playerAdapter selfAdaption 自适应 | stretching 拉伸\n */\n setPlayerAdapter(playerAdapter) {\n // this.player.setPlayerAdapter(playerAdapter);\n }\n /**\n * 控制视频播放器显示的路数: 1 4 9 16 25,不会超过最大显示路数\n * @param {number} number\n */\n setPlayerNum(number) {\n // this.player.setPlayerNum(number);\n }\n /**\n * 设置选中的播放器的索引\n * @param {number} index\n */\n setSelectIndex(index) {\n // this.player.setSelectIndex(index);\n }\n /**\n * 录像跳转播放\n * @param {string} time HH:mm:ss格式\n */\n jumpPlayByTime(time) {\n // this.player.jumpPlayByTime(time);\n }\n}\nexport default H264PlayerManager;\n"],"mappings":";;;;;;;;;;;;AAAA;AACA;AADA,IAEMA,iBAAiB;EACnB,SAAAA,kBAAYC,GAAG,EAAE;IAAAC,eAAA,OAAAF,iBAAA;IACb,IAAI,CAACG,MAAM,GAAG,IAAI;IAClB,IAAI,CAACC,EAAE,GAAGH,GAAG,CAACG,EAAE;IAChB,IAAI,CAACC,GAAG,GAAGJ,GAAG,CAACI,GAAG;IAClB,IAAI,CAACC,UAAU,CAAC,CAAC;EACrB;EACA;AACJ;AACA;EAFI,OAAAC,YAAA,CAAAP,iBAAA;IAAAQ,GAAA;IAAAC,KAAA,EAGA,SAAAH,UAAUA,CAACL,GAAG,EAAE;MACZ,IAAMS,MAAM,GAAG,IAAIC,MAAM,CAAC;QACtBC,IAAI,EAAE,YAAY;QAClBC,IAAI,EAAE,OAAO;QACbC,YAAY,EAAE,IAAI;QAClBC,GAAG,EAAE,EAAE;QACPC,WAAW,EAAE,KAAK;QAClBC,KAAK,EAAE;MACX,CAAC,CAAC;MACF,IAAIC,GAAG,GAAG,IAAIC,cAAc,CAAC,CAAC;MAC9B,IAAIC,KAAK,GAAG,IAAI;MAChB,IAAI,CAAC,IAAI,CAACf,GAAG,EACT;MACJa,GAAG,CAACG,IAAI,CAAC,K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MACjB;IAAA;IAEJ;AACJ;AACA;AACA;EAHI;IAAAlC,GAAA;IAAAC,KAAA,EAIA,SAAAkC,cAAcA,CAACC,KAAK,EAAE;MAClB;IAAA;IAEJ;AACJ;AACA;AACA;EAHI;IAAApC,GAAA;IAAAC,KAAA,EAIA,SAAAoC,cAAcA,CAACC,IAAI,EAAE;MACjB;IAAA;EACH;AAAA;AAAA,IAAAC,QAAA,GAAAC,OAAA,cAEUhD,iBAAiB","ignoreList":[]}
1
+ {"version":3,"file":"PlayerManager.js","names":["H264PlayerManager","opt","_classCallCheck","player","id","url","initPlayer","_createClass","key","value","jmuxer","JMuxer","node","mode","flushingTime","fps","clearBuffer","debug","xhr","XMLHttpRequest","async","open","responseType","onreadystatechange","event","readyState","feed","video","Uint8Array","response","send","pause","recordPlayer","play","playSpeed","speed","close","destroy","setFullScreen","setPlayerAdapter","playerAdapter","setPlayerNum","number","setSelectIndex","index","jumpPlayByTime","time","_default","exports"],"sources":["h264/PlayerManager.js"],"sourcesContent":["/**\n */\nclass H264PlayerManager {\n constructor(opt) {\n this.player = null;\n this.id = opt.id;\n this.url = opt.url;\n this.initPlayer();\n }\n /**\n * 初始化实时预览播放器\n */\n initPlayer(opt) {\n const jmuxer = new JMuxer({\n node: 'playerh264',\n mode: 'video',\n flushingTime: 1000,\n fps: 12,\n clearBuffer: false,\n debug: true,\n });\n var xhr = new XMLHttpRequest();\n var async = true;\n if (!this.url)\n return;\n xhr.open('GET', this.url, async);\n xhr.responseType = 'arraybuffer';\n xhr.onreadystatechange = function (event) {\n if (xhr.readyState === 4) {\n jmuxer.feed({\n video: new Uint8Array(xhr.response),\n });\n this.player = jmuxer;\n }\n };\n xhr.send(null);\n }\n pause() {\n this.recordPlayer && this.player.pause();\n }\n /**\n * 录像暂停后播放\n * 只有暂停后的录像调用才有效\n */\n play() {\n //\n }\n /**\n * 倍速播放\n * @param {number} speed 速率 0.125 0.25 0.5 1 2 4 8 共7种速率\n */\n playSpeed(speed) {\n // this.recordPlayer && this.recordPlayer.playSpeed(speed);\n }\n /**\n * 关闭播放器\n * @param {number} index 可选,关闭指定索引的窗口的播放器,不传则表示关闭所有播放器\n */\n close() {\n this.player && this.player.destroy();\n }\n /**\n * 设置全屏\n */\n setFullScreen() {\n // this.player.setFullScreen();\n }\n /**\n * 设置窗口自适应还是拉伸\n * @param {string} playerAdapter selfAdaption 自适应 | stretching 拉伸\n */\n setPlayerAdapter(playerAdapter) {\n // this.player.setPlayerAdapter(playerAdapter);\n }\n /**\n * 控制视频播放器显示的路数: 1 4 9 16 25,不会超过最大显示路数\n * @param {number} number\n */\n setPlayerNum(number) {\n // this.player.setPlayerNum(number);\n }\n /**\n * 设置选中的播放器的索引\n * @param {number} index\n */\n setSelectIndex(index) {\n // this.player.setSelectIndex(index);\n }\n /**\n * 录像跳转播放\n * @param {string} time HH:mm:ss格式\n */\n jumpPlayByTime(time) {\n // this.player.jumpPlayByTime(time);\n }\n}\nexport default H264PlayerManager;\n"],"mappings":";;;;;;;;;AAAA;AACA;AADA,IAEMA,iBAAiB;EACnB,SAAAA,kBAAYC,GAAG,EAAE;IAAAC,eAAA,OAAAF,iBAAA;IACb,IAAI,CAACG,MAAM,GAAG,IAAI;IAClB,IAAI,CAACC,EAAE,GAAGH,GAAG,CAACG,EAAE;IAChB,IAAI,CAACC,GAAG,GAAGJ,GAAG,CAACI,GAAG;IAClB,IAAI,CAACC,UAAU,CAAC,CAAC;EACrB;EACA;AACJ;AACA;EAFIC,YAAA,CAAAP,iBAAA;IAAAQ,GAAA;IAAAC,KAAA,EAGA,SAAAH,WAAWL,GAAG,EAAE;MACZ,IAAMS,MAAM,GAAG,IAAIC,MAAM,CAAC;QACtBC,IAAI,EAAE,YAAY;QAClBC,IAAI,EAAE,OAAO;QACbC,YAAY,EAAE,IAAI;QAClBC,GAAG,EAAE,EAAE;QACPC,WAAW,EAAE,KAAK;QAClBC,KAAK,EAAE;MACX,CAAC,CAAC;MACF,IAAIC,GAAG,GAAG,IAAIC,cAA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AACA;AACA;EAHI;IAAAhC,GAAA;IAAAC,KAAA,EAIA,SAAAgC,aAAaC,MAAM,EAAE;MACjB;IAAA;IAEJ;AACJ;AACA;AACA;EAHI;IAAAlC,GAAA;IAAAC,KAAA,EAIA,SAAAkC,eAAeC,KAAK,EAAE;MAClB;IAAA;IAEJ;AACJ;AACA;AACA;EAHI;IAAApC,GAAA;IAAAC,KAAA,EAIA,SAAAoC,eAAeC,IAAI,EAAE;MACjB;IAAA;EACH;EAAA,OAAA9C,iBAAA;AAAA;AAAA,IAAA+C,QAAA,GAEU/C,iBAAiB;AAAAgD,OAAA,cAAAD,QAAA","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { GetHistoryUrlParams } from '../api/types';
3
- export type HistoryControlHandle = {
3
+ export declare type HistoryControlHandle = {
4
4
  load: (channel: GetHistoryUrlParams) => void;
5
5
  };
6
6
  interface HistoryControlProps {
@@ -25,7 +25,7 @@ interface HistoryControlProps {
25
25
  * 历史视频控制器
26
26
  */
27
27
  export declare const HistoryControl: import("react").ForwardRefExoticComponent<HistoryControlProps & import("react").RefAttributes<HistoryControlHandle>>;
28
- export type UrlsTableItemType = {
28
+ export declare type UrlsTableItemType = {
29
29
  /** 序号 */
30
30
  index: number;
31
31
  /** 设备名称 */
@@ -22,13 +22,13 @@ var _table = _interopRequireDefault(require("antd/lib/table"));
22
22
  var _tooltip = _interopRequireDefault(require("antd/lib/tooltip"));
23
23
  var _moment = _interopRequireDefault(require("moment"));
24
24
  var _collapse = _interopRequireDefault(require("./images/collapse.png"));
25
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
26
- function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
25
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
26
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
27
27
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
28
- function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
29
- function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
30
- function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
31
- function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } // import { Button, Space, Table, Tooltip } from 'antd';
28
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
29
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
30
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
31
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } // import { Button, Space, Table, Tooltip } from 'antd';
32
32
  /** 默认播放器参数 */
33
33
  var DEFAULT_PLAY_PARAMS = {
34
34
  index: -1,
@@ -46,7 +46,7 @@ var DEFAULT_PLAY_PARAMS = {
46
46
  /**
47
47
  * 历史视频控制器
48
48
  */
49
- var HistoryControl = exports.HistoryControl = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
49
+ var HistoryControl = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
50
50
  var _props$width = props.width,
51
51
  width = _props$width === void 0 ? '100%' : _props$width,
52
52
  _props$height = props.height,
@@ -404,6 +404,7 @@ var HistoryControl = exports.HistoryControl = /*#__PURE__*/(0, _react.forwardRef
404
404
  }))]
405
405
  }));
406
406
  });
407
+ exports.HistoryControl = HistoryControl;
407
408
  HistoryControl.displayName = 'HistoryControl';
408
409
  var TimeLine = function TimeLine() {
409
410
  var getSplitLines = function getSplitLines() {
@@ -524,5 +525,6 @@ var TimeVerticalLine = function TimeVerticalLine(_ref) {
524
525
  onClick: onClick
525
526
  }) : (0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {});
526
527
  };
527
- var _default = exports["default"] = HistoryControl;
528
+ var _default = HistoryControl;
529
+ exports["default"] = _default;
528
530
  //# sourceMappingURL=index.js.map