@vtx/player 1.7.13 → 1.7.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/lib/api/fetch.js +62 -91
- package/lib/api/fetch.js.map +1 -1
- package/lib/api/index.js +18 -63
- package/lib/api/index.js.map +1 -1
- package/lib/api/types.d.ts +5 -5
- package/lib/bd/PlayerManager.js +38 -68
- package/lib/bd/PlayerManager.js.map +1 -1
- package/lib/bill-player/index.d.ts +1 -1
- package/lib/bill-player/index.js +66 -121
- package/lib/bill-player/index.js.map +1 -1
- package/lib/bill-player/style/css.js +0 -9
- package/lib/bill-player/style/css.js.map +1 -1
- package/lib/bill-player/style/index.js +0 -9
- package/lib/bill-player/style/index.js.map +1 -1
- package/lib/bill-player/style/index.less +297 -297
- package/lib/components/set-tag-video/index.js +6 -34
- package/lib/components/set-tag-video/index.js.map +1 -1
- package/lib/components/set-tag-video/style/css.js.map +1 -1
- package/lib/components/set-tag-video/style/index.js.map +1 -1
- package/lib/components/set-tag-video/style/index.less +125 -125
- package/lib/components/split-screen/index.d.ts +1 -1
- package/lib/components/split-screen/index.js +3 -14
- package/lib/components/split-screen/index.js.map +1 -1
- package/lib/components/split-screen/style/css.js.map +1 -1
- package/lib/components/split-screen/style/index.js.map +1 -1
- package/lib/components/tag-video/index.js +10 -38
- package/lib/components/tag-video/index.js.map +1 -1
- package/lib/components/tag-video/style/css.js.map +1 -1
- package/lib/components/tag-video/style/index.js.map +1 -1
- package/lib/components/tag-video/style/index.less +69 -69
- package/lib/components/video-scale/index.d.ts +1 -1
- package/lib/components/video-scale/index.js +2 -9
- package/lib/components/video-scale/index.js.map +1 -1
- package/lib/components/video-scale/style/css.js.map +1 -1
- package/lib/components/video-scale/style/index.js.map +1 -1
- package/lib/context/index.js +0 -4
- package/lib/context/index.js.map +1 -1
- package/lib/controls/index.d.ts +11 -11
- package/lib/controls/index.js +34 -99
- package/lib/controls/index.js.map +1 -1
- package/lib/controls/style/css.js +0 -5
- package/lib/controls/style/css.js.map +1 -1
- package/lib/controls/style/index.js +0 -5
- package/lib/controls/style/index.js.map +1 -1
- package/lib/controls/style/index.less +188 -188
- package/lib/h264/PlayerManager.js +18 -27
- package/lib/h264/PlayerManager.js.map +1 -1
- package/lib/history-control/index.d.ts +2 -2
- package/lib/history-control/index.js +61 -121
- package/lib/history-control/index.js.map +1 -1
- package/lib/history-control/style/css.js +0 -6
- package/lib/history-control/style/css.js.map +1 -1
- package/lib/history-control/style/index.js +0 -6
- package/lib/history-control/style/index.js.map +1 -1
- package/lib/history-control/style/index.less +252 -252
- package/lib/history-control-v2/components/grid-item/index.js +38 -77
- package/lib/history-control-v2/components/grid-item/index.js.map +1 -1
- package/lib/history-control-v2/components/panel/index.js +44 -114
- package/lib/history-control-v2/components/panel/index.js.map +1 -1
- package/lib/history-control-v2/context.js +0 -2
- package/lib/history-control-v2/context.js.map +1 -1
- package/lib/history-control-v2/index.d.ts +4 -4
- package/lib/history-control-v2/index.js +97 -166
- package/lib/history-control-v2/index.js.map +1 -1
- package/lib/history-control-v2/style/css.js +0 -10
- package/lib/history-control-v2/style/css.js.map +1 -1
- package/lib/history-control-v2/style/index.js +0 -10
- package/lib/history-control-v2/style/index.js.map +1 -1
- package/lib/history-control-v2/style/index.less +437 -437
- package/lib/history-control-v2/utils.js +1 -21
- package/lib/history-control-v2/utils.js.map +1 -1
- package/lib/history-player/index.d.ts +1 -1
- package/lib/history-player/index.js +146 -205
- package/lib/history-player/index.js.map +1 -1
- package/lib/history-player/style/css.js +0 -3
- package/lib/history-player/style/css.js.map +1 -1
- package/lib/history-player/style/index.js +0 -3
- package/lib/history-player/style/index.js.map +1 -1
- package/lib/history-player/style/index.less +102 -102
- package/lib/hooks/useSettings.js +1 -6
- package/lib/hooks/useSettings.js.map +1 -1
- package/lib/icc/PlayerManager.js +26 -57
- package/lib/icc/PlayerManager.js.map +1 -1
- package/lib/icc/api.d.ts +0 -68
- package/lib/icc/api.js +2 -16
- package/lib/icc/api.js.map +1 -1
- package/lib/icons/index.d.ts +36 -36
- package/lib/icons/index.js +23 -171
- package/lib/icons/index.js.map +1 -1
- package/lib/icons/index.less +32 -32
- package/lib/index.js +0 -10
- package/lib/index.js.map +1 -1
- package/lib/live-channel-player/index.d.ts +1 -1
- package/lib/live-channel-player/index.js +31 -67
- package/lib/live-channel-player/index.js.map +1 -1
- package/lib/live-channel-player/style/css.js +0 -1
- package/lib/live-channel-player/style/css.js.map +1 -1
- package/lib/live-channel-player/style/index.js +0 -1
- package/lib/live-channel-player/style/index.js.map +1 -1
- package/lib/live-control/index.d.ts +2 -2
- package/lib/live-control/index.js +35 -86
- package/lib/live-control/index.js.map +1 -1
- package/lib/live-control/style/css.js +0 -4
- package/lib/live-control/style/css.js.map +1 -1
- package/lib/live-control/style/index.js +0 -4
- package/lib/live-control/style/index.js.map +1 -1
- package/lib/live-control/style/index.less +99 -99
- package/lib/live-control-v2/index.d.ts +3 -3
- package/lib/live-control-v2/index.js +108 -141
- package/lib/live-control-v2/index.js.map +1 -1
- package/lib/live-control-v2/style/css.js +0 -7
- package/lib/live-control-v2/style/css.js.map +1 -1
- package/lib/live-control-v2/style/index.js +0 -7
- package/lib/live-control-v2/style/index.js.map +1 -1
- package/lib/live-control-v2/style/index.less +192 -192
- package/lib/live-player/index.js +95 -136
- package/lib/live-player/index.js.map +1 -1
- package/lib/live-player/style/css.js +0 -2
- package/lib/live-player/style/css.js.map +1 -1
- package/lib/live-player/style/index.js +0 -2
- package/lib/live-player/style/index.js.map +1 -1
- package/lib/live-player/style/index.less +75 -75
- package/lib/player/index.d.ts +1 -1
- package/lib/player/index.js +79 -244
- package/lib/player/index.js.map +1 -1
- package/lib/rsl/PlayerManager.js +18 -64
- package/lib/rsl/PlayerManager.js.map +1 -1
- package/lib/typings/@vtx/utils/index.d.ts +28 -28
- package/lib/typings/h5player.d.ts +146 -146
- package/lib/typings/webrtcplayer.d.ts +56 -56
- package/lib/typings/wsplayer.d.ts +99 -99
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/index.js +12 -91
- package/lib/utils/index.js.map +1 -1
- package/lib/vite-env.d.ts +1 -1
- package/lib/vtxHls/PlayerManager.js +6 -20
- package/lib/vtxHls/PlayerManager.js.map +1 -1
- package/lib/vtxHls/WhepManager.js +9 -72
- package/lib/vtxHls/WhepManager.js.map +1 -1
- package/lib/webrtc/PlayerManager.js +28 -41
- package/lib/webrtc/PlayerManager.js.map +1 -1
- package/package.json +125 -125
|
@@ -1,188 +1,188 @@
|
|
|
1
|
-
.player-control-popover {
|
|
2
|
-
border-radius: 2px;
|
|
3
|
-
|
|
4
|
-
.ant-popover-content {
|
|
5
|
-
background: rgba(0 ,0 ,0 ,.75);
|
|
6
|
-
box-shadow: 0 2px 8px 1px rgba(0, 0, 0, .15);
|
|
7
|
-
|
|
8
|
-
.ant-popover-arrow-content {
|
|
9
|
-
background: rgba(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 , .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, .65);
|
|
52
|
-
cursor: pointer;
|
|
53
|
-
|
|
54
|
-
&:hover {
|
|
55
|
-
background-color: rgba(255 ,255 ,255,.25);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.vtx-player-speed-control {
|
|
65
|
-
line-height: 24px;
|
|
66
|
-
color: rgba(255, 255, 255 ,.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
|
-
font-size: 14px;
|
|
80
|
-
color: white;
|
|
81
|
-
padding-right: 5px;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.close {
|
|
85
|
-
margin-left: auto;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.cloud-control-panel {
|
|
90
|
-
position: absolute;
|
|
91
|
-
top: 0;
|
|
92
|
-
width: 100%;
|
|
93
|
-
height: calc(100% - 24px);
|
|
94
|
-
|
|
95
|
-
.arrow {
|
|
96
|
-
position: absolute;
|
|
97
|
-
cursor: pointer;
|
|
98
|
-
|
|
99
|
-
&.up {
|
|
100
|
-
top: 16px;
|
|
101
|
-
left: 50%;
|
|
102
|
-
transform: translateX(-50%) rotate(180deg);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
&.down {
|
|
106
|
-
bottom: 16px;
|
|
107
|
-
left: 50%;
|
|
108
|
-
transform: translateX(-50%);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
&.left {
|
|
112
|
-
top: 50%;
|
|
113
|
-
left: 16px;
|
|
114
|
-
transform: translateY(-50%) rotate(90deg);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
&.right {
|
|
118
|
-
top: 50%;
|
|
119
|
-
right: 16px;
|
|
120
|
-
transform: translateY(-50%) rotate(-90deg);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
&.left-up {
|
|
124
|
-
top: 16px;
|
|
125
|
-
left: 16px;
|
|
126
|
-
transform: rotate(135deg);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
&.left-down {
|
|
130
|
-
bottom: 16px;
|
|
131
|
-
left: 16px;
|
|
132
|
-
transform: rotate(45deg);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
&.right-up {
|
|
136
|
-
top: 16px;
|
|
137
|
-
right: 16px;
|
|
138
|
-
transform: rotate(225deg);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
&.right-down {
|
|
142
|
-
right: 16px;
|
|
143
|
-
bottom: 16px;
|
|
144
|
-
transform: rotate(-45deg);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.buttons {
|
|
149
|
-
position: absolute;
|
|
150
|
-
bottom: 80px;
|
|
151
|
-
left: 50%;
|
|
152
|
-
transform: translateX(-50%);
|
|
153
|
-
|
|
154
|
-
.control-button {
|
|
155
|
-
display: flex;
|
|
156
|
-
height: 32px;
|
|
157
|
-
line-height: 32px;
|
|
158
|
-
color: white;
|
|
159
|
-
cursor: default;
|
|
160
|
-
background-color: rgba(0 ,0 ,0,.35);
|
|
161
|
-
border: 1px solid rgba(0, 0 ,0 ,.15);
|
|
162
|
-
border-radius: 2px;
|
|
163
|
-
|
|
164
|
-
> span {
|
|
165
|
-
height: 100%;
|
|
166
|
-
padding: 0 8px;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.text {
|
|
170
|
-
height: 100%;
|
|
171
|
-
padding: 0 8px;
|
|
172
|
-
white-space: nowrap;
|
|
173
|
-
border-right: 1px solid rgba(0, 0 ,0 ,.15);
|
|
174
|
-
border-left: 1px solid rgba(0, 0 ,0 ,.15);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
.icon {
|
|
178
|
-
padding: 0 12px;
|
|
179
|
-
cursor: pointer;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.infoPanel {
|
|
186
|
-
position: absolute;
|
|
187
|
-
color: red;
|
|
188
|
-
}
|
|
1
|
+
.player-control-popover {
|
|
2
|
+
border-radius: 2px;
|
|
3
|
+
|
|
4
|
+
.ant-popover-content {
|
|
5
|
+
background: rgba(0 ,0 ,0 ,.75);
|
|
6
|
+
box-shadow: 0 2px 8px 1px rgba(0, 0, 0, .15);
|
|
7
|
+
|
|
8
|
+
.ant-popover-arrow-content {
|
|
9
|
+
background: rgba(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 , .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, .65);
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
|
|
54
|
+
&:hover {
|
|
55
|
+
background-color: rgba(255 ,255 ,255,.25);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.vtx-player-speed-control {
|
|
65
|
+
line-height: 24px;
|
|
66
|
+
color: rgba(255, 255, 255 ,.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
|
+
font-size: 14px;
|
|
80
|
+
color: white;
|
|
81
|
+
padding-right: 5px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.close {
|
|
85
|
+
margin-left: auto;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.cloud-control-panel {
|
|
90
|
+
position: absolute;
|
|
91
|
+
top: 0;
|
|
92
|
+
width: 100%;
|
|
93
|
+
height: calc(100% - 24px);
|
|
94
|
+
|
|
95
|
+
.arrow {
|
|
96
|
+
position: absolute;
|
|
97
|
+
cursor: pointer;
|
|
98
|
+
|
|
99
|
+
&.up {
|
|
100
|
+
top: 16px;
|
|
101
|
+
left: 50%;
|
|
102
|
+
transform: translateX(-50%) rotate(180deg);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&.down {
|
|
106
|
+
bottom: 16px;
|
|
107
|
+
left: 50%;
|
|
108
|
+
transform: translateX(-50%);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&.left {
|
|
112
|
+
top: 50%;
|
|
113
|
+
left: 16px;
|
|
114
|
+
transform: translateY(-50%) rotate(90deg);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
&.right {
|
|
118
|
+
top: 50%;
|
|
119
|
+
right: 16px;
|
|
120
|
+
transform: translateY(-50%) rotate(-90deg);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&.left-up {
|
|
124
|
+
top: 16px;
|
|
125
|
+
left: 16px;
|
|
126
|
+
transform: rotate(135deg);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&.left-down {
|
|
130
|
+
bottom: 16px;
|
|
131
|
+
left: 16px;
|
|
132
|
+
transform: rotate(45deg);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&.right-up {
|
|
136
|
+
top: 16px;
|
|
137
|
+
right: 16px;
|
|
138
|
+
transform: rotate(225deg);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
&.right-down {
|
|
142
|
+
right: 16px;
|
|
143
|
+
bottom: 16px;
|
|
144
|
+
transform: rotate(-45deg);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.buttons {
|
|
149
|
+
position: absolute;
|
|
150
|
+
bottom: 80px;
|
|
151
|
+
left: 50%;
|
|
152
|
+
transform: translateX(-50%);
|
|
153
|
+
|
|
154
|
+
.control-button {
|
|
155
|
+
display: flex;
|
|
156
|
+
height: 32px;
|
|
157
|
+
line-height: 32px;
|
|
158
|
+
color: white;
|
|
159
|
+
cursor: default;
|
|
160
|
+
background-color: rgba(0 ,0 ,0,.35);
|
|
161
|
+
border: 1px solid rgba(0, 0 ,0 ,.15);
|
|
162
|
+
border-radius: 2px;
|
|
163
|
+
|
|
164
|
+
> span {
|
|
165
|
+
height: 100%;
|
|
166
|
+
padding: 0 8px;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.text {
|
|
170
|
+
height: 100%;
|
|
171
|
+
padding: 0 8px;
|
|
172
|
+
white-space: nowrap;
|
|
173
|
+
border-right: 1px solid rgba(0, 0 ,0 ,.15);
|
|
174
|
+
border-left: 1px solid rgba(0, 0 ,0 ,.15);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.icon {
|
|
178
|
+
padding: 0 12px;
|
|
179
|
+
cursor: pointer;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.infoPanel {
|
|
186
|
+
position: absolute;
|
|
187
|
+
color: red;
|
|
188
|
+
}
|
|
@@ -4,19 +4,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
|
|
7
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
8
8
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
9
|
-
|
|
10
|
-
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); } }
|
|
11
|
-
|
|
9
|
+
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, _toPropertyKey(descriptor.key), descriptor); } }
|
|
12
10
|
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
|
-
|
|
11
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
12
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
14
13
|
/**
|
|
15
14
|
*/
|
|
16
15
|
var H264PlayerManager = /*#__PURE__*/function () {
|
|
17
16
|
function H264PlayerManager(opt) {
|
|
18
17
|
_classCallCheck(this, H264PlayerManager);
|
|
19
|
-
|
|
20
18
|
this.player = null;
|
|
21
19
|
this.id = opt.id;
|
|
22
20
|
this.url = opt.url;
|
|
@@ -25,8 +23,6 @@ var H264PlayerManager = /*#__PURE__*/function () {
|
|
|
25
23
|
/**
|
|
26
24
|
* 初始化实时预览播放器
|
|
27
25
|
*/
|
|
28
|
-
|
|
29
|
-
|
|
30
26
|
_createClass(H264PlayerManager, [{
|
|
31
27
|
key: "initPlayer",
|
|
32
28
|
value: function initPlayer(opt) {
|
|
@@ -43,7 +39,6 @@ var H264PlayerManager = /*#__PURE__*/function () {
|
|
|
43
39
|
if (!this.url) return;
|
|
44
40
|
xhr.open('GET', this.url, async);
|
|
45
41
|
xhr.responseType = 'arraybuffer';
|
|
46
|
-
|
|
47
42
|
xhr.onreadystatechange = function (event) {
|
|
48
43
|
if (xhr.readyState === 4) {
|
|
49
44
|
jmuxer.feed({
|
|
@@ -52,7 +47,6 @@ var H264PlayerManager = /*#__PURE__*/function () {
|
|
|
52
47
|
this.player = jmuxer;
|
|
53
48
|
}
|
|
54
49
|
};
|
|
55
|
-
|
|
56
50
|
xhr.send(null);
|
|
57
51
|
}
|
|
58
52
|
}, {
|
|
@@ -64,25 +58,24 @@ var H264PlayerManager = /*#__PURE__*/function () {
|
|
|
64
58
|
* 录像暂停后播放
|
|
65
59
|
* 只有暂停后的录像调用才有效
|
|
66
60
|
*/
|
|
67
|
-
|
|
68
61
|
}, {
|
|
69
62
|
key: "play",
|
|
70
|
-
value: function play() {
|
|
63
|
+
value: function play() {
|
|
64
|
+
//
|
|
71
65
|
}
|
|
72
66
|
/**
|
|
73
67
|
* 倍速播放
|
|
74
68
|
* @param {number} speed 速率 0.125 0.25 0.5 1 2 4 8 共7种速率
|
|
75
69
|
*/
|
|
76
|
-
|
|
77
70
|
}, {
|
|
78
71
|
key: "playSpeed",
|
|
79
|
-
value: function playSpeed(speed) {
|
|
72
|
+
value: function playSpeed(speed) {
|
|
73
|
+
// this.recordPlayer && this.recordPlayer.playSpeed(speed);
|
|
80
74
|
}
|
|
81
75
|
/**
|
|
82
76
|
* 关闭播放器
|
|
83
77
|
* @param {number} index 可选,关闭指定索引的窗口的播放器,不传则表示关闭所有播放器
|
|
84
78
|
*/
|
|
85
|
-
|
|
86
79
|
}, {
|
|
87
80
|
key: "close",
|
|
88
81
|
value: function close() {
|
|
@@ -91,52 +84,50 @@ var H264PlayerManager = /*#__PURE__*/function () {
|
|
|
91
84
|
/**
|
|
92
85
|
* 设置全屏
|
|
93
86
|
*/
|
|
94
|
-
|
|
95
87
|
}, {
|
|
96
88
|
key: "setFullScreen",
|
|
97
|
-
value: function setFullScreen() {
|
|
89
|
+
value: function setFullScreen() {
|
|
90
|
+
// this.player.setFullScreen();
|
|
98
91
|
}
|
|
99
92
|
/**
|
|
100
93
|
* 设置窗口自适应还是拉伸
|
|
101
94
|
* @param {string} playerAdapter selfAdaption 自适应 | stretching 拉伸
|
|
102
95
|
*/
|
|
103
|
-
|
|
104
96
|
}, {
|
|
105
97
|
key: "setPlayerAdapter",
|
|
106
|
-
value: function setPlayerAdapter(playerAdapter) {
|
|
98
|
+
value: function setPlayerAdapter(playerAdapter) {
|
|
99
|
+
// this.player.setPlayerAdapter(playerAdapter);
|
|
107
100
|
}
|
|
108
101
|
/**
|
|
109
102
|
* 控制视频播放器显示的路数: 1 4 9 16 25,不会超过最大显示路数
|
|
110
103
|
* @param {number} number
|
|
111
104
|
*/
|
|
112
|
-
|
|
113
105
|
}, {
|
|
114
106
|
key: "setPlayerNum",
|
|
115
|
-
value: function setPlayerNum(number) {
|
|
107
|
+
value: function setPlayerNum(number) {
|
|
108
|
+
// this.player.setPlayerNum(number);
|
|
116
109
|
}
|
|
117
110
|
/**
|
|
118
111
|
* 设置选中的播放器的索引
|
|
119
112
|
* @param {number} index
|
|
120
113
|
*/
|
|
121
|
-
|
|
122
114
|
}, {
|
|
123
115
|
key: "setSelectIndex",
|
|
124
|
-
value: function setSelectIndex(index) {
|
|
116
|
+
value: function setSelectIndex(index) {
|
|
117
|
+
// this.player.setSelectIndex(index);
|
|
125
118
|
}
|
|
126
119
|
/**
|
|
127
120
|
* 录像跳转播放
|
|
128
121
|
* @param {string} time HH:mm:ss格式
|
|
129
122
|
*/
|
|
130
|
-
|
|
131
123
|
}, {
|
|
132
124
|
key: "jumpPlayByTime",
|
|
133
|
-
value: function jumpPlayByTime(time) {
|
|
125
|
+
value: function jumpPlayByTime(time) {
|
|
126
|
+
// this.player.jumpPlayByTime(time);
|
|
134
127
|
}
|
|
135
128
|
}]);
|
|
136
|
-
|
|
137
129
|
return H264PlayerManager;
|
|
138
130
|
}();
|
|
139
|
-
|
|
140
131
|
var _default = H264PlayerManager;
|
|
141
132
|
exports["default"] = _default;
|
|
142
133
|
//# sourceMappingURL=PlayerManager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlayerManager.js","names":["H264PlayerManager","opt","player","id","url","initPlayer","jmuxer","JMuxer","node","mode","flushingTime","fps","clearBuffer","debug","xhr","XMLHttpRequest","async","open","responseType","onreadystatechange","event","readyState","feed","video","Uint8Array","response","send","recordPlayer","
|
|
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,IAAIN,GAAG,CAACO,UAAU,KAAK,CAAC,EAAE;UACtBf,MAAM,CAACgB,IAAI,CAAC;YACRC,KAAK,EAAE,IAAIC,UAAU,CAACV,GAAG,CAACW,QAAQ;UACtC,CAAC,CAAC;UACF,IAAI,CAAC1B,MAAM,GAAGO,MAAM;QACxB;MACJ,CAAC;MACDQ,GAAG,CAACY,IAAI,CAAC,IAAI,CAAC;IAClB;EAAC;IAAAtB,GAAA;IAAAC,KAAA,EACD,SAAAsB,MAAA,EAAQ;MACJ,IAAI,CAACC,YAAY,IAAI,IAAI,CAAC7B,MAAM,CAAC4B,KAAK,CAAC,CAAC;IAC5C;IACA;AACJ;AACA;AACA;EAHI;IAAAvB,GAAA;IAAAC,KAAA,EAIA,SAAAwB,KAAA,EAAO;MACH;IAAA;IAEJ;AACJ;AACA;AACA;EAHI;IAAAzB,GAAA;IAAAC,KAAA,EAIA,SAAAyB,UAAUC,KAAK,EAAE;MACb;IAAA;IAEJ;AACJ;AACA;AACA;EAHI;IAAA3B,GAAA;IAAAC,KAAA,EAIA,SAAA2B,MAAA,EAAQ;MACJ,IAAI,CAACjC,MAAM,IAAI,IAAI,CAACA,MAAM,CAACkC,OAAO,CAAC,CAAC;IACxC;IACA;AACJ;AACA;EAFI;IAAA7B,GAAA;IAAAC,KAAA,EAGA,SAAA6B,cAAA,EAAgB;MACZ;IAAA;IAEJ;AACJ;AACA;AACA;EAHI;IAAA9B,GAAA;IAAAC,KAAA,EAIA,SAAA8B,iBAAiBC,aAAa,EAAE;MAC5B;IAAA;IAEJ;AACJ;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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { GetHistoryUrlParams } from '../api/types';
|
|
3
|
-
export
|
|
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
|
|
28
|
+
export type UrlsTableItemType = {
|
|
29
29
|
/** 序号 */
|
|
30
30
|
index: number;
|
|
31
31
|
/** 设备名称 */
|