@vtx/player 1.7.14 → 1.7.16
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 +91 -62
- package/lib/api/fetch.js.map +1 -1
- package/lib/api/index.js +63 -18
- package/lib/api/index.js.map +1 -1
- package/lib/api/types.d.ts +5 -5
- package/lib/bd/PlayerManager.js +68 -38
- package/lib/bd/PlayerManager.js.map +1 -1
- package/lib/bill-player/index.d.ts +1 -1
- package/lib/bill-player/index.js +121 -66
- package/lib/bill-player/index.js.map +1 -1
- package/lib/bill-player/style/css.js +9 -0
- package/lib/bill-player/style/css.js.map +1 -1
- package/lib/bill-player/style/index.js +9 -0
- 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 +34 -6
- 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 +14 -3
- 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 +38 -10
- 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 +9 -2
- 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 +4 -0
- package/lib/context/index.js.map +1 -1
- package/lib/controls/index.d.ts +11 -11
- package/lib/controls/index.js +99 -34
- package/lib/controls/index.js.map +1 -1
- package/lib/controls/style/css.js +5 -0
- package/lib/controls/style/css.js.map +1 -1
- package/lib/controls/style/index.js +5 -0
- package/lib/controls/style/index.js.map +1 -1
- package/lib/controls/style/index.less +188 -188
- package/lib/h264/PlayerManager.js +27 -18
- package/lib/h264/PlayerManager.js.map +1 -1
- package/lib/history-control/index.d.ts +2 -2
- package/lib/history-control/index.js +121 -61
- package/lib/history-control/index.js.map +1 -1
- package/lib/history-control/style/css.js +6 -0
- package/lib/history-control/style/css.js.map +1 -1
- package/lib/history-control/style/index.js +6 -0
- 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 +79 -38
- package/lib/history-control-v2/components/grid-item/index.js.map +1 -1
- package/lib/history-control-v2/components/panel/index.js +114 -44
- package/lib/history-control-v2/components/panel/index.js.map +1 -1
- package/lib/history-control-v2/context.js +2 -0
- 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 +166 -97
- package/lib/history-control-v2/index.js.map +1 -1
- package/lib/history-control-v2/style/css.js +10 -0
- package/lib/history-control-v2/style/css.js.map +1 -1
- package/lib/history-control-v2/style/index.js +10 -0
- 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 +21 -1
- package/lib/history-control-v2/utils.js.map +1 -1
- package/lib/history-player/index.d.ts +3 -3
- package/lib/history-player/index.js +210 -146
- package/lib/history-player/index.js.map +1 -1
- package/lib/history-player/style/css.js +3 -0
- package/lib/history-player/style/css.js.map +1 -1
- package/lib/history-player/style/index.js +3 -0
- package/lib/history-player/style/index.js.map +1 -1
- package/lib/history-player/style/index.less +102 -102
- package/lib/hooks/useSettings.js +6 -1
- package/lib/hooks/useSettings.js.map +1 -1
- package/lib/icc/PlayerManager.js +57 -26
- package/lib/icc/PlayerManager.js.map +1 -1
- package/lib/icc/api.d.ts +68 -0
- package/lib/icc/api.js +16 -2
- package/lib/icc/api.js.map +1 -1
- package/lib/icons/index.d.ts +36 -36
- package/lib/icons/index.js +171 -23
- package/lib/icons/index.js.map +1 -1
- package/lib/icons/index.less +32 -32
- package/lib/index.js +10 -0
- package/lib/index.js.map +1 -1
- package/lib/live-channel-player/index.d.ts +1 -1
- package/lib/live-channel-player/index.js +67 -31
- package/lib/live-channel-player/index.js.map +1 -1
- package/lib/live-channel-player/style/css.js +1 -0
- package/lib/live-channel-player/style/css.js.map +1 -1
- package/lib/live-channel-player/style/index.js +1 -0
- 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 +86 -35
- package/lib/live-control/index.js.map +1 -1
- package/lib/live-control/style/css.js +4 -0
- package/lib/live-control/style/css.js.map +1 -1
- package/lib/live-control/style/index.js +4 -0
- 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 +153 -65
- package/lib/live-control-v2/index.js.map +1 -1
- package/lib/live-control-v2/style/css.js +7 -0
- package/lib/live-control-v2/style/css.js.map +1 -1
- package/lib/live-control-v2/style/index.js +7 -0
- 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 +136 -95
- package/lib/live-player/index.js.map +1 -1
- package/lib/live-player/style/css.js +2 -0
- package/lib/live-player/style/css.js.map +1 -1
- package/lib/live-player/style/index.js +2 -0
- 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 +243 -78
- package/lib/player/index.js.map +1 -1
- package/lib/rsl/PlayerManager.js +64 -18
- 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 +91 -12
- package/lib/utils/index.js.map +1 -1
- package/lib/vite-env.d.ts +1 -1
- package/lib/vtxHls/PlayerManager.js +20 -6
- package/lib/vtxHls/PlayerManager.js.map +1 -1
- package/lib/vtxHls/WhepManager.js +72 -9
- package/lib/vtxHls/WhepManager.js.map +1 -1
- package/lib/webrtc/PlayerManager.js +41 -28
- package/lib/webrtc/PlayerManager.js.map +1 -1
- package/package.json +124 -124
|
@@ -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,17 +4,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
9
|
-
|
|
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
|
+
|
|
10
12
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
11
|
-
|
|
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); }
|
|
13
|
+
|
|
13
14
|
/**
|
|
14
15
|
*/
|
|
15
16
|
var H264PlayerManager = /*#__PURE__*/function () {
|
|
16
17
|
function H264PlayerManager(opt) {
|
|
17
18
|
_classCallCheck(this, H264PlayerManager);
|
|
19
|
+
|
|
18
20
|
this.player = null;
|
|
19
21
|
this.id = opt.id;
|
|
20
22
|
this.url = opt.url;
|
|
@@ -23,6 +25,8 @@ var H264PlayerManager = /*#__PURE__*/function () {
|
|
|
23
25
|
/**
|
|
24
26
|
* 初始化实时预览播放器
|
|
25
27
|
*/
|
|
28
|
+
|
|
29
|
+
|
|
26
30
|
_createClass(H264PlayerManager, [{
|
|
27
31
|
key: "initPlayer",
|
|
28
32
|
value: function initPlayer(opt) {
|
|
@@ -39,6 +43,7 @@ var H264PlayerManager = /*#__PURE__*/function () {
|
|
|
39
43
|
if (!this.url) return;
|
|
40
44
|
xhr.open('GET', this.url, async);
|
|
41
45
|
xhr.responseType = 'arraybuffer';
|
|
46
|
+
|
|
42
47
|
xhr.onreadystatechange = function (event) {
|
|
43
48
|
if (xhr.readyState === 4) {
|
|
44
49
|
jmuxer.feed({
|
|
@@ -47,6 +52,7 @@ var H264PlayerManager = /*#__PURE__*/function () {
|
|
|
47
52
|
this.player = jmuxer;
|
|
48
53
|
}
|
|
49
54
|
};
|
|
55
|
+
|
|
50
56
|
xhr.send(null);
|
|
51
57
|
}
|
|
52
58
|
}, {
|
|
@@ -58,24 +64,25 @@ var H264PlayerManager = /*#__PURE__*/function () {
|
|
|
58
64
|
* 录像暂停后播放
|
|
59
65
|
* 只有暂停后的录像调用才有效
|
|
60
66
|
*/
|
|
67
|
+
|
|
61
68
|
}, {
|
|
62
69
|
key: "play",
|
|
63
|
-
value: function play() {
|
|
64
|
-
//
|
|
70
|
+
value: function play() {//
|
|
65
71
|
}
|
|
66
72
|
/**
|
|
67
73
|
* 倍速播放
|
|
68
74
|
* @param {number} speed 速率 0.125 0.25 0.5 1 2 4 8 共7种速率
|
|
69
75
|
*/
|
|
76
|
+
|
|
70
77
|
}, {
|
|
71
78
|
key: "playSpeed",
|
|
72
|
-
value: function playSpeed(speed) {
|
|
73
|
-
// this.recordPlayer && this.recordPlayer.playSpeed(speed);
|
|
79
|
+
value: function playSpeed(speed) {// this.recordPlayer && this.recordPlayer.playSpeed(speed);
|
|
74
80
|
}
|
|
75
81
|
/**
|
|
76
82
|
* 关闭播放器
|
|
77
83
|
* @param {number} index 可选,关闭指定索引的窗口的播放器,不传则表示关闭所有播放器
|
|
78
84
|
*/
|
|
85
|
+
|
|
79
86
|
}, {
|
|
80
87
|
key: "close",
|
|
81
88
|
value: function close() {
|
|
@@ -84,50 +91,52 @@ var H264PlayerManager = /*#__PURE__*/function () {
|
|
|
84
91
|
/**
|
|
85
92
|
* 设置全屏
|
|
86
93
|
*/
|
|
94
|
+
|
|
87
95
|
}, {
|
|
88
96
|
key: "setFullScreen",
|
|
89
|
-
value: function setFullScreen() {
|
|
90
|
-
// this.player.setFullScreen();
|
|
97
|
+
value: function setFullScreen() {// this.player.setFullScreen();
|
|
91
98
|
}
|
|
92
99
|
/**
|
|
93
100
|
* 设置窗口自适应还是拉伸
|
|
94
101
|
* @param {string} playerAdapter selfAdaption 自适应 | stretching 拉伸
|
|
95
102
|
*/
|
|
103
|
+
|
|
96
104
|
}, {
|
|
97
105
|
key: "setPlayerAdapter",
|
|
98
|
-
value: function setPlayerAdapter(playerAdapter) {
|
|
99
|
-
// this.player.setPlayerAdapter(playerAdapter);
|
|
106
|
+
value: function setPlayerAdapter(playerAdapter) {// this.player.setPlayerAdapter(playerAdapter);
|
|
100
107
|
}
|
|
101
108
|
/**
|
|
102
109
|
* 控制视频播放器显示的路数: 1 4 9 16 25,不会超过最大显示路数
|
|
103
110
|
* @param {number} number
|
|
104
111
|
*/
|
|
112
|
+
|
|
105
113
|
}, {
|
|
106
114
|
key: "setPlayerNum",
|
|
107
|
-
value: function setPlayerNum(number) {
|
|
108
|
-
// this.player.setPlayerNum(number);
|
|
115
|
+
value: function setPlayerNum(number) {// this.player.setPlayerNum(number);
|
|
109
116
|
}
|
|
110
117
|
/**
|
|
111
118
|
* 设置选中的播放器的索引
|
|
112
119
|
* @param {number} index
|
|
113
120
|
*/
|
|
121
|
+
|
|
114
122
|
}, {
|
|
115
123
|
key: "setSelectIndex",
|
|
116
|
-
value: function setSelectIndex(index) {
|
|
117
|
-
// this.player.setSelectIndex(index);
|
|
124
|
+
value: function setSelectIndex(index) {// this.player.setSelectIndex(index);
|
|
118
125
|
}
|
|
119
126
|
/**
|
|
120
127
|
* 录像跳转播放
|
|
121
128
|
* @param {string} time HH:mm:ss格式
|
|
122
129
|
*/
|
|
130
|
+
|
|
123
131
|
}, {
|
|
124
132
|
key: "jumpPlayByTime",
|
|
125
|
-
value: function jumpPlayByTime(time) {
|
|
126
|
-
// this.player.jumpPlayByTime(time);
|
|
133
|
+
value: function jumpPlayByTime(time) {// this.player.jumpPlayByTime(time);
|
|
127
134
|
}
|
|
128
135
|
}]);
|
|
136
|
+
|
|
129
137
|
return H264PlayerManager;
|
|
130
138
|
}();
|
|
139
|
+
|
|
131
140
|
var _default = H264PlayerManager;
|
|
132
141
|
exports["default"] = _default;
|
|
133
142
|
//# sourceMappingURL=PlayerManager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlayerManager.js","names":["H264PlayerManager","opt","
|
|
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","pause","speed","destroy","playerAdapter","number","index","time"],"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;IACMA,iB;EACF,2BAAYC,GAAZ,EAAiB;IAAA;;IACb,KAAKC,MAAL,GAAc,IAAd;IACA,KAAKC,EAAL,GAAUF,GAAG,CAACE,EAAd;IACA,KAAKC,GAAL,GAAWH,GAAG,CAACG,GAAf;IACA,KAAKC,UAAL;EACH;EACD;AACJ;AACA;;;;;WACI,oBAAWJ,GAAX,EAAgB;MACZ,IAAMK,MAAM,GAAG,IAAIC,MAAJ,CAAW;QACtBC,IAAI,EAAE,YADgB;QAEtBC,IAAI,EAAE,OAFgB;QAGtBC,YAAY,EAAE,IAHQ;QAItBC,GAAG,EAAE,EAJiB;QAKtBC,WAAW,EAAE,KALS;QAMtBC,KAAK,EAAE;MANe,CAAX,CAAf;MAQA,IAAIC,GAAG,GAAG,IAAIC,cAAJ,EAAV;MACA,IAAIC,KAAK,GAAG,IAAZ;MACA,IAAI,CAAC,KAAKZ,GAAV,EACI;MACJU,GAAG,CAACG,IAAJ,CAAS,KAAT,EAAgB,KAAKb,GAArB,EAA0BY,KAA1B;MACAF,GAAG,CAACI,YAAJ,GAAmB,aAAnB;;MACAJ,GAAG,CAACK,kBAAJ,GAAyB,UAAUC,KAAV,EAAiB;QACtC,IAAIN,GAAG,CAACO,UAAJ,KAAmB,CAAvB,EAA0B;UACtBf,MAAM,CAACgB,IAAP,CAAY;YACRC,KAAK,EAAE,IAAIC,UAAJ,CAAeV,GAAG,CAACW,QAAnB;UADC,CAAZ;UAGA,KAAKvB,MAAL,GAAcI,MAAd;QACH;MACJ,CAPD;;MAQAQ,GAAG,CAACY,IAAJ,CAAS,IAAT;IACH;;;WACD,iBAAQ;MACJ,KAAKC,YAAL,IAAqB,KAAKzB,MAAL,CAAY0B,KAAZ,EAArB;IACH;IACD;AACJ;AACA;AACA;;;;WACI,gBAAO,CACH;IACH;IACD;AACJ;AACA;AACA;;;;WACI,mBAAUC,KAAV,EAAiB,CACb;IACH;IACD;AACJ;AACA;AACA;;;;WACI,iBAAQ;MACJ,KAAK3B,MAAL,IAAe,KAAKA,MAAL,CAAY4B,OAAZ,EAAf;IACH;IACD;AACJ;AACA;;;;WACI,yBAAgB,CACZ;IACH;IACD;AACJ;AACA;AACA;;;;WACI,0BAAiBC,aAAjB,EAAgC,CAC5B;IACH;IACD;AACJ;AACA;AACA;;;;WACI,sBAAaC,MAAb,EAAqB,CACjB;IACH;IACD;AACJ;AACA;AACA;;;;WACI,wBAAeC,KAAf,EAAsB,CAClB;IACH;IACD;AACJ;AACA;AACA;;;;WACI,wBAAeC,IAAf,EAAqB,CACjB;IACH;;;;;;eAEUlC,iB"}
|
|
@@ -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
|
/** 设备名称 */
|