@vtx/player 1.9.1 → 1.9.2

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 (113) hide show
  1. package/README.md +2 -2
  2. package/lib/api/fetch.js +67 -69
  3. package/lib/api/fetch.js.map +1 -1
  4. package/lib/api/index.js +34 -47
  5. package/lib/api/index.js.map +1 -1
  6. package/lib/api/types.d.ts +5 -5
  7. package/lib/api/types.js +0 -1
  8. package/lib/api/types.js.map +1 -1
  9. package/lib/bd/PlayerManager.js +8 -7
  10. package/lib/bd/PlayerManager.js.map +1 -1
  11. package/lib/bill-player/index.d.ts +1 -1
  12. package/lib/bill-player/index.js +9 -11
  13. package/lib/bill-player/index.js.map +1 -1
  14. package/lib/bill-player/style/index.less +320 -320
  15. package/lib/components/set-tag-video/index.js +7 -8
  16. package/lib/components/set-tag-video/index.js.map +1 -1
  17. package/lib/components/set-tag-video/style/index.less +125 -125
  18. package/lib/components/split-screen/index.d.ts +1 -1
  19. package/lib/components/split-screen/index.js +3 -5
  20. package/lib/components/split-screen/index.js.map +1 -1
  21. package/lib/components/tag-video/index.js +10 -11
  22. package/lib/components/tag-video/index.js.map +1 -1
  23. package/lib/components/tag-video/style/index.less +69 -69
  24. package/lib/components/video-scale/index.d.ts +1 -1
  25. package/lib/components/video-scale/index.js +2 -3
  26. package/lib/components/video-scale/index.js.map +1 -1
  27. package/lib/config.js +1 -2
  28. package/lib/config.js.map +1 -1
  29. package/lib/context/index.js +3 -5
  30. package/lib/context/index.js.map +1 -1
  31. package/lib/controls/index.d.ts +11 -11
  32. package/lib/controls/index.js +14 -22
  33. package/lib/controls/index.js.map +1 -1
  34. package/lib/controls/style/index.less +192 -192
  35. package/lib/h264/PlayerManager.js +8 -7
  36. package/lib/h264/PlayerManager.js.map +1 -1
  37. package/lib/history-control/index.d.ts +2 -2
  38. package/lib/history-control/index.js +8 -10
  39. package/lib/history-control/index.js.map +1 -1
  40. package/lib/history-control/style/index.less +252 -252
  41. package/lib/history-control-v2/components/grid-item/index.js +10 -11
  42. package/lib/history-control-v2/components/grid-item/index.js.map +1 -1
  43. package/lib/history-control-v2/components/panel/VideoTable.d.ts +1 -1
  44. package/lib/history-control-v2/components/panel/VideoTable.js +51 -54
  45. package/lib/history-control-v2/components/panel/VideoTable.js.map +1 -1
  46. package/lib/history-control-v2/components/panel/index.js +14 -16
  47. package/lib/history-control-v2/components/panel/index.js.map +1 -1
  48. package/lib/history-control-v2/context.js +1 -2
  49. package/lib/history-control-v2/context.js.map +1 -1
  50. package/lib/history-control-v2/index.d.ts +4 -4
  51. package/lib/history-control-v2/index.js +71 -75
  52. package/lib/history-control-v2/index.js.map +1 -1
  53. package/lib/history-control-v2/style/index.less +437 -437
  54. package/lib/history-control-v2/utils.js +13 -18
  55. package/lib/history-control-v2/utils.js.map +1 -1
  56. package/lib/history-player/index.d.ts +1 -1
  57. package/lib/history-player/index.js +107 -110
  58. package/lib/history-player/index.js.map +1 -1
  59. package/lib/history-player/style/index.less +102 -102
  60. package/lib/hooks/useSettings.js +1 -2
  61. package/lib/hooks/useSettings.js.map +1 -1
  62. package/lib/icc/PlayerManager.js +9 -8
  63. package/lib/icc/PlayerManager.js.map +1 -1
  64. package/lib/icc/api.d.ts +0 -68
  65. package/lib/icc/api.js +2 -3
  66. package/lib/icc/api.js.map +1 -1
  67. package/lib/icons/index.d.ts +36 -36
  68. package/lib/icons/index.js +37 -73
  69. package/lib/icons/index.js.map +1 -1
  70. package/lib/icons/index.less +32 -32
  71. package/lib/index.js +1 -1
  72. package/lib/index.js.map +1 -1
  73. package/lib/live-channel-player/index.d.ts +1 -1
  74. package/lib/live-channel-player/index.js +29 -32
  75. package/lib/live-channel-player/index.js.map +1 -1
  76. package/lib/live-control/index.d.ts +2 -2
  77. package/lib/live-control/index.js +12 -13
  78. package/lib/live-control/index.js.map +1 -1
  79. package/lib/live-control/style/index.less +99 -99
  80. package/lib/live-control-v2/index.d.ts +3 -3
  81. package/lib/live-control-v2/index.js +18 -20
  82. package/lib/live-control-v2/index.js.map +1 -1
  83. package/lib/live-control-v2/style/index.less +192 -192
  84. package/lib/live-player/index.js +65 -67
  85. package/lib/live-player/index.js.map +1 -1
  86. package/lib/live-player/style/index.less +75 -75
  87. package/lib/mpegts/PlayerManager.js +8 -7
  88. package/lib/mpegts/PlayerManager.js.map +1 -1
  89. package/lib/player/index.d.ts +1 -1
  90. package/lib/player/index.js +50 -51
  91. package/lib/player/index.js.map +1 -1
  92. package/lib/rsl/PlayerManager.d.ts +1 -1
  93. package/lib/rsl/PlayerManager.js +8 -7
  94. package/lib/rsl/PlayerManager.js.map +1 -1
  95. package/lib/typings/@vtx/utils/index.d.ts +28 -28
  96. package/lib/typings/h5player.d.ts +150 -150
  97. package/lib/typings/mpegts.d.ts +7 -7
  98. package/lib/typings/webrtcplayer.d.ts +56 -56
  99. package/lib/typings/wfsplayer.d.ts +56 -56
  100. package/lib/typings/wsplayer.d.ts +99 -99
  101. package/lib/utils/index.d.ts +1 -1
  102. package/lib/utils/index.js +14 -23
  103. package/lib/utils/index.js.map +1 -1
  104. package/lib/vite-env.d.ts +1 -1
  105. package/lib/vtxHls/PlayerManager.js +8 -7
  106. package/lib/vtxHls/PlayerManager.js.map +1 -1
  107. package/lib/vtxHls/WhepManager.js +11 -10
  108. package/lib/vtxHls/WhepManager.js.map +1 -1
  109. package/lib/webrtc/PlayerManager.js +8 -7
  110. package/lib/webrtc/PlayerManager.js.map +1 -1
  111. package/lib/wfs/PlayerManager.js +8 -7
  112. package/lib/wfs/PlayerManager.js.map +1 -1
  113. 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,9 +4,12 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = void 0;
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; }
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); }
10
13
  /**
11
14
  */
12
15
  var H264PlayerManager = /*#__PURE__*/function () {
@@ -20,7 +23,7 @@ var H264PlayerManager = /*#__PURE__*/function () {
20
23
  /**
21
24
  * 初始化实时预览播放器
22
25
  */
23
- _createClass(H264PlayerManager, [{
26
+ return _createClass(H264PlayerManager, [{
24
27
  key: "initPlayer",
25
28
  value: function initPlayer(opt) {
26
29
  var jmuxer = new JMuxer({
@@ -123,8 +126,6 @@ var H264PlayerManager = /*#__PURE__*/function () {
123
126
  // this.player.jumpPlayByTime(time);
124
127
  }
125
128
  }]);
126
- return H264PlayerManager;
127
129
  }();
128
- var _default = H264PlayerManager;
129
- exports["default"] = _default;
130
+ var _default = exports["default"] = H264PlayerManager;
130
131
  //# 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;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,cAAc,CAAC,CAAC;MAC9B,IAAIC,KAAK,GAAG,IAAI;MAChB,IAAI,CAAC,IAAI,CAACf,GAAG,EACT;MACJa,GAAG,CAACG,IAAI,CAAC,KAAK,EAAE,IAAI,CAAChB,GAAG,EAAEe,KAAK,CAAC;MAChCF,GAAG,CAACI,YAAY,GAAG,aAAa;MAChCJ,GAAG,CAACK,kBAAkB,GAAG,UAAUC,KAAK,EAAE;QACtC,I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,IAAI,EAAE;MACjB;IAAA;EACH;EAAA,OAAA9C,iBAAA;AAAA;AAAA,IAAA+C,QAAA,GAEU/C,iBAAiB;AAAAgD,OAAA,cAAAD,QAAA","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;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,KAAK,EAAE,IAAI,CAAChB,GAAG,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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,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { GetHistoryUrlParams } from '../api/types';
3
- export declare type HistoryControlHandle = {
3
+ export 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 declare type UrlsTableItemType = {
28
+ export 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(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
26
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
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(); }
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(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';
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';
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 = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
49
+ var HistoryControl = exports.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,7 +404,6 @@ var HistoryControl = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
404
404
  }))]
405
405
  }));
406
406
  });
407
- exports.HistoryControl = HistoryControl;
408
407
  HistoryControl.displayName = 'HistoryControl';
409
408
  var TimeLine = function TimeLine() {
410
409
  var getSplitLines = function getSplitLines() {
@@ -525,6 +524,5 @@ var TimeVerticalLine = function TimeVerticalLine(_ref) {
525
524
  onClick: onClick
526
525
  }) : (0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {});
527
526
  };
528
- var _default = HistoryControl;
529
- exports["default"] = _default;
527
+ var _default = exports["default"] = HistoryControl;
530
528
  //# sourceMappingURL=index.js.map