@vtx/player 1.8.5 → 1.8.7
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 +69 -67
- package/lib/api/fetch.js.map +1 -1
- package/lib/api/index.js +47 -34
- package/lib/api/index.js.map +1 -1
- package/lib/api/types.d.ts +8 -6
- package/lib/api/types.js +1 -0
- package/lib/api/types.js.map +1 -1
- package/lib/bd/PlayerManager.js +7 -8
- package/lib/bd/PlayerManager.js.map +1 -1
- package/lib/bill-player/index.d.ts +1 -1
- package/lib/bill-player/index.js +15 -11
- package/lib/bill-player/index.js.map +1 -1
- package/lib/bill-player/style/index.less +320 -320
- package/lib/components/set-tag-video/index.js +8 -7
- package/lib/components/set-tag-video/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 +5 -3
- package/lib/components/split-screen/index.js.map +1 -1
- package/lib/components/tag-video/index.js +11 -10
- package/lib/components/tag-video/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 +3 -2
- package/lib/components/video-scale/index.js.map +1 -1
- package/lib/config.js +2 -1
- package/lib/config.js.map +1 -1
- package/lib/context/index.js +5 -3
- package/lib/context/index.js.map +1 -1
- package/lib/controls/index.d.ts +11 -11
- package/lib/controls/index.js +22 -14
- package/lib/controls/index.js.map +1 -1
- package/lib/controls/style/index.less +192 -192
- package/lib/h264/PlayerManager.js +7 -8
- package/lib/h264/PlayerManager.js.map +1 -1
- package/lib/history-control/index.d.ts +2 -2
- package/lib/history-control/index.js +10 -8
- package/lib/history-control/index.js.map +1 -1
- package/lib/history-control/style/index.less +252 -252
- package/lib/history-control-v2/components/grid-item/index.js +11 -10
- package/lib/history-control-v2/components/grid-item/index.js.map +1 -1
- package/lib/history-control-v2/components/panel/VideoTable.d.ts +1 -1
- package/lib/history-control-v2/components/panel/VideoTable.js +54 -51
- package/lib/history-control-v2/components/panel/VideoTable.js.map +1 -1
- package/lib/history-control-v2/components/panel/index.js +10 -8
- package/lib/history-control-v2/components/panel/index.js.map +1 -1
- package/lib/history-control-v2/context.js +2 -1
- 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 +75 -71
- package/lib/history-control-v2/index.js.map +1 -1
- package/lib/history-control-v2/style/index.less +437 -437
- package/lib/history-control-v2/utils.js +18 -12
- 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 +110 -107
- package/lib/history-player/index.js.map +1 -1
- package/lib/history-player/style/index.less +102 -102
- package/lib/hooks/useSettings.js +2 -1
- package/lib/hooks/useSettings.js.map +1 -1
- package/lib/icc/PlayerManager.js +8 -9
- package/lib/icc/PlayerManager.js.map +1 -1
- package/lib/icc/api.d.ts +68 -0
- package/lib/icc/api.js +3 -2
- package/lib/icc/api.js.map +1 -1
- package/lib/icons/index.d.ts +36 -36
- package/lib/icons/index.js +73 -37
- package/lib/icons/index.js.map +1 -1
- package/lib/icons/index.less +32 -32
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/live-channel-player/index.d.ts +1 -1
- package/lib/live-channel-player/index.js +32 -29
- package/lib/live-channel-player/index.js.map +1 -1
- package/lib/live-control/index.d.ts +2 -2
- package/lib/live-control/index.js +13 -12
- package/lib/live-control/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 +25 -20
- package/lib/live-control-v2/index.js.map +1 -1
- package/lib/live-control-v2/style/index.less +192 -192
- package/lib/live-player/index.d.ts +2 -0
- package/lib/live-player/index.js +70 -64
- package/lib/live-player/index.js.map +1 -1
- package/lib/live-player/style/index.less +75 -75
- package/lib/mpegts/PlayerManager.js +7 -8
- package/lib/mpegts/PlayerManager.js.map +1 -1
- package/lib/player/index.d.ts +1 -1
- package/lib/player/index.js +53 -57
- package/lib/player/index.js.map +1 -1
- package/lib/rsl/PlayerManager.d.ts +1 -1
- package/lib/rsl/PlayerManager.js +7 -8
- package/lib/rsl/PlayerManager.js.map +1 -1
- package/lib/typings/@vtx/utils/index.d.ts +28 -28
- package/lib/typings/h5player.d.ts +150 -150
- package/lib/typings/mpegts.d.ts +7 -7
- 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 +23 -14
- package/lib/utils/index.js.map +1 -1
- package/lib/vite-env.d.ts +1 -1
- package/lib/vtxHls/PlayerManager.js +7 -8
- package/lib/vtxHls/PlayerManager.js.map +1 -1
- package/lib/vtxHls/WhepManager.js +10 -11
- package/lib/vtxHls/WhepManager.js.map +1 -1
- package/lib/webrtc/PlayerManager.js +7 -8
- package/lib/webrtc/PlayerManager.js.map +1 -1
- package/package.json +125 -125
|
@@ -1,192 +1,192 @@
|
|
|
1
|
-
.vtx-live-control-v2 {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
|
|
5
|
-
.player-grid-container {
|
|
6
|
-
display: grid;
|
|
7
|
-
flex-grow: 1;
|
|
8
|
-
grid-gap: 1px;
|
|
9
|
-
height: 0;
|
|
10
|
-
background-color: rgba(0, 0, 0, 0.8);
|
|
11
|
-
|
|
12
|
-
&._1 {
|
|
13
|
-
grid-template-rows: 1fr;
|
|
14
|
-
grid-template-columns: 1fr;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
&._4 {
|
|
18
|
-
grid-template-rows: 1fr 1fr;
|
|
19
|
-
grid-template-columns: 1fr 1fr;
|
|
20
|
-
}
|
|
21
|
-
&._9 {
|
|
22
|
-
grid-template-rows: 1fr 1fr 1fr;
|
|
23
|
-
grid-template-columns: 1fr 1fr 1fr;
|
|
24
|
-
}
|
|
25
|
-
&._16 {
|
|
26
|
-
grid-template-rows: 1fr 1fr 1fr 1fr;
|
|
27
|
-
grid-template-columns: 1fr 1fr 1fr 1fr;
|
|
28
|
-
}
|
|
29
|
-
&._25 {
|
|
30
|
-
grid-template-rows: 1fr 1fr 1fr 1fr 1fr;
|
|
31
|
-
grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
|
|
32
|
-
}
|
|
33
|
-
&._6 {
|
|
34
|
-
grid-template-rows: 1fr 1fr 1fr;
|
|
35
|
-
grid-template-columns: 1fr 1fr 1fr;
|
|
36
|
-
:nth-child(1) {
|
|
37
|
-
grid-column-start: 1;
|
|
38
|
-
grid-column-end: 3;
|
|
39
|
-
grid-row-start: 1;
|
|
40
|
-
grid-row-end: 3;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
&._8 {
|
|
44
|
-
grid-template-rows: 1fr 1fr 1fr 1fr;
|
|
45
|
-
grid-template-columns: 1fr 1fr 1fr 1fr;
|
|
46
|
-
:nth-child(1) {
|
|
47
|
-
grid-column-start: 1;
|
|
48
|
-
grid-column-end: 4;
|
|
49
|
-
grid-row-start: 1;
|
|
50
|
-
grid-row-end: 4;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
&._10 {
|
|
54
|
-
grid-template-rows: 1fr 1fr 1fr 1fr 1fr;
|
|
55
|
-
grid-template-columns: 1fr 1fr 1fr;
|
|
56
|
-
:nth-child(1) {
|
|
57
|
-
grid-column-start: 1;
|
|
58
|
-
grid-column-end: 3;
|
|
59
|
-
grid-row-start: 1;
|
|
60
|
-
grid-row-end: 4;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
&._13 {
|
|
64
|
-
grid-template-rows: 1fr 1fr 1fr 1fr;
|
|
65
|
-
grid-template-columns: 1fr 1fr 1fr 1fr;
|
|
66
|
-
:nth-child(1) {
|
|
67
|
-
grid-column-start: 1;
|
|
68
|
-
grid-column-end: 3;
|
|
69
|
-
grid-row-start: 1;
|
|
70
|
-
grid-row-end: 3;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
&._14 {
|
|
74
|
-
grid-template-rows: 1fr 1fr 1fr 1fr 1fr;
|
|
75
|
-
grid-template-columns: 1fr 1fr 1fr 1fr;
|
|
76
|
-
:nth-child(1) {
|
|
77
|
-
grid-column-start: 1;
|
|
78
|
-
grid-column-end: 3;
|
|
79
|
-
grid-row-start: 1;
|
|
80
|
-
grid-row-end: 4;
|
|
81
|
-
}
|
|
82
|
-
:nth-child(2) {
|
|
83
|
-
grid-column-start: 3;
|
|
84
|
-
grid-column-end: 5;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
&._17 {
|
|
88
|
-
grid-template-rows: 1fr 1fr 1fr 1fr 1fr;
|
|
89
|
-
grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
|
|
90
|
-
:nth-child(1) {
|
|
91
|
-
grid-column-start: 1;
|
|
92
|
-
grid-column-end: 4;
|
|
93
|
-
grid-row-start: 1;
|
|
94
|
-
grid-row-end: 4;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
&._22 {
|
|
98
|
-
grid-template-rows: 1fr 1fr 1fr 1fr 1fr;
|
|
99
|
-
grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
|
|
100
|
-
:nth-child(1) {
|
|
101
|
-
grid-column-start: 1;
|
|
102
|
-
grid-column-end: 3;
|
|
103
|
-
grid-row-start: 1;
|
|
104
|
-
grid-row-end: 3;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
.grid-item-container {
|
|
108
|
-
display: flex;
|
|
109
|
-
flex-direction: column;
|
|
110
|
-
min-width: 0;
|
|
111
|
-
min-height: 0;
|
|
112
|
-
background-color: #2b3d51;
|
|
113
|
-
align-items: center;
|
|
114
|
-
&.emptyImg {
|
|
115
|
-
background-image: url('../images/empty.png');
|
|
116
|
-
background-repeat: no-repeat;
|
|
117
|
-
background-position: center;
|
|
118
|
-
}
|
|
119
|
-
&.active {
|
|
120
|
-
box-shadow: 0 0 0 1px #52c41a;
|
|
121
|
-
}
|
|
122
|
-
> .content {
|
|
123
|
-
width: 100%;
|
|
124
|
-
height: calc(100% - 26px);
|
|
125
|
-
display: flex;
|
|
126
|
-
align-items: center;
|
|
127
|
-
justify-content: center;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.bottom-controls {
|
|
133
|
-
display: flex;
|
|
134
|
-
align-items: center;
|
|
135
|
-
width: 100%;
|
|
136
|
-
height: 33px;
|
|
137
|
-
padding: 0 12px;
|
|
138
|
-
background-color: #243241;
|
|
139
|
-
|
|
140
|
-
.right {
|
|
141
|
-
margin-left: auto;
|
|
142
|
-
|
|
143
|
-
> div {
|
|
144
|
-
height: 24px;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
.split-line {
|
|
148
|
-
margin-top: 6px;
|
|
149
|
-
width: 1px;
|
|
150
|
-
background-color: rgba(255, 255, 255, 0.1);
|
|
151
|
-
height: 14px;
|
|
152
|
-
}
|
|
153
|
-
.controls-icon-hover {
|
|
154
|
-
color: rgba(255, 255, 255, 0.65);
|
|
155
|
-
display: flex;
|
|
156
|
-
align-items: center;
|
|
157
|
-
padding-top: 2px;
|
|
158
|
-
.hover-hide {
|
|
159
|
-
display: inline-block;
|
|
160
|
-
vertical-align: 0.1em;
|
|
161
|
-
font-size: 12px;
|
|
162
|
-
}
|
|
163
|
-
.hover-show {
|
|
164
|
-
display: none;
|
|
165
|
-
vertical-align: 0.1em;
|
|
166
|
-
font-size: 12px;
|
|
167
|
-
}
|
|
168
|
-
&:hover {
|
|
169
|
-
.hover-hide {
|
|
170
|
-
display: none;
|
|
171
|
-
}
|
|
172
|
-
.hover-show {
|
|
173
|
-
display: inline-block;
|
|
174
|
-
color: #1890ff;
|
|
175
|
-
vertical-align: 0.2em;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
.grid-change-disable {
|
|
180
|
-
color: rgba(255, 255, 255, 0.65);
|
|
181
|
-
display: flex;
|
|
182
|
-
align-items: center;
|
|
183
|
-
padding-top: 2px;
|
|
184
|
-
cursor: not-allowed;
|
|
185
|
-
.arrow {
|
|
186
|
-
display: inline-block;
|
|
187
|
-
vertical-align: 0.1em;
|
|
188
|
-
font-size: 12px;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
}
|
|
1
|
+
.vtx-live-control-v2 {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
|
|
5
|
+
.player-grid-container {
|
|
6
|
+
display: grid;
|
|
7
|
+
flex-grow: 1;
|
|
8
|
+
grid-gap: 1px;
|
|
9
|
+
height: 0;
|
|
10
|
+
background-color: rgba(0, 0, 0, 0.8);
|
|
11
|
+
|
|
12
|
+
&._1 {
|
|
13
|
+
grid-template-rows: 1fr;
|
|
14
|
+
grid-template-columns: 1fr;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&._4 {
|
|
18
|
+
grid-template-rows: 1fr 1fr;
|
|
19
|
+
grid-template-columns: 1fr 1fr;
|
|
20
|
+
}
|
|
21
|
+
&._9 {
|
|
22
|
+
grid-template-rows: 1fr 1fr 1fr;
|
|
23
|
+
grid-template-columns: 1fr 1fr 1fr;
|
|
24
|
+
}
|
|
25
|
+
&._16 {
|
|
26
|
+
grid-template-rows: 1fr 1fr 1fr 1fr;
|
|
27
|
+
grid-template-columns: 1fr 1fr 1fr 1fr;
|
|
28
|
+
}
|
|
29
|
+
&._25 {
|
|
30
|
+
grid-template-rows: 1fr 1fr 1fr 1fr 1fr;
|
|
31
|
+
grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
|
|
32
|
+
}
|
|
33
|
+
&._6 {
|
|
34
|
+
grid-template-rows: 1fr 1fr 1fr;
|
|
35
|
+
grid-template-columns: 1fr 1fr 1fr;
|
|
36
|
+
:nth-child(1) {
|
|
37
|
+
grid-column-start: 1;
|
|
38
|
+
grid-column-end: 3;
|
|
39
|
+
grid-row-start: 1;
|
|
40
|
+
grid-row-end: 3;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
&._8 {
|
|
44
|
+
grid-template-rows: 1fr 1fr 1fr 1fr;
|
|
45
|
+
grid-template-columns: 1fr 1fr 1fr 1fr;
|
|
46
|
+
:nth-child(1) {
|
|
47
|
+
grid-column-start: 1;
|
|
48
|
+
grid-column-end: 4;
|
|
49
|
+
grid-row-start: 1;
|
|
50
|
+
grid-row-end: 4;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
&._10 {
|
|
54
|
+
grid-template-rows: 1fr 1fr 1fr 1fr 1fr;
|
|
55
|
+
grid-template-columns: 1fr 1fr 1fr;
|
|
56
|
+
:nth-child(1) {
|
|
57
|
+
grid-column-start: 1;
|
|
58
|
+
grid-column-end: 3;
|
|
59
|
+
grid-row-start: 1;
|
|
60
|
+
grid-row-end: 4;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
&._13 {
|
|
64
|
+
grid-template-rows: 1fr 1fr 1fr 1fr;
|
|
65
|
+
grid-template-columns: 1fr 1fr 1fr 1fr;
|
|
66
|
+
:nth-child(1) {
|
|
67
|
+
grid-column-start: 1;
|
|
68
|
+
grid-column-end: 3;
|
|
69
|
+
grid-row-start: 1;
|
|
70
|
+
grid-row-end: 3;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
&._14 {
|
|
74
|
+
grid-template-rows: 1fr 1fr 1fr 1fr 1fr;
|
|
75
|
+
grid-template-columns: 1fr 1fr 1fr 1fr;
|
|
76
|
+
:nth-child(1) {
|
|
77
|
+
grid-column-start: 1;
|
|
78
|
+
grid-column-end: 3;
|
|
79
|
+
grid-row-start: 1;
|
|
80
|
+
grid-row-end: 4;
|
|
81
|
+
}
|
|
82
|
+
:nth-child(2) {
|
|
83
|
+
grid-column-start: 3;
|
|
84
|
+
grid-column-end: 5;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
&._17 {
|
|
88
|
+
grid-template-rows: 1fr 1fr 1fr 1fr 1fr;
|
|
89
|
+
grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
|
|
90
|
+
:nth-child(1) {
|
|
91
|
+
grid-column-start: 1;
|
|
92
|
+
grid-column-end: 4;
|
|
93
|
+
grid-row-start: 1;
|
|
94
|
+
grid-row-end: 4;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
&._22 {
|
|
98
|
+
grid-template-rows: 1fr 1fr 1fr 1fr 1fr;
|
|
99
|
+
grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
|
|
100
|
+
:nth-child(1) {
|
|
101
|
+
grid-column-start: 1;
|
|
102
|
+
grid-column-end: 3;
|
|
103
|
+
grid-row-start: 1;
|
|
104
|
+
grid-row-end: 3;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
.grid-item-container {
|
|
108
|
+
display: flex;
|
|
109
|
+
flex-direction: column;
|
|
110
|
+
min-width: 0;
|
|
111
|
+
min-height: 0;
|
|
112
|
+
background-color: #2b3d51;
|
|
113
|
+
align-items: center;
|
|
114
|
+
&.emptyImg {
|
|
115
|
+
background-image: url('../images/empty.png');
|
|
116
|
+
background-repeat: no-repeat;
|
|
117
|
+
background-position: center;
|
|
118
|
+
}
|
|
119
|
+
&.active {
|
|
120
|
+
box-shadow: 0 0 0 1px #52c41a;
|
|
121
|
+
}
|
|
122
|
+
> .content {
|
|
123
|
+
width: 100%;
|
|
124
|
+
height: calc(100% - 26px);
|
|
125
|
+
display: flex;
|
|
126
|
+
align-items: center;
|
|
127
|
+
justify-content: center;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.bottom-controls {
|
|
133
|
+
display: flex;
|
|
134
|
+
align-items: center;
|
|
135
|
+
width: 100%;
|
|
136
|
+
height: 33px;
|
|
137
|
+
padding: 0 12px;
|
|
138
|
+
background-color: #243241;
|
|
139
|
+
|
|
140
|
+
.right {
|
|
141
|
+
margin-left: auto;
|
|
142
|
+
|
|
143
|
+
> div {
|
|
144
|
+
height: 24px;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
.split-line {
|
|
148
|
+
margin-top: 6px;
|
|
149
|
+
width: 1px;
|
|
150
|
+
background-color: rgba(255, 255, 255, 0.1);
|
|
151
|
+
height: 14px;
|
|
152
|
+
}
|
|
153
|
+
.controls-icon-hover {
|
|
154
|
+
color: rgba(255, 255, 255, 0.65);
|
|
155
|
+
display: flex;
|
|
156
|
+
align-items: center;
|
|
157
|
+
padding-top: 2px;
|
|
158
|
+
.hover-hide {
|
|
159
|
+
display: inline-block;
|
|
160
|
+
vertical-align: 0.1em;
|
|
161
|
+
font-size: 12px;
|
|
162
|
+
}
|
|
163
|
+
.hover-show {
|
|
164
|
+
display: none;
|
|
165
|
+
vertical-align: 0.1em;
|
|
166
|
+
font-size: 12px;
|
|
167
|
+
}
|
|
168
|
+
&:hover {
|
|
169
|
+
.hover-hide {
|
|
170
|
+
display: none;
|
|
171
|
+
}
|
|
172
|
+
.hover-show {
|
|
173
|
+
display: inline-block;
|
|
174
|
+
color: #1890ff;
|
|
175
|
+
vertical-align: 0.2em;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
.grid-change-disable {
|
|
180
|
+
color: rgba(255, 255, 255, 0.65);
|
|
181
|
+
display: flex;
|
|
182
|
+
align-items: center;
|
|
183
|
+
padding-top: 2px;
|
|
184
|
+
cursor: not-allowed;
|
|
185
|
+
.arrow {
|
|
186
|
+
display: inline-block;
|
|
187
|
+
vertical-align: 0.1em;
|
|
188
|
+
font-size: 12px;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
package/lib/live-player/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
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); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports["default"] = void 0;
|
|
7
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
8
8
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
9
|
var _react = require("react");
|
|
10
10
|
var _controls = require("../controls");
|
|
@@ -14,14 +14,13 @@ var _player = _interopRequireDefault(require("../player"));
|
|
|
14
14
|
var _utils = require("../utils");
|
|
15
15
|
var _ahooks = require("ahooks");
|
|
16
16
|
var _space = _interopRequireDefault(require("antd/lib/space"));
|
|
17
|
-
function _interopRequireDefault(
|
|
18
|
-
function
|
|
19
|
-
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
17
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
18
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
20
19
|
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."); }
|
|
21
|
-
function _unsupportedIterableToArray(
|
|
22
|
-
function _arrayLikeToArray(
|
|
23
|
-
function _iterableToArrayLimit(
|
|
24
|
-
function _arrayWithHoles(
|
|
20
|
+
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); }
|
|
21
|
+
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; }
|
|
22
|
+
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; }
|
|
23
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
25
24
|
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
26
25
|
function adopt(value) {
|
|
27
26
|
return value instanceof P ? value : new P(function (resolve) {
|
|
@@ -78,7 +77,7 @@ var LivePlayer = function LivePlayer(props, selfRef) {
|
|
|
78
77
|
info = _props$info === void 0 ? [] : _props$info,
|
|
79
78
|
screenshot = props.screenshot,
|
|
80
79
|
loaded = props.loaded,
|
|
81
|
-
|
|
80
|
+
_reload = props.reload;
|
|
82
81
|
var ref = (0, _react.useRef)(null);
|
|
83
82
|
var wrapRef = (0, _react.useRef)(null);
|
|
84
83
|
var controlsRef = (0, _react.useRef)(null);
|
|
@@ -116,64 +115,70 @@ var LivePlayer = function LivePlayer(props, selfRef) {
|
|
|
116
115
|
}
|
|
117
116
|
var player = null;
|
|
118
117
|
(function () {
|
|
119
|
-
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/
|
|
118
|
+
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
120
119
|
var token;
|
|
121
|
-
return
|
|
122
|
-
while (1)
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
case 3:
|
|
133
|
-
token = _context.sent;
|
|
134
|
-
localStorage.setItem('accessToken', token);
|
|
135
|
-
case 5:
|
|
136
|
-
_context.next = 7;
|
|
137
|
-
return new _player["default"]({
|
|
138
|
-
url: url,
|
|
139
|
-
deviceIp: deviceIp,
|
|
140
|
-
deviceId: deviceId,
|
|
141
|
-
devicePort: devicePort,
|
|
142
|
-
userName: userName,
|
|
143
|
-
password: password,
|
|
144
|
-
streamType: streamType,
|
|
145
|
-
deviceCode: deviceCode,
|
|
146
|
-
channelNum: channelNum,
|
|
147
|
-
enableAgent: enableAgent,
|
|
148
|
-
container: container,
|
|
149
|
-
type: type,
|
|
150
|
-
reload: reload
|
|
151
|
-
});
|
|
152
|
-
case 7:
|
|
153
|
-
player = _context.sent;
|
|
154
|
-
playerRef.current = player;
|
|
155
|
-
setState({
|
|
156
|
-
loading: true,
|
|
157
|
-
error: false
|
|
158
|
-
});
|
|
159
|
-
player.play().then(function () {
|
|
160
|
-
setState({
|
|
161
|
-
play: true,
|
|
162
|
-
error: false
|
|
120
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
121
|
+
while (1) {
|
|
122
|
+
switch (_context.prev = _context.next) {
|
|
123
|
+
case 0:
|
|
124
|
+
if (!(type === 'icc_ws')) {
|
|
125
|
+
_context.next = 5;
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
_context.next = 3;
|
|
129
|
+
return _api["default"].getToken({
|
|
130
|
+
deviceId: deviceId
|
|
163
131
|
});
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
132
|
+
case 3:
|
|
133
|
+
token = _context.sent;
|
|
134
|
+
localStorage.setItem('accessToken', token);
|
|
135
|
+
case 5:
|
|
136
|
+
_context.next = 7;
|
|
137
|
+
return new _player["default"]({
|
|
138
|
+
url: url,
|
|
139
|
+
deviceIp: deviceIp,
|
|
140
|
+
deviceId: deviceId,
|
|
141
|
+
devicePort: devicePort,
|
|
142
|
+
userName: userName,
|
|
143
|
+
password: password,
|
|
144
|
+
streamType: streamType,
|
|
145
|
+
deviceCode: deviceCode,
|
|
146
|
+
channelNum: channelNum,
|
|
147
|
+
enableAgent: enableAgent,
|
|
148
|
+
container: container,
|
|
149
|
+
type: type,
|
|
150
|
+
reload: function reload() {
|
|
151
|
+
if (typeof _reload === 'function') {
|
|
152
|
+
_reload();
|
|
153
|
+
}
|
|
154
|
+
}
|
|
167
155
|
});
|
|
168
|
-
|
|
156
|
+
case 7:
|
|
157
|
+
player = _context.sent;
|
|
158
|
+
playerRef.current = player;
|
|
169
159
|
setState({
|
|
170
|
-
loading:
|
|
160
|
+
loading: true,
|
|
161
|
+
error: false
|
|
162
|
+
});
|
|
163
|
+
player.play().then(function () {
|
|
164
|
+
setState({
|
|
165
|
+
play: true,
|
|
166
|
+
error: false
|
|
167
|
+
});
|
|
168
|
+
})["catch"](function () {
|
|
169
|
+
return setState({
|
|
170
|
+
error: true
|
|
171
|
+
});
|
|
172
|
+
})["finally"](function () {
|
|
173
|
+
setState({
|
|
174
|
+
loading: false
|
|
175
|
+
});
|
|
176
|
+
loaded && loaded();
|
|
171
177
|
});
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
return _context.stop();
|
|
178
|
+
case 11:
|
|
179
|
+
case "end":
|
|
180
|
+
return _context.stop();
|
|
181
|
+
}
|
|
177
182
|
}
|
|
178
183
|
}, _callee);
|
|
179
184
|
}));
|
|
@@ -214,7 +219,7 @@ var LivePlayer = function LivePlayer(props, selfRef) {
|
|
|
214
219
|
},
|
|
215
220
|
id: state.id
|
|
216
221
|
}), state.error && (0, _jsxRuntime.jsx)(_controls.ErrorState, {
|
|
217
|
-
onClick:
|
|
222
|
+
onClick: _reload
|
|
218
223
|
}), state.loading && (0, _jsxRuntime.jsx)(_controls.LoadingState, {}), state.showCloudPanel && cloudParams && (0, _jsxRuntime.jsx)(_controls.CloudControlPanel, Object.assign({}, cloudParams)), (0, _jsxRuntime.jsx)(_controls.InfoPanel, {
|
|
219
224
|
showInfo: showInfo,
|
|
220
225
|
info: info
|
|
@@ -253,5 +258,6 @@ var LivePlayer = function LivePlayer(props, selfRef) {
|
|
|
253
258
|
})) : null;
|
|
254
259
|
};
|
|
255
260
|
// LivePlayer.displayName = 'live-player';
|
|
256
|
-
var _default =
|
|
261
|
+
var _default = /*#__PURE__*/(0, _react.forwardRef)(LivePlayer);
|
|
262
|
+
exports["default"] = _default;
|
|
257
263
|
//# sourceMappingURL=index.js.map
|