vue-video-plus 1.2.1 → 1.2.3
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 +29 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/src/App.vue.d.ts +241 -0
- package/dist/types/src/main.d.ts +0 -0
- package/dist/types/src/package/components/Contextmenu.vue.d.ts +3 -0
- package/dist/types/src/package/components/Handle.vue.d.ts +7 -0
- package/dist/types/src/package/components/Loading.vue.d.ts +17 -0
- package/dist/types/src/package/components/ProgressBar.vue.d.ts +82 -0
- package/dist/types/src/package/components/SvgIcon.vue.d.ts +47 -0
- package/dist/types/src/package/components/Switch.vue.d.ts +56 -0
- package/dist/types/src/package/components/VueVideoPlus.vue.d.ts +206 -0
- package/dist/types/src/package/components/icon/Pop.vue.d.ts +3 -0
- package/dist/types/src/package/config/index.d.ts +89 -0
- package/dist/types/src/package/index.d.ts +7 -0
- package/dist/types/src/package/types/index.d.ts +6 -0
- package/dist/types/src/package/utils/dom.d.ts +2 -0
- package/dist/types/src/package/utils/postion.d.ts +0 -0
- package/dist/types/src/package/utils/utils.d.ts +6 -0
- package/dist/vueVideo-es.js +27 -26
- package/dist/vueVideo-umd.js +1 -1
- package/package.json +8 -4
package/README.md
CHANGED
|
@@ -21,3 +21,32 @@ yarn 安装
|
|
|
21
21
|
```javascript
|
|
22
22
|
yarn add vue-video-plus
|
|
23
23
|
```
|
|
24
|
+
|
|
25
|
+
## 开始使用
|
|
26
|
+
|
|
27
|
+
#### 全局使用
|
|
28
|
+
|
|
29
|
+
```javascript
|
|
30
|
+
import { createApp } from 'vue'
|
|
31
|
+
import App from './App.vue'
|
|
32
|
+
let app = createApp(App)
|
|
33
|
+
|
|
34
|
+
import vueVideoPlus from 'vue-video-plus' // 引入组件
|
|
35
|
+
import 'vue-video-plus/dist/style.css' // 引入css
|
|
36
|
+
app.use(vueVideoPlus)
|
|
37
|
+
|
|
38
|
+
app.mount('#app')
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
#### 组件内使用
|
|
42
|
+
|
|
43
|
+
```javascript
|
|
44
|
+
// 引入样式
|
|
45
|
+
import 'vue-video-plus/dist/style.css'
|
|
46
|
+
import { videoPlay } from 'vue-video-plus'
|
|
47
|
+
export default {
|
|
48
|
+
components: {
|
|
49
|
+
videoPlay
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
```
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, GlobalComponents, GlobalDirectives } from 'vue';
|
|
2
|
+
declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
|
3
|
+
video: CreateComponentPublicInstanceWithMixins<Readonly< ExtractPropTypes<{
|
|
4
|
+
width: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
height: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
color: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
src: {
|
|
17
|
+
required: boolean;
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
title: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
type: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
poster: {
|
|
30
|
+
type: StringConstructor;
|
|
31
|
+
default: string;
|
|
32
|
+
};
|
|
33
|
+
webFullScreen: {
|
|
34
|
+
type: BooleanConstructor;
|
|
35
|
+
default: boolean;
|
|
36
|
+
};
|
|
37
|
+
speed: {
|
|
38
|
+
type: BooleanConstructor;
|
|
39
|
+
default: boolean;
|
|
40
|
+
};
|
|
41
|
+
currentTime: {
|
|
42
|
+
type: NumberConstructor;
|
|
43
|
+
default: number;
|
|
44
|
+
};
|
|
45
|
+
playsinline: {
|
|
46
|
+
type: BooleanConstructor;
|
|
47
|
+
default: boolean;
|
|
48
|
+
};
|
|
49
|
+
muted: {
|
|
50
|
+
type: BooleanConstructor;
|
|
51
|
+
default: boolean;
|
|
52
|
+
};
|
|
53
|
+
speedRate: {
|
|
54
|
+
type: ArrayConstructor;
|
|
55
|
+
default: () => string[];
|
|
56
|
+
};
|
|
57
|
+
autoPlay: {
|
|
58
|
+
type: BooleanConstructor;
|
|
59
|
+
default: boolean;
|
|
60
|
+
};
|
|
61
|
+
loop: {
|
|
62
|
+
type: BooleanConstructor;
|
|
63
|
+
default: boolean;
|
|
64
|
+
};
|
|
65
|
+
mirror: {
|
|
66
|
+
type: BooleanConstructor;
|
|
67
|
+
default: boolean;
|
|
68
|
+
};
|
|
69
|
+
lightOff: {
|
|
70
|
+
type: BooleanConstructor;
|
|
71
|
+
default: boolean;
|
|
72
|
+
};
|
|
73
|
+
volume: {
|
|
74
|
+
type: NumberConstructor;
|
|
75
|
+
default: number;
|
|
76
|
+
};
|
|
77
|
+
control: {
|
|
78
|
+
type: BooleanConstructor;
|
|
79
|
+
default: boolean;
|
|
80
|
+
};
|
|
81
|
+
controlBtns: {
|
|
82
|
+
type: PropType<Array<string>>;
|
|
83
|
+
default: string[];
|
|
84
|
+
};
|
|
85
|
+
preload: {
|
|
86
|
+
type: StringConstructor;
|
|
87
|
+
default: string;
|
|
88
|
+
};
|
|
89
|
+
}>> & Readonly<{}>, {
|
|
90
|
+
play: () => void;
|
|
91
|
+
pause: () => void;
|
|
92
|
+
togglePlay: (ev: Event) => void;
|
|
93
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
|
|
94
|
+
speedRate: unknown[];
|
|
95
|
+
volume: number;
|
|
96
|
+
color: string;
|
|
97
|
+
width: string;
|
|
98
|
+
height: string;
|
|
99
|
+
type: string;
|
|
100
|
+
title: string;
|
|
101
|
+
preload: string;
|
|
102
|
+
src: string;
|
|
103
|
+
poster: string;
|
|
104
|
+
webFullScreen: boolean;
|
|
105
|
+
speed: boolean;
|
|
106
|
+
currentTime: number;
|
|
107
|
+
playsinline: boolean;
|
|
108
|
+
muted: boolean;
|
|
109
|
+
autoPlay: boolean;
|
|
110
|
+
loop: boolean;
|
|
111
|
+
mirror: boolean;
|
|
112
|
+
lightOff: boolean;
|
|
113
|
+
control: boolean;
|
|
114
|
+
controlBtns: string[];
|
|
115
|
+
}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {
|
|
116
|
+
playerWrap: HTMLDivElement;
|
|
117
|
+
v: HTMLVideoElement;
|
|
118
|
+
refInput: HTMLInputElement;
|
|
119
|
+
refPlayerControl: HTMLDivElement;
|
|
120
|
+
}, HTMLDivElement, ComponentProvideOptions, {
|
|
121
|
+
P: {};
|
|
122
|
+
B: {};
|
|
123
|
+
D: {};
|
|
124
|
+
C: {};
|
|
125
|
+
M: {};
|
|
126
|
+
Defaults: {};
|
|
127
|
+
}, Readonly< ExtractPropTypes<{
|
|
128
|
+
width: {
|
|
129
|
+
type: StringConstructor;
|
|
130
|
+
default: string;
|
|
131
|
+
};
|
|
132
|
+
height: {
|
|
133
|
+
type: StringConstructor;
|
|
134
|
+
default: string;
|
|
135
|
+
};
|
|
136
|
+
color: {
|
|
137
|
+
type: StringConstructor;
|
|
138
|
+
default: string;
|
|
139
|
+
};
|
|
140
|
+
src: {
|
|
141
|
+
required: boolean;
|
|
142
|
+
type: StringConstructor;
|
|
143
|
+
default: string;
|
|
144
|
+
};
|
|
145
|
+
title: {
|
|
146
|
+
type: StringConstructor;
|
|
147
|
+
default: string;
|
|
148
|
+
};
|
|
149
|
+
type: {
|
|
150
|
+
type: StringConstructor;
|
|
151
|
+
default: string;
|
|
152
|
+
};
|
|
153
|
+
poster: {
|
|
154
|
+
type: StringConstructor;
|
|
155
|
+
default: string;
|
|
156
|
+
};
|
|
157
|
+
webFullScreen: {
|
|
158
|
+
type: BooleanConstructor;
|
|
159
|
+
default: boolean;
|
|
160
|
+
};
|
|
161
|
+
speed: {
|
|
162
|
+
type: BooleanConstructor;
|
|
163
|
+
default: boolean;
|
|
164
|
+
};
|
|
165
|
+
currentTime: {
|
|
166
|
+
type: NumberConstructor;
|
|
167
|
+
default: number;
|
|
168
|
+
};
|
|
169
|
+
playsinline: {
|
|
170
|
+
type: BooleanConstructor;
|
|
171
|
+
default: boolean;
|
|
172
|
+
};
|
|
173
|
+
muted: {
|
|
174
|
+
type: BooleanConstructor;
|
|
175
|
+
default: boolean;
|
|
176
|
+
};
|
|
177
|
+
speedRate: {
|
|
178
|
+
type: ArrayConstructor;
|
|
179
|
+
default: () => string[];
|
|
180
|
+
};
|
|
181
|
+
autoPlay: {
|
|
182
|
+
type: BooleanConstructor;
|
|
183
|
+
default: boolean;
|
|
184
|
+
};
|
|
185
|
+
loop: {
|
|
186
|
+
type: BooleanConstructor;
|
|
187
|
+
default: boolean;
|
|
188
|
+
};
|
|
189
|
+
mirror: {
|
|
190
|
+
type: BooleanConstructor;
|
|
191
|
+
default: boolean;
|
|
192
|
+
};
|
|
193
|
+
lightOff: {
|
|
194
|
+
type: BooleanConstructor;
|
|
195
|
+
default: boolean;
|
|
196
|
+
};
|
|
197
|
+
volume: {
|
|
198
|
+
type: NumberConstructor;
|
|
199
|
+
default: number;
|
|
200
|
+
};
|
|
201
|
+
control: {
|
|
202
|
+
type: BooleanConstructor;
|
|
203
|
+
default: boolean;
|
|
204
|
+
};
|
|
205
|
+
controlBtns: {
|
|
206
|
+
type: PropType<Array<string>>;
|
|
207
|
+
default: string[];
|
|
208
|
+
};
|
|
209
|
+
preload: {
|
|
210
|
+
type: StringConstructor;
|
|
211
|
+
default: string;
|
|
212
|
+
};
|
|
213
|
+
}>> & Readonly<{}>, {
|
|
214
|
+
play: () => void;
|
|
215
|
+
pause: () => void;
|
|
216
|
+
togglePlay: (ev: Event) => void;
|
|
217
|
+
}, {}, {}, {}, {
|
|
218
|
+
speedRate: unknown[];
|
|
219
|
+
volume: number;
|
|
220
|
+
color: string;
|
|
221
|
+
width: string;
|
|
222
|
+
height: string;
|
|
223
|
+
type: string;
|
|
224
|
+
title: string;
|
|
225
|
+
preload: string;
|
|
226
|
+
src: string;
|
|
227
|
+
poster: string;
|
|
228
|
+
webFullScreen: boolean;
|
|
229
|
+
speed: boolean;
|
|
230
|
+
currentTime: number;
|
|
231
|
+
playsinline: boolean;
|
|
232
|
+
muted: boolean;
|
|
233
|
+
autoPlay: boolean;
|
|
234
|
+
loop: boolean;
|
|
235
|
+
mirror: boolean;
|
|
236
|
+
lightOff: boolean;
|
|
237
|
+
control: boolean;
|
|
238
|
+
controlBtns: string[];
|
|
239
|
+
}> | null;
|
|
240
|
+
}, HTMLDivElement>;
|
|
241
|
+
export default _default;
|
|
File without changes
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
declare const _default: DefineComponent<{
|
|
3
|
+
state?: any;
|
|
4
|
+
}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{
|
|
5
|
+
state?: any;
|
|
6
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
3
|
+
loadType: StringConstructor;
|
|
4
|
+
text: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
9
|
+
loadType: StringConstructor;
|
|
10
|
+
text: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
}>> & Readonly<{}>, {
|
|
15
|
+
text: string;
|
|
16
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
3
|
+
modelValue: {
|
|
4
|
+
required: true;
|
|
5
|
+
type: NumberConstructor;
|
|
6
|
+
default: number;
|
|
7
|
+
};
|
|
8
|
+
disabled: {
|
|
9
|
+
type: BooleanConstructor;
|
|
10
|
+
default: boolean;
|
|
11
|
+
};
|
|
12
|
+
vertical: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
default: boolean;
|
|
15
|
+
};
|
|
16
|
+
hover: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
hoverText: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
preload: {
|
|
25
|
+
type: NumberConstructor;
|
|
26
|
+
default: number;
|
|
27
|
+
};
|
|
28
|
+
size: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
33
|
+
change: (...args: any[]) => void;
|
|
34
|
+
onMousemove: (...args: any[]) => void;
|
|
35
|
+
"update:modelValue": (...args: any[]) => void;
|
|
36
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
37
|
+
modelValue: {
|
|
38
|
+
required: true;
|
|
39
|
+
type: NumberConstructor;
|
|
40
|
+
default: number;
|
|
41
|
+
};
|
|
42
|
+
disabled: {
|
|
43
|
+
type: BooleanConstructor;
|
|
44
|
+
default: boolean;
|
|
45
|
+
};
|
|
46
|
+
vertical: {
|
|
47
|
+
type: BooleanConstructor;
|
|
48
|
+
default: boolean;
|
|
49
|
+
};
|
|
50
|
+
hover: {
|
|
51
|
+
type: BooleanConstructor;
|
|
52
|
+
default: boolean;
|
|
53
|
+
};
|
|
54
|
+
hoverText: {
|
|
55
|
+
type: StringConstructor;
|
|
56
|
+
default: string;
|
|
57
|
+
};
|
|
58
|
+
preload: {
|
|
59
|
+
type: NumberConstructor;
|
|
60
|
+
default: number;
|
|
61
|
+
};
|
|
62
|
+
size: {
|
|
63
|
+
type: StringConstructor;
|
|
64
|
+
default: string;
|
|
65
|
+
};
|
|
66
|
+
}>> & Readonly<{
|
|
67
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
68
|
+
onOnMousemove?: ((...args: any[]) => any) | undefined;
|
|
69
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
70
|
+
}>, {
|
|
71
|
+
modelValue: number;
|
|
72
|
+
disabled: boolean;
|
|
73
|
+
vertical: boolean;
|
|
74
|
+
hover: boolean;
|
|
75
|
+
hoverText: string;
|
|
76
|
+
preload: number;
|
|
77
|
+
size: string;
|
|
78
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
|
79
|
+
refProgress: HTMLDivElement;
|
|
80
|
+
refTips: HTMLDivElement;
|
|
81
|
+
}, HTMLDivElement>;
|
|
82
|
+
export default _default;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
3
|
+
prefix: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
name: StringConstructor;
|
|
8
|
+
color: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
};
|
|
11
|
+
width: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
height: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
19
|
+
class: {
|
|
20
|
+
type: StringConstructor;
|
|
21
|
+
};
|
|
22
|
+
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
23
|
+
prefix: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
default: string;
|
|
26
|
+
};
|
|
27
|
+
name: StringConstructor;
|
|
28
|
+
color: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
};
|
|
31
|
+
width: {
|
|
32
|
+
type: StringConstructor;
|
|
33
|
+
default: string;
|
|
34
|
+
};
|
|
35
|
+
height: {
|
|
36
|
+
type: StringConstructor;
|
|
37
|
+
default: string;
|
|
38
|
+
};
|
|
39
|
+
class: {
|
|
40
|
+
type: StringConstructor;
|
|
41
|
+
};
|
|
42
|
+
}>> & Readonly<{}>, {
|
|
43
|
+
prefix: string;
|
|
44
|
+
width: string;
|
|
45
|
+
height: string;
|
|
46
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
47
|
+
export default _default;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
3
|
+
modelValue: {
|
|
4
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
5
|
+
};
|
|
6
|
+
width: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
trueValue: {
|
|
11
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
12
|
+
default: boolean;
|
|
13
|
+
};
|
|
14
|
+
falseValue: {
|
|
15
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
18
|
+
activeColor: {
|
|
19
|
+
type: StringConstructor[];
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
23
|
+
change: (...args: any[]) => void;
|
|
24
|
+
"update:modelValue": (...args: any[]) => void;
|
|
25
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
26
|
+
modelValue: {
|
|
27
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
28
|
+
};
|
|
29
|
+
width: {
|
|
30
|
+
type: StringConstructor;
|
|
31
|
+
default: string;
|
|
32
|
+
};
|
|
33
|
+
trueValue: {
|
|
34
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
35
|
+
default: boolean;
|
|
36
|
+
};
|
|
37
|
+
falseValue: {
|
|
38
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
39
|
+
default: boolean;
|
|
40
|
+
};
|
|
41
|
+
activeColor: {
|
|
42
|
+
type: StringConstructor[];
|
|
43
|
+
default: string;
|
|
44
|
+
};
|
|
45
|
+
}>> & Readonly<{
|
|
46
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
47
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
48
|
+
}>, {
|
|
49
|
+
width: string;
|
|
50
|
+
trueValue: string | number | boolean;
|
|
51
|
+
falseValue: string | number | boolean;
|
|
52
|
+
activeColor: string;
|
|
53
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
|
54
|
+
input: HTMLInputElement;
|
|
55
|
+
}, HTMLDivElement>;
|
|
56
|
+
export default _default;
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { DefineComponent, ExtractPropTypes, PropType, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
3
|
+
width: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
height: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
color: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
src: {
|
|
16
|
+
required: boolean;
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
title: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
type: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
poster: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
webFullScreen: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
speed: {
|
|
37
|
+
type: BooleanConstructor;
|
|
38
|
+
default: boolean;
|
|
39
|
+
};
|
|
40
|
+
currentTime: {
|
|
41
|
+
type: NumberConstructor;
|
|
42
|
+
default: number;
|
|
43
|
+
};
|
|
44
|
+
playsinline: {
|
|
45
|
+
type: BooleanConstructor;
|
|
46
|
+
default: boolean;
|
|
47
|
+
};
|
|
48
|
+
muted: {
|
|
49
|
+
type: BooleanConstructor;
|
|
50
|
+
default: boolean;
|
|
51
|
+
};
|
|
52
|
+
speedRate: {
|
|
53
|
+
type: ArrayConstructor;
|
|
54
|
+
default: () => string[];
|
|
55
|
+
};
|
|
56
|
+
autoPlay: {
|
|
57
|
+
type: BooleanConstructor;
|
|
58
|
+
default: boolean;
|
|
59
|
+
};
|
|
60
|
+
loop: {
|
|
61
|
+
type: BooleanConstructor;
|
|
62
|
+
default: boolean;
|
|
63
|
+
};
|
|
64
|
+
mirror: {
|
|
65
|
+
type: BooleanConstructor;
|
|
66
|
+
default: boolean;
|
|
67
|
+
};
|
|
68
|
+
lightOff: {
|
|
69
|
+
type: BooleanConstructor;
|
|
70
|
+
default: boolean;
|
|
71
|
+
};
|
|
72
|
+
volume: {
|
|
73
|
+
type: NumberConstructor;
|
|
74
|
+
default: number;
|
|
75
|
+
};
|
|
76
|
+
control: {
|
|
77
|
+
type: BooleanConstructor;
|
|
78
|
+
default: boolean;
|
|
79
|
+
};
|
|
80
|
+
controlBtns: {
|
|
81
|
+
type: PropType<Array<string>>;
|
|
82
|
+
default: string[];
|
|
83
|
+
};
|
|
84
|
+
preload: {
|
|
85
|
+
type: StringConstructor;
|
|
86
|
+
default: string;
|
|
87
|
+
};
|
|
88
|
+
}>, {
|
|
89
|
+
play: () => void;
|
|
90
|
+
pause: () => void;
|
|
91
|
+
togglePlay: (ev: Event) => void;
|
|
92
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
93
|
+
width: {
|
|
94
|
+
type: StringConstructor;
|
|
95
|
+
default: string;
|
|
96
|
+
};
|
|
97
|
+
height: {
|
|
98
|
+
type: StringConstructor;
|
|
99
|
+
default: string;
|
|
100
|
+
};
|
|
101
|
+
color: {
|
|
102
|
+
type: StringConstructor;
|
|
103
|
+
default: string;
|
|
104
|
+
};
|
|
105
|
+
src: {
|
|
106
|
+
required: boolean;
|
|
107
|
+
type: StringConstructor;
|
|
108
|
+
default: string;
|
|
109
|
+
};
|
|
110
|
+
title: {
|
|
111
|
+
type: StringConstructor;
|
|
112
|
+
default: string;
|
|
113
|
+
};
|
|
114
|
+
type: {
|
|
115
|
+
type: StringConstructor;
|
|
116
|
+
default: string;
|
|
117
|
+
};
|
|
118
|
+
poster: {
|
|
119
|
+
type: StringConstructor;
|
|
120
|
+
default: string;
|
|
121
|
+
};
|
|
122
|
+
webFullScreen: {
|
|
123
|
+
type: BooleanConstructor;
|
|
124
|
+
default: boolean;
|
|
125
|
+
};
|
|
126
|
+
speed: {
|
|
127
|
+
type: BooleanConstructor;
|
|
128
|
+
default: boolean;
|
|
129
|
+
};
|
|
130
|
+
currentTime: {
|
|
131
|
+
type: NumberConstructor;
|
|
132
|
+
default: number;
|
|
133
|
+
};
|
|
134
|
+
playsinline: {
|
|
135
|
+
type: BooleanConstructor;
|
|
136
|
+
default: boolean;
|
|
137
|
+
};
|
|
138
|
+
muted: {
|
|
139
|
+
type: BooleanConstructor;
|
|
140
|
+
default: boolean;
|
|
141
|
+
};
|
|
142
|
+
speedRate: {
|
|
143
|
+
type: ArrayConstructor;
|
|
144
|
+
default: () => string[];
|
|
145
|
+
};
|
|
146
|
+
autoPlay: {
|
|
147
|
+
type: BooleanConstructor;
|
|
148
|
+
default: boolean;
|
|
149
|
+
};
|
|
150
|
+
loop: {
|
|
151
|
+
type: BooleanConstructor;
|
|
152
|
+
default: boolean;
|
|
153
|
+
};
|
|
154
|
+
mirror: {
|
|
155
|
+
type: BooleanConstructor;
|
|
156
|
+
default: boolean;
|
|
157
|
+
};
|
|
158
|
+
lightOff: {
|
|
159
|
+
type: BooleanConstructor;
|
|
160
|
+
default: boolean;
|
|
161
|
+
};
|
|
162
|
+
volume: {
|
|
163
|
+
type: NumberConstructor;
|
|
164
|
+
default: number;
|
|
165
|
+
};
|
|
166
|
+
control: {
|
|
167
|
+
type: BooleanConstructor;
|
|
168
|
+
default: boolean;
|
|
169
|
+
};
|
|
170
|
+
controlBtns: {
|
|
171
|
+
type: PropType<Array<string>>;
|
|
172
|
+
default: string[];
|
|
173
|
+
};
|
|
174
|
+
preload: {
|
|
175
|
+
type: StringConstructor;
|
|
176
|
+
default: string;
|
|
177
|
+
};
|
|
178
|
+
}>> & Readonly<{}>, {
|
|
179
|
+
speedRate: unknown[];
|
|
180
|
+
volume: number;
|
|
181
|
+
color: string;
|
|
182
|
+
width: string;
|
|
183
|
+
height: string;
|
|
184
|
+
type: string;
|
|
185
|
+
title: string;
|
|
186
|
+
preload: string;
|
|
187
|
+
src: string;
|
|
188
|
+
poster: string;
|
|
189
|
+
webFullScreen: boolean;
|
|
190
|
+
speed: boolean;
|
|
191
|
+
currentTime: number;
|
|
192
|
+
playsinline: boolean;
|
|
193
|
+
muted: boolean;
|
|
194
|
+
autoPlay: boolean;
|
|
195
|
+
loop: boolean;
|
|
196
|
+
mirror: boolean;
|
|
197
|
+
lightOff: boolean;
|
|
198
|
+
control: boolean;
|
|
199
|
+
controlBtns: string[];
|
|
200
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
|
201
|
+
playerWrap: HTMLDivElement;
|
|
202
|
+
v: HTMLVideoElement;
|
|
203
|
+
refInput: HTMLInputElement;
|
|
204
|
+
refPlayerControl: HTMLDivElement;
|
|
205
|
+
}, HTMLDivElement>;
|
|
206
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
export declare const videoEmits: string[];
|
|
3
|
+
export declare const defaultConfig: {
|
|
4
|
+
width: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
height: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
color: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
src: {
|
|
17
|
+
required: boolean;
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
title: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
type: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
poster: {
|
|
30
|
+
type: StringConstructor;
|
|
31
|
+
default: string;
|
|
32
|
+
};
|
|
33
|
+
webFullScreen: {
|
|
34
|
+
type: BooleanConstructor;
|
|
35
|
+
default: boolean;
|
|
36
|
+
};
|
|
37
|
+
speed: {
|
|
38
|
+
type: BooleanConstructor;
|
|
39
|
+
default: boolean;
|
|
40
|
+
};
|
|
41
|
+
currentTime: {
|
|
42
|
+
type: NumberConstructor;
|
|
43
|
+
default: number;
|
|
44
|
+
};
|
|
45
|
+
playsinline: {
|
|
46
|
+
type: BooleanConstructor;
|
|
47
|
+
default: boolean;
|
|
48
|
+
};
|
|
49
|
+
muted: {
|
|
50
|
+
type: BooleanConstructor;
|
|
51
|
+
default: boolean;
|
|
52
|
+
};
|
|
53
|
+
speedRate: {
|
|
54
|
+
type: ArrayConstructor;
|
|
55
|
+
default: () => string[];
|
|
56
|
+
};
|
|
57
|
+
autoPlay: {
|
|
58
|
+
type: BooleanConstructor;
|
|
59
|
+
default: boolean;
|
|
60
|
+
};
|
|
61
|
+
loop: {
|
|
62
|
+
type: BooleanConstructor;
|
|
63
|
+
default: boolean;
|
|
64
|
+
};
|
|
65
|
+
mirror: {
|
|
66
|
+
type: BooleanConstructor;
|
|
67
|
+
default: boolean;
|
|
68
|
+
};
|
|
69
|
+
lightOff: {
|
|
70
|
+
type: BooleanConstructor;
|
|
71
|
+
default: boolean;
|
|
72
|
+
};
|
|
73
|
+
volume: {
|
|
74
|
+
type: NumberConstructor;
|
|
75
|
+
default: number;
|
|
76
|
+
};
|
|
77
|
+
control: {
|
|
78
|
+
type: BooleanConstructor;
|
|
79
|
+
default: boolean;
|
|
80
|
+
};
|
|
81
|
+
controlBtns: {
|
|
82
|
+
type: PropType<Array<string>>;
|
|
83
|
+
default: string[];
|
|
84
|
+
};
|
|
85
|
+
preload: {
|
|
86
|
+
type: StringConstructor;
|
|
87
|
+
default: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const on: (element: Element | HTMLElement | Document | Window, event: string, handler: EventListenerOrEventListenerObject, useCapture?: boolean) => void;
|
|
2
|
+
export declare const off: (element: Element | HTMLElement | Document | Window, event: string, handler: EventListenerOrEventListenerObject, useCapture?: boolean) => void;
|
|
File without changes
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const hexToRgba: (hex: string) => string;
|
|
2
|
+
export declare const firstUpperCase: (str: string) => string;
|
|
3
|
+
export declare const isMobile: boolean;
|
|
4
|
+
export declare const timeFormat: (time: number) => string;
|
|
5
|
+
export declare const requestPictureInPicture: (el: HTMLElement | Document | Window) => void;
|
|
6
|
+
export declare const toggleFullScreen: (el: HTMLElement) => boolean;
|
package/dist/vueVideo-es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as O,
|
|
1
|
+
import { defineComponent as O, createElementBlock as y, openBlock as g, normalizeStyle as L, normalizeClass as z, createElementVNode as t, getCurrentInstance as ke, computed as A, withDirectives as P, createCommentVNode as E, toDisplayString as _, createVNode as p, vShow as V, createTextVNode as D, useCssVars as ne, ref as W, reactive as J, withModifiers as Te, nextTick as me, resolveComponent as ae, watch as fe, onMounted as ye, onUnmounted as be, Transition as ee, withCtx as te, Fragment as le, renderList as oe, createStaticVNode as xe, unref as q, mergeProps as Se, withKeys as N } from "vue";
|
|
2
2
|
import "//at.alicdn.com/t/c/font_4726673_sgkem61p1m8.js";
|
|
3
3
|
const ue = [
|
|
4
4
|
//当浏览器开始查找音频/视频时触发。
|
|
@@ -130,8 +130,8 @@ const ue = [
|
|
|
130
130
|
}
|
|
131
131
|
},
|
|
132
132
|
setup(l) {
|
|
133
|
-
return (o, u) => (
|
|
134
|
-
(
|
|
133
|
+
return (o, u) => (g(), y("div", null, [
|
|
134
|
+
(g(), y("svg", {
|
|
135
135
|
class: z(["icon", l.class]),
|
|
136
136
|
style: L({ width: l.width, height: l.height })
|
|
137
137
|
}, [
|
|
@@ -163,12 +163,12 @@ const ue = [
|
|
|
163
163
|
let n = "background: rgba(0, 0, 0, .1);z-index:1";
|
|
164
164
|
return a.loadType == "loadstart" && (n = "background: rgba(0, 0, 0, 1);;z-index:3"), n;
|
|
165
165
|
});
|
|
166
|
-
return (n, m) => P((
|
|
166
|
+
return (n, m) => P((g(), y("div", {
|
|
167
167
|
class: "loading",
|
|
168
168
|
style: L(v.value)
|
|
169
169
|
}, [
|
|
170
170
|
t("div", null, [
|
|
171
|
-
l.loadType == "loadstart" ? (
|
|
171
|
+
l.loadType == "loadstart" ? (g(), y("span", Ie, [
|
|
172
172
|
m[0] || (m[0] = t("i", { class: "rotating iconfont icon-loading f50" }, null, -1)),
|
|
173
173
|
t("p", null, _(l.text), 1)
|
|
174
174
|
])) : E("", !0),
|
|
@@ -305,7 +305,7 @@ const ue = [
|
|
|
305
305
|
n.dragging = !1;
|
|
306
306
|
}, 0));
|
|
307
307
|
};
|
|
308
|
-
return (d, w) => (
|
|
308
|
+
return (d, w) => (g(), y("div", {
|
|
309
309
|
ref_key: "refProgress",
|
|
310
310
|
ref: u,
|
|
311
311
|
class: z(["progress", { "is-vertical": e.vertical }]),
|
|
@@ -414,7 +414,7 @@ const ze = ["checked"], Ae = /* @__PURE__ */ O({
|
|
|
414
414
|
a("update:modelValue", b), a("change", b);
|
|
415
415
|
});
|
|
416
416
|
};
|
|
417
|
-
return (m, b) => (
|
|
417
|
+
return (m, b) => (g(), y("div", {
|
|
418
418
|
class: z(["switch", { "is-checked": v.value }])
|
|
419
419
|
}, [
|
|
420
420
|
t("input", {
|
|
@@ -434,7 +434,7 @@ const ze = ["checked"], Ae = /* @__PURE__ */ O({
|
|
|
434
434
|
setup(l) {
|
|
435
435
|
return W(!0), (o, u) => {
|
|
436
436
|
const a = ae("SvgIcon");
|
|
437
|
-
return P((
|
|
437
|
+
return P((g(), y("div", We, [
|
|
438
438
|
P(t("li", Oe, [
|
|
439
439
|
t("span", qe, [
|
|
440
440
|
p(a, {
|
|
@@ -472,7 +472,7 @@ const ze = ["checked"], Ae = /* @__PURE__ */ O({
|
|
|
472
472
|
]);
|
|
473
473
|
};
|
|
474
474
|
}
|
|
475
|
-
}), Ke = /* @__PURE__ */ H(Xe, [["__scopeId", "data-v-7b4544a3"]]), ce = "1.
|
|
475
|
+
}), Ke = /* @__PURE__ */ H(Xe, [["__scopeId", "data-v-7b4544a3"]]), ce = "1.2.3", Ye = {
|
|
476
476
|
key: 0,
|
|
477
477
|
class: "player-dialog"
|
|
478
478
|
}, je = { class: "player-dialog-body" }, Ge = { class: "player-dialog-title" }, Je = { class: "player-hotkey-panel" }, Qe = { class: "player-hotkey-panel-item" }, Ze = { class: "player-filter-panel" }, et = { class: "player-filter-panel-item" }, tt = { class: "player-filter-panel-item" }, lt = { class: "player-filter-panel-item" }, ot = {
|
|
@@ -548,10 +548,10 @@ const ze = ["checked"], Ae = /* @__PURE__ */ O({
|
|
|
548
548
|
F(window, "keydown", m), F(window, "click", k), F(r, "contextmenu", b);
|
|
549
549
|
}), (r, c) => {
|
|
550
550
|
const T = ae("SvgIcon");
|
|
551
|
-
return
|
|
551
|
+
return g(), y("div", null, [
|
|
552
552
|
p(ee, { name: "fade-in" }, {
|
|
553
553
|
default: te(() => [
|
|
554
|
-
o.dialogType ? (
|
|
554
|
+
o.dialogType ? (g(), y("div", Ye, [
|
|
555
555
|
t("div", je, [
|
|
556
556
|
t("h5", Ge, [
|
|
557
557
|
D(_(o.dialogTitle) + " ", 1),
|
|
@@ -569,7 +569,7 @@ const ze = ["checked"], Ae = /* @__PURE__ */ O({
|
|
|
569
569
|
])
|
|
570
570
|
]),
|
|
571
571
|
P(t("ul", Je, [
|
|
572
|
-
(
|
|
572
|
+
(g(), y(le, null, oe(a, (f) => t("li", Qe, [
|
|
573
573
|
t("span", null, _(f.key), 1),
|
|
574
574
|
t("span", null, _(f.label), 1)
|
|
575
575
|
])), 64))
|
|
@@ -621,12 +621,12 @@ const ze = ["checked"], Ae = /* @__PURE__ */ O({
|
|
|
621
621
|
]),
|
|
622
622
|
_: 1
|
|
623
623
|
}),
|
|
624
|
-
o.show ? (
|
|
624
|
+
o.show ? (g(), y("div", ot, [
|
|
625
625
|
t("ul", {
|
|
626
626
|
class: "player-contextmenu-body",
|
|
627
627
|
style: L(v.value)
|
|
628
628
|
}, [
|
|
629
|
-
(
|
|
629
|
+
(g(), y(le, null, oe(u, (f) => t("li", {
|
|
630
630
|
playerKeyCode: f.key,
|
|
631
631
|
key: f.key
|
|
632
632
|
}, _(f.label), 9, nt)), 64))
|
|
@@ -638,7 +638,7 @@ const ze = ["checked"], Ae = /* @__PURE__ */ O({
|
|
|
638
638
|
}
|
|
639
639
|
}), st = /* @__PURE__ */ H(at, [["__scopeId", "data-v-0633897a"]]), it = {};
|
|
640
640
|
function rt(l, o) {
|
|
641
|
-
return
|
|
641
|
+
return g(), y("div", null, o[0] || (o[0] = [
|
|
642
642
|
xe('<svg width="20px" height="20px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="pc" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="鼠标悬浮态" transform="translate(-1011.000000, -614.000000)"><g id="编组-3备份" transform="translate(-0.000000, 0.000000)"><g id="编组-9" transform="translate(771.000000, 614.000000)"><g id="网页全屏icon备份" transform="translate(240.000000, 0.000000)"><rect id="矩形" fill="#D8D8D8" opacity="0" x="0" y="0" width="24" height="24"></rect><g id="编组-16" transform="translate(3.000000, 3.000000)"><path d="M6.02375417,18 L4.41666657,18 C1.97740898,18 2.987229e-16,16.022591 0,13.5833334 L0,4.41666657 C-2.987229e-16,1.97740898 1.97740898,-4.4009407e-16 4.41666657,0 L13.5277779,0 C15.9670355,-4.4808435e-16 17.9444444,1.97740898 17.9444444,4.41666657 L17.9444444,6.94881161 L17.9444444,6.94881161" id="路径" stroke="#FFFFFF" stroke-width="2.2" stroke-linecap="square" stroke-linejoin="round"></path><rect id="矩形" stroke="#FFFFFF" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" x="10.5555556" y="11.6470588" width="8.44444444" height="6.35294118" rx="2.10317456"></rect><polyline id="路径-4备份" stroke="#FFFFFF" stroke-width="2.2" stroke-linecap="square" stroke-linejoin="round" transform="translate(6.838734, 6.948812) scale(-1, -1) translate(-6.838734, -6.948812) " points="5.25540107 8.5370469 5.25540107 5.36057631 8.42206774 5.36057631"></polyline><polygon id="矩形" fill="#FFFFFF" transform="translate(6.163971, 6.008746) rotate(-45.000000) translate(-6.163971, -6.008746) " points="5.07520753 2.83865288 7.26397133 2.83570116 7.25273513 9.17883841 5.06397133 9.18179013"></polygon></g></g></g></g></g></g></svg>', 1)
|
|
643
643
|
]));
|
|
644
644
|
}
|
|
@@ -813,7 +813,7 @@ const ut = /* @__PURE__ */ H(it, [["render", rt]]), dt = {
|
|
|
813
813
|
//暂停或播放
|
|
814
814
|
}), (i, s) => {
|
|
815
815
|
const x = ae("SvgIcon");
|
|
816
|
-
return
|
|
816
|
+
return g(), y("div", {
|
|
817
817
|
ref_key: "playerWrap",
|
|
818
818
|
ref: m,
|
|
819
819
|
id: "playerWrap",
|
|
@@ -853,7 +853,7 @@ const ut = /* @__PURE__ */ H(it, [["render", rt]]), dt = {
|
|
|
853
853
|
]),
|
|
854
854
|
_: 1
|
|
855
855
|
}),
|
|
856
|
-
q(U) ? E("", !0) : (
|
|
856
|
+
q(U) ? E("", !0) : (g(), y("div", mt, [
|
|
857
857
|
p(ee, { name: "scale-out" }, {
|
|
858
858
|
default: te(() => [
|
|
859
859
|
P(t("div", ft, [
|
|
@@ -871,7 +871,7 @@ const ut = /* @__PURE__ */ H(it, [["render", rt]]), dt = {
|
|
|
871
871
|
}),
|
|
872
872
|
p(Ke, { state: e }, null, 8, ["state"])
|
|
873
873
|
])),
|
|
874
|
-
q(U) ? E("", !0) : (
|
|
874
|
+
q(U) ? E("", !0) : (g(), y("input", {
|
|
875
875
|
key: 1,
|
|
876
876
|
ref_key: "refInput",
|
|
877
877
|
ref: b,
|
|
@@ -897,7 +897,7 @@ const ut = /* @__PURE__ */ H(it, [["render", rt]]), dt = {
|
|
|
897
897
|
loadType: e.loadStateType
|
|
898
898
|
}, null, 8, ["loadType"]),
|
|
899
899
|
p(st),
|
|
900
|
-
!q(U) && e.control ? (
|
|
900
|
+
!q(U) && e.control ? (g(), y("div", {
|
|
901
901
|
key: 2,
|
|
902
902
|
class: "player-control",
|
|
903
903
|
ref: "refPlayerControl",
|
|
@@ -947,18 +947,18 @@ const ut = /* @__PURE__ */ H(it, [["render", rt]]), dt = {
|
|
|
947
947
|
])
|
|
948
948
|
])
|
|
949
949
|
], -1)),
|
|
950
|
-
a.controlBtns.includes("speedRate") ? (
|
|
950
|
+
a.controlBtns.includes("speedRate") ? (g(), y("div", kt, [
|
|
951
951
|
D(_(e.speedActive == "1.0" ? "倍速" : e.speedActive + "x") + " ", 1),
|
|
952
952
|
t("div", Tt, [
|
|
953
953
|
t("ul", bt, [
|
|
954
|
-
(
|
|
954
|
+
(g(!0), y(le, null, oe(e.speedRate, (h) => (g(), y("li", {
|
|
955
955
|
class: z({ "speed-active": e.speedActive == h }),
|
|
956
956
|
onClick: (Rt) => B(h)
|
|
957
957
|
}, _(h) + "X ", 11, xt))), 256))
|
|
958
958
|
])
|
|
959
959
|
])
|
|
960
960
|
])) : E("", !0),
|
|
961
|
-
a.controlBtns.includes("volume") ? (
|
|
961
|
+
a.controlBtns.includes("volume") ? (g(), y("div", St, [
|
|
962
962
|
t("div", _t, [
|
|
963
963
|
t("div", {
|
|
964
964
|
class: z(["volume-main", { "is-muted": e.muted }])
|
|
@@ -1025,7 +1025,7 @@ const ut = /* @__PURE__ */ H(it, [["render", rt]]), dt = {
|
|
|
1025
1025
|
])
|
|
1026
1026
|
])
|
|
1027
1027
|
]),
|
|
1028
|
-
a.controlBtns.includes("pip") ? (
|
|
1028
|
+
a.controlBtns.includes("pip") ? (g(), y("div", {
|
|
1029
1029
|
key: 2,
|
|
1030
1030
|
class: "tool-item pip-btn",
|
|
1031
1031
|
onClick: M
|
|
@@ -1033,7 +1033,7 @@ const ut = /* @__PURE__ */ H(it, [["render", rt]]), dt = {
|
|
|
1033
1033
|
p(ut, { class: "biggerAni" }),
|
|
1034
1034
|
s[12] || (s[12] = t("div", { class: "tool-item-main" }, "画中画", -1))
|
|
1035
1035
|
])) : E("", !0),
|
|
1036
|
-
a.controlBtns.includes("pageFullScreen") ? (
|
|
1036
|
+
a.controlBtns.includes("pageFullScreen") ? (g(), y("div", {
|
|
1037
1037
|
key: 3,
|
|
1038
1038
|
class: "tool-item pip-btn",
|
|
1039
1039
|
onClick: s[7] || (s[7] = (h) => e.webFullScreen = !e.webFullScreen)
|
|
@@ -1048,7 +1048,7 @@ const ut = /* @__PURE__ */ H(it, [["render", rt]]), dt = {
|
|
|
1048
1048
|
]),
|
|
1049
1049
|
s[13] || (s[13] = t("div", { class: "tool-item-main" }, "网页全屏", -1))
|
|
1050
1050
|
])) : E("", !0),
|
|
1051
|
-
a.controlBtns.includes("fullScreen") ? (
|
|
1051
|
+
a.controlBtns.includes("fullScreen") ? (g(), y("div", {
|
|
1052
1052
|
key: 4,
|
|
1053
1053
|
class: "tool-item fullScreen-btn",
|
|
1054
1054
|
onClick: C
|
|
@@ -1078,7 +1078,7 @@ const ut = /* @__PURE__ */ H(it, [["render", rt]]), dt = {
|
|
|
1078
1078
|
},
|
|
1079
1079
|
setup(l) {
|
|
1080
1080
|
const o = l, u = A(() => ({ fontSize: /^\d+$/.test(o.size) ? o.size + "px" : o.size }));
|
|
1081
|
-
return (a, e) => (
|
|
1081
|
+
return (a, e) => (g(), y("i", {
|
|
1082
1082
|
class: z(["icon iconfont", l.icon]),
|
|
1083
1083
|
style: L(u.value)
|
|
1084
1084
|
}, null, 6));
|
|
@@ -1092,5 +1092,6 @@ const ut = /* @__PURE__ */ H(it, [["render", rt]]), dt = {
|
|
|
1092
1092
|
}
|
|
1093
1093
|
};
|
|
1094
1094
|
export {
|
|
1095
|
+
Et as VueVideoPlus,
|
|
1095
1096
|
Wt as default
|
|
1096
1097
|
};
|
package/dist/vueVideo-umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,P){typeof exports=="object"&&typeof module<"u"?module.exports=P(require("vue"),require("//at.alicdn.com/t/c/font_4726673_sgkem61p1m8.js")):typeof define=="function"&&define.amd?define(["vue","//at.alicdn.com/t/c/font_4726673_sgkem61p1m8.js"],P):(e=typeof globalThis<"u"?globalThis:e||self,e["vueVideo++"]=P(e.Vue))})(this,function(e){"use strict";const P=["loadstart","play","pause","playing","seeking","seeked","canplay","waiting","durationchange","progress","timeupdate","ended","error","stalled"],U={width:{type:String,default:"800px"},height:{type:String,default:"450px"},color:{type:String,default:"#409eff"},src:{required:!0,type:String,default:""},title:{type:String,default:""},type:{type:String,default:"video/mp4"},poster:{type:String,default:""},webFullScreen:{type:Boolean,default:!1},speed:{type:Boolean,default:!0},currentTime:{type:Number,default:0},playsinline:{type:Boolean,default:!1},muted:{type:Boolean,default:!0},speedRate:{type:Array,default:()=>["2.0","1.5","1.25","1.0","0.75","0.5"]},autoPlay:{type:Boolean,default:!1},loop:{type:Boolean,default:!1},mirror:{type:Boolean,default:!1},lightOff:{type:Boolean,default:!1},volume:{type:Number,default:.3},control:{type:Boolean,default:!0},controlBtns:{type:Array,default:["audioTrack","quality","speedRate","volume","setting","pip","pageFullScreen","fullScreen"]},preload:{type:String,default:"auto"}},X=o=>`${parseInt("0x"+o.slice(1,3))},${parseInt("0x"+o.slice(3,5))},${parseInt("0x"+o.slice(5,7))}`,j=o=>o.charAt(0).toUpperCase()+o.slice(1),$="ontouchstart"in window,L=o=>{let l=~~(o/3600),c=~~(o%3600/60),a=~~(o%60);return l=l<10?"0"+l:l,c=c<10?"0"+c:c,a=a<10?"0"+a:a,`${l}:${c}:${a}`},Y=o=>{document.pictureInPictureElement?document.exitPictureInPicture().catch(l=>{console.log(l,"Video failed to leave Picture-in-Picture mode.")}):o.requestPictureInPicture().catch(l=>{console.log(l,"Video failed to enter Picture-in-Picture mode.")})},G=o=>{let l=document,c=document.fullscreenElement;return c?(document.exitFullscreen||l.webkitExitFullScreen).call(l):o.requestFullscreen.call(o),!c},J=["xlink:href","fill"],Q=e.defineComponent({__name:"SvgIcon",props:{prefix:{type:String,default:"#icon-"},name:String,color:{type:String},width:{type:String,default:"16px"},height:{type:String,default:"16px"},class:{type:String}},setup(o){return(l,c)=>(e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",o.class]),style:e.normalizeStyle({width:o.width,height:o.height})},[e.createElementVNode("use",{"xlink:href":o.prefix+o.name,fill:o.color},null,8,J)],6))]))}}),_=(o,l)=>{const c=o.__vccOpts||o;for(const[a,t]of l)c[a]=t;return c},D=_(Q,[["__scopeId","data-v-7fc789fa"]]),Z={key:0},v={class:"mr5"},ee={class:"mr5"},te=_(e.defineComponent({__name:"Loading",props:{loadType:String,text:{type:String,default:""}},setup(o){const{proxy:l}=e.getCurrentInstance(),c=["loadstart","waiting","ended","error","stalled"],a=o,t=()=>{l.$parent.play()},u=e.computed(()=>{let n="background: rgba(0, 0, 0, .1);z-index:1";return a.loadType=="loadstart"&&(n="background: rgba(0, 0, 0, 1);;z-index:3"),n});return(n,m)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"loading",style:e.normalizeStyle(u.value)},[e.createElementVNode("div",null,[o.loadType=="loadstart"?(e.openBlock(),e.createElementBlock("span",Z,[m[0]||(m[0]=e.createElementVNode("i",{class:"rotating iconfont icon-loading f50"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(o.text),1)])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("span",null,[e.createVNode(D,{color:"#fff",name:"loading",width:"40",height:"40",class:"rotating"}),m[1]||(m[1]=e.createElementVNode("p",{style:{"margin-top":"6px"}},"正在缓冲...",-1))],512),[[e.vShow,o.loadType=="waiting"]]),e.withDirectives(e.createElementVNode("span",null,[e.createElementVNode("p",{onClick:t,class:"d-flex-x d-pointer"},[e.createElementVNode("span",v,[e.createVNode(D,{color:"#fff",name:"replay",width:"26",height:"26"}),m[2]||(m[2]=e.createTextVNode("重新播放 "))])])],512),[[e.vShow,o.loadType=="ended"]]),e.withDirectives(e.createElementVNode("span",null,[e.createElementVNode("p",{onClick:t,class:"d-flex-x d-pointer"},[e.createElementVNode("span",ee,[e.createVNode(D,{color:"#fff",name:"replay",width:"26",height:"26"}),m[3]||(m[3]=e.createTextVNode(" 请求错误 "))])])],512),[[e.vShow,o.loadType=="error"||o.loadType=="stalled"]])])],4)),[[e.vShow,c.includes(o.loadType)]])}}),[["__scopeId","data-v-139d9272"]]),C=function(o,l,c,a=!1){o&&l&&c&&o.addEventListener(l,c,a)},S=function(o,l,c,a=!1){o&&l&&c&&o.removeEventListener(l,c,a)},F=_(e.defineComponent({__name:"ProgressBar",props:{modelValue:{required:!0,type:Number,default:0},disabled:{type:Boolean,default:!1},vertical:{type:Boolean,default:!1},hover:{type:Boolean,default:!0},hoverText:{type:String,default:""},preload:{type:Number,default:0},size:{type:String,default:"10px"}},emits:["update:modelValue","change","onMousemove"],setup(o,{emit:l}){e.useCssVars(d=>({"56f40db4":o.size}));const c=e.ref(),a=e.ref(),t=o,u=l,n=e.reactive({dragging:!1,mousePosition:0,hoverTipsPos:"50%"}),m=e.computed(()=>{let d=t.modelValue<0?0:t.modelValue>1?1:t.modelValue;return t.vertical?`height:${d*100}%`:`width:${d*100}%`}),w=e.computed(()=>{let d=t.preload<0?0:t.preload>1?1:t.preload;return t.vertical?`height:${d*100}%`:`width:${d*100}%`}),h=e.computed(()=>{let d=n.mousePosition<0?0:n.mousePosition>1?1:n.mousePosition;return t.vertical?`bottom:${d*100}%`:`left:${d*100}%`}),i=d=>{d.preventDefault()},p=d=>{t.disabled||(d.preventDefault(),n.dragging=!0,f(d),C(window,"mousemove",B),C(window,"touchmove",B),C(window,"mouseup",x),C(window,"touchend",x))},V=d=>{if(!t.hover)return;let g=T(d);if(u("onMousemove",d,g),n.mousePosition=g,t.vertical)return;let N=c.value,b=a.value.clientWidth/2,E=d.clientX-N.getBoundingClientRect().left;E<b?(console.log("11"),n.hoverTipsPos=b-E+"px"):N.clientWidth-E<b?(console.log("22"),n.hoverTipsPos=N.clientWidth-E-b+"px"):n.hoverTipsPos="50%"},f=d=>{let g=T(d);u("update:modelValue",g),u("change",d,g)},T=d=>{let g=c.value,N=0;if(t.vertical){let b=g.clientHeight;N=(g.getBoundingClientRect().bottom-d.clientY)/b}else N=(d.clientX-g.getBoundingClientRect().left)/g.clientWidth;return N<0?0:N>1?1:N},B=d=>{f(d)},x=d=>{n.dragging&&(S(window,"mousemove",B),S(window,"touchmove",B),S(window,"mouseup",x),S(window,"touchend",x),S(window,"contextmenu",x),setTimeout(()=>{n.dragging=!1},0))};return(d,g)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"refProgress",ref:c,class:e.normalizeClass(["progress",{"is-vertical":t.vertical}]),onMousedown:e.withModifiers(p,["stop"]),onContextmenu:i},[e.createElementVNode("div",{class:"progress__runway",onMousemove:V},[e.withDirectives(e.createElementVNode("div",{class:"progress__cursor",style:e.normalizeStyle(h.value)},[e.withDirectives(e.createElementVNode("div",{class:"progress__tips",ref_key:"refTips",ref:a,style:e.normalizeStyle({left:n.hoverTipsPos})},e.toDisplayString(o.hoverText),5),[[e.vShow,t.hoverText]])],4),[[e.vShow,o.hover]]),e.createElementVNode("div",{class:"progress__preload",style:e.normalizeStyle(w.value)},null,4),e.createElementVNode("div",{class:"progress__bar",style:e.normalizeStyle(m.value)},null,4)],32)],34))}}),[["__scopeId","data-v-39bb7042"]]);function oe(o,l,c){var a=c||{},t=a.noTrailing,u=t===void 0?!1:t,n=a.noLeading,m=n===void 0?!1:n,w=a.debounceMode,h=w===void 0?void 0:w,i,p=!1,V=0;function f(){i&&clearTimeout(i)}function T(x){var d=x||{},g=d.upcomingOnly,N=g===void 0?!1:g;f(),p=!N}function B(){for(var x=arguments.length,d=new Array(x),g=0;g<x;g++)d[g]=arguments[g];var N=this,b=Date.now()-V;if(p)return;function E(){V=Date.now(),l.apply(N,d)}function z(){i=void 0}!m&&h&&!i&&E(),f(),h===void 0&&b>o?m?(V=Date.now(),u||(i=setTimeout(h?z:E,o))):E():u!==!0&&(i=setTimeout(h?z:E,h===void 0?o-b:o))}return B.cancel=T,B}function R(o,l,c){var a={},t=a.atBegin,u=t===void 0?!1:t;return oe(o,l,{debounceMode:u!==!1})}const le=["checked"],H=_(e.defineComponent({__name:"Switch",props:{modelValue:{type:[Number,String,Boolean]},width:{type:String,default:"40px"},trueValue:{type:[Number,String,Boolean],default:!0},falseValue:{type:[Number,String,Boolean],default:!0},activeColor:{type:[String],default:"#409EFF"}},emits:["update:modelValue","change"],setup(o,{emit:l}){e.useCssVars(m=>({"8eab8736":o.width,"7a1ce148":o.activeColor}));const c=o,a=l,t=e.ref(),u=e.computed(()=>c.modelValue===c.trueValue),n=m=>{e.nextTick(()=>{const w=m.target.checked;a("update:modelValue",w),a("change",w)})};return(m,w)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["switch",{"is-checked":u.value}])},[e.createElementVNode("input",{type:"checkbox",class:"switch_input",ref_key:"input",ref:t,checked:u.value,onChange:w[0]||(w[0]=h=>n(h))},null,40,le),w[1]||(w[1]=e.createElementVNode("span",{class:"switch_action"},null,-1))],2))}}),[["__scopeId","data-v-4ddca1e1"]]),ne={class:"status"},ae={class:"flex-center"},re={class:"status-icon"},se={class:"flex-center"},ie={style:{"margin-right":"5px"}},ce=_(e.defineComponent({__name:"Handle",props:["state"],setup(o){return e.ref(!0),(l,c)=>{const a=e.resolveComponent("SvgIcon");return e.withDirectives((e.openBlock(),e.createElementBlock("div",ne,[e.withDirectives(e.createElementVNode("li",ae,[e.createElementVNode("span",re,[e.createVNode(a,{name:`volume-${o.state.volume==0||o.state.muted?"mute":o.state.volume>.5?"up":"down"}`,width:"25",height:"25",color:"#fff"},null,8,["name"])]),e.createTextVNode(" "+e.toDisplayString(~~(o.state.volume*100))+"% ",1)],512),[[e.vShow,o.state.handleType=="volume"]]),e.withDirectives(e.createElementVNode("li",se,[e.createVNode(a,{color:"#fff",name:"play",width:"16",height:"16"}),e.createElementVNode("span",ie,[e.createVNode(a,{color:"#fff",name:"play",width:"16",height:"16"})]),c[0]||(c[0]=e.createTextVNode(" 5倍速播放中 "))],512),[[e.vShow,o.state.handleType=="playbackRate"||o.state.isMultiplesPlay]])],512)),[[e.vShow,o.state.handleType||o.state.isMultiplesPlay]])}}}),[["__scopeId","data-v-7b4544a3"]]),A="1.0.0",de={key:0,class:"player-dialog"},pe={class:"player-dialog-body"},me={class:"player-dialog-title"},fe={class:"player-hotkey-panel"},ue={class:"player-hotkey-panel-item"},ye={class:"player-filter-panel"},ge={class:"player-filter-panel-item"},he={class:"player-filter-panel-item"},Ve={class:"player-filter-panel-item"},we={key:0,class:"player-contextmenu"},ke=["playerKeyCode"],Ne=_(e.defineComponent({__name:"Contextmenu",setup(o){const l=e.reactive({show:!1,dialogType:"",dialogTitle:"11",version:A,mouseX:0,mouseY:0}),c=[{label:"视频色彩调整",key:"filter"},{label:"快捷键说明",key:"hotkey"},{label:"复制视频网址",key:"copy"},{label:"版本:"+A,key:"version"}],a=[{key:"Space",label:"播放/暂停"},{key:"→",label:"单次快进10s,长按5倍速播放"},{key:"←",label:"快退5s"},{key:"↑",label:"音量增加10%"},{key:"↓",label:"音量增加降低10%"},{key:"Esc",label:"退出全屏/退出网页全屏"},{key:"F",label:"全屏/退出全屏"}],t=e.reactive({saturate:.392,brightness:.392,contrast:.392}),u=e.computed(()=>({left:l.mouseX+"px",top:l.mouseY+"px"}));e.watch(t,i=>{console.log(i.saturate,"newval");let p=document.querySelector("#PlayerVideo"),V=(i.saturate*2.55).toFixed(2),f=(i.brightness*2.55).toFixed(2),T=(i.contrast*2.55).toFixed(2);p.style.filter=`saturate(${V}) brightness(${f}) contrast(${T})`});const n=()=>{t.saturate=.392,t.brightness=.392,t.contrast=.392},m=i=>{i.key=="Escape"&&h(0)},w=i=>{i.preventDefault();let p=document.querySelector("#playerWrap");C(window,"keydown",m),C(window,"click",h);let V=p.clientWidth;l.mouseX=i.clientX-p.getBoundingClientRect().left,V-l.mouseX<130&&(l.mouseX=l.mouseX+(V-l.mouseX-130)),l.mouseY=i.clientY-p.getBoundingClientRect().top,l.show=!0},h=async i=>{let p=i.target.nodeName=="LI",V=i.target.attributes.playerKeyCode&&i.target.attributes.playerKeyCode.value,f=c.map(T=>T.key);if(p&&f.includes(V))if(l.dialogTitle=i.target.innerText,l.dialogType=V,V=="copy"){try{await navigator.clipboard.writeText(window.location.href),alert("网址信息已复制到剪切板")}catch(T){console.log("复制失败: ",T)}l.dialogType=""}else V=="version"&&(l.dialogType="");l.show=!1,S(window,"keydown",m),S(window,"click",h)};return e.onMounted(()=>{let i=document.querySelector("#playerWrap");S(window,"click",h),S(window,"keydown",m),C(i,"contextmenu",w)}),e.onUnmounted(()=>{let i=document.querySelector("#playerWrap");S(window,"keydown",m),S(window,"click",h),S(i,"contextmenu",w)}),(i,p)=>{const V=e.resolveComponent("SvgIcon");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.Transition,{name:"fade-in"},{default:e.withCtx(()=>[l.dialogType?(e.openBlock(),e.createElementBlock("div",de,[e.createElementVNode("div",pe,[e.createElementVNode("h5",me,[e.createTextVNode(e.toDisplayString(l.dialogTitle)+" ",1),e.createElementVNode("span",{class:"icon-close",onClick:p[0]||(p[0]=f=>l.dialogType="")},[e.createVNode(V,{color:"#fff",name:"x-copy",width:"25",height:"25",class:"icon-close"})])]),e.withDirectives(e.createElementVNode("ul",fe,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(a,f=>e.createElementVNode("li",ue,[e.createElementVNode("span",null,e.toDisplayString(f.key),1),e.createElementVNode("span",null,e.toDisplayString(f.label),1)])),64))],512),[[e.vShow,l.dialogType=="hotkey"]]),e.withDirectives(e.createElementVNode("ul",ye,[e.createElementVNode("li",ge,[p[4]||(p[4]=e.createElementVNode("span",null,"饱和度",-1)),e.createVNode(F,{class:"filter-panel-progress",size:"5px",modelValue:t.saturate,"onUpdate:modelValue":p[1]||(p[1]=f=>t.saturate=f)},null,8,["modelValue"]),e.createElementVNode("span",null,e.toDisplayString(Math.round(t.saturate*255)),1)]),e.createElementVNode("li",he,[p[5]||(p[5]=e.createElementVNode("span",null,"亮度",-1)),e.createVNode(F,{class:"filter-panel-progress",size:"5px",modelValue:t.brightness,"onUpdate:modelValue":p[2]||(p[2]=f=>t.brightness=f)},null,8,["modelValue"]),e.createElementVNode("span",null,e.toDisplayString(Math.round(t.brightness*255)),1)]),e.createElementVNode("li",Ve,[p[6]||(p[6]=e.createElementVNode("span",null,"对比度",-1)),e.createVNode(F,{class:"filter-panel-progress",size:"5px",modelValue:t.contrast,"onUpdate:modelValue":p[3]||(p[3]=f=>t.contrast=f)},null,8,["modelValue"]),e.createElementVNode("span",null,e.toDisplayString(Math.round(t.contrast*255)),1)]),e.createElementVNode("span",{onClick:n,title:"重置","aria-label":"重置",class:"player-filter-reset"},"重置")],512),[[e.vShow,l.dialogType=="filter"]])])])):e.createCommentVNode("",!0)]),_:1}),l.show?(e.openBlock(),e.createElementBlock("div",we,[e.createElementVNode("ul",{class:"player-contextmenu-body",style:e.normalizeStyle(u.value)},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(c,f=>e.createElementVNode("li",{playerKeyCode:f.key,key:f.key},e.toDisplayString(f.label),9,ke)),64))],4),p[7]||(p[7]=e.createElementVNode("input",{class:"player-copyText"},null,-1))])):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-0633897a"]]),Ee={};function Se(o,l){return e.openBlock(),e.createElementBlock("div",null,l[0]||(l[0]=[e.createStaticVNode('<svg width="20px" height="20px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="pc" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="鼠标悬浮态" transform="translate(-1011.000000, -614.000000)"><g id="编组-3备份" transform="translate(-0.000000, 0.000000)"><g id="编组-9" transform="translate(771.000000, 614.000000)"><g id="网页全屏icon备份" transform="translate(240.000000, 0.000000)"><rect id="矩形" fill="#D8D8D8" opacity="0" x="0" y="0" width="24" height="24"></rect><g id="编组-16" transform="translate(3.000000, 3.000000)"><path d="M6.02375417,18 L4.41666657,18 C1.97740898,18 2.987229e-16,16.022591 0,13.5833334 L0,4.41666657 C-2.987229e-16,1.97740898 1.97740898,-4.4009407e-16 4.41666657,0 L13.5277779,0 C15.9670355,-4.4808435e-16 17.9444444,1.97740898 17.9444444,4.41666657 L17.9444444,6.94881161 L17.9444444,6.94881161" id="路径" stroke="#FFFFFF" stroke-width="2.2" stroke-linecap="square" stroke-linejoin="round"></path><rect id="矩形" stroke="#FFFFFF" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" x="10.5555556" y="11.6470588" width="8.44444444" height="6.35294118" rx="2.10317456"></rect><polyline id="路径-4备份" stroke="#FFFFFF" stroke-width="2.2" stroke-linecap="square" stroke-linejoin="round" transform="translate(6.838734, 6.948812) scale(-1, -1) translate(-6.838734, -6.948812) " points="5.25540107 8.5370469 5.25540107 5.36057631 8.42206774 5.36057631"></polyline><polygon id="矩形" fill="#FFFFFF" transform="translate(6.163971, 6.008746) rotate(-45.000000) translate(-6.163971, -6.008746) " points="5.07520753 2.83865288 7.26397133 2.83570116 7.25273513 9.17883841 5.06397133 9.18179013"></polygon></g></g></g></g></g></g></svg>',1)]))}const Te=_(Ee,[["render",Se]]),xe={class:"Player",id:"PlayerVideo"},Be=["src","controls","webkit-playsinline","playsinline","loop","poster","volume","muted"],be={class:"player-lightoff"},_e={key:0,class:"player-state"},Ce={class:"play-btn"},Pe={class:"control-progress"},$e={class:"tool-bar"},Fe={class:"tool-item tool-time audioTrack-btn"},De={class:"total-time"},ze={class:"tool-bar"},Ie={key:0,style:{position:"relative",top:"-2px"},class:"tool-item speedRate-btn"},Me={class:"tool-item-main"},Le={class:"speed-main"},He=["onClick"],Re={key:1,class:"tool-item volume-btn"},Ae={class:"tool-item-main volume-box",style:{width:"52px"}},qe={class:"volume-text-size"},We={class:"tool-item setting-btn"},Oe={class:"biggerAni"},Ke={class:"tool-item-main"},Ue={class:"speed-main"},Xe={class:"biggerAni"},je={class:"biggerAni"},Ye=e.defineComponent({__name:"VueVideoPlus",props:U,emits:[...P,"mirrorChange","loopChange","lightOffChange"],setup(o,{expose:l,emit:c}){e.useCssVars(s=>({"3c74652b":e.unref(Je),"48c06094":s.width,"95068fce":s.height}));const a=o,t=e.reactive({Video:null,...a,muted:a.muted,playBtnState:a.autoPlay?"pause":"play",loadStateType:"loadstart",fullScreen:!1,handleType:"",currentTime:"00:00:00",preloadBar:0,totalTime:"00:00:00",isVideoHovering:!0,speedActive:"1.0",playProgress:0,isMultiplesPlay:!1,longPressTimeout:0,progressCursorTime:"00:00:00",qualityLevels:[],currentLevel:0}),u=c,n=e.ref(),m=e.ref(),w=e.ref(),h=(...s)=>r=>s.reverse().reduce((k,y)=>y(k),r),i=P.reduce((s,r)=>{let k=`on${j(r)}`;return s[k]=y=>{t.loadStateType=r,u(r,y)},s},{});i.onCanplay=h(i.onCanplay,()=>{t.playBtnState!="play"&&n.value.play(),t.autoPlay&&(n.value.play(),t.playBtnState="pause")}),i.onDurationchange=s=>{u("durationchange",s),a.currentTime!=0&&(n.value.currentTime=a.currentTime),i.onTimeupdate(s)},i.onEnded=h(i.onEnded,()=>{t.playBtnState="replay"}),i.onError=h(i.onError,()=>{t.playBtnState="replay"}),i.onProgress=s=>{u("progress",s);let r=s.target.duration,k=s.target.buffered,y=s.target.buffered.length&&s.target.buffered.end(k-1);t.preloadBar=y/r};const p=(s,r)=>{let k=n.value.duration||n.value.target.duration;n.value.currentTime=k*r,t.playBtnState=="play"&&(n.value.play(),t.playBtnState="pause")},V=(s,r)=>{t.progressCursorTime=L(n.value.duration*r)},f=R(2500,()=>{t.isVideoHovering=!1}),T=s=>{t.isVideoHovering=!0,f()},B=()=>{$||w.value.focus()},x=s=>{t.speedActive=s,n.value.playbackRate=s},d=s=>{u("mirrorChange",s,n.value)},g=s=>{u("loopChange",s,n.value)},N=s=>{u("lightOffChange",s,n.value)},b=()=>{Y(n.value)},E=()=>{t.fullScreen=G(m.value)},z=()=>{t.muted=!t.muted,t.volume==0&&(t.volume=.05)};i.onTimeupdate=s=>{u("timeupdate",s);let r=s.duration||s.target.duration||0,k=s.currentTime||s.target.currentTime;t.playProgress=k/r,t.currentTime=L(k),t.totalTime=L(r)};const Ge=()=>{n.value.canPlayType(a.type)||console.error("vue3-video-play: Format not supported,Check the [type] parameter"),(n.value.canPlayType(a.type)||n.value.canPlayType("application/vnd.apple.mpegurl"))&&(t.muted=a.autoPlay)};e.watch(()=>a.src,s=>{e.nextTick(()=>{Ge()})},{immediate:!0});const Je=X(t.color),W=R(500,()=>{t.handleType=""}),Qe=s=>{console.log(i.onTimeupdate,"left"),a.speed&&(n.value.currentTime=n.value.currentTime<10?.1:n.value.currentTime-10,i.onTimeupdate(n.value),I())},Ze=s=>{s.preventDefault(),s.code=="ArrowUp"?t.volume=t.volume+.1>1?1:t.volume+.1:t.volume=t.volume-.1<0?0:t.volume-.1,t.muted=!1,t.handleType="volume",W()},O=s=>{s.preventDefault;let r=s.type;if(s.key=="ArrowRight"){if(I(),r=="keyup"){if(clearTimeout(t.longPressTimeout),!a.speed&&!t.longPressTimeout)return;t.isMultiplesPlay?(n.value.playbackRate=t.speedActive,t.isMultiplesPlay=!1):(n.value.currentTime=n.value.currentTime+10,i.onTimeupdate(n.value))}else if(r=="keydown"){if(!a.speed)return;t.isMultiplesPlay&&clearTimeout(t.longPressTimeout),t.longPressTimeout=setTimeout(()=>{t.isMultiplesPlay=!0,n.value.playbackRate=5,t.handleType="playbackRate",W()},500)}}},I=()=>{t.loadStateType="play",n.value.play().catch(()=>{n.value.load(),console.log(n.value.readyState,"readysat."),console.log(n.value.networkState,"netwoir"),n.value.readyState&&setTimeout(()=>{n.value.play().catch(()=>{console.log(n.value.readyState),t.playBtnState="replay",t.loadStateType="error"})},200)}),t.playBtnState="pause"},K=()=>{n.value.pause(),t.playBtnState="play"},M=s=>{s&&s.preventDefault(),t.playBtnState=="play"||t.playBtnState=="replay"?I():t.playBtnState=="pause"&&K()};return e.onMounted(()=>{t.Video=n.value,B()}),l({play:I,pause:K,togglePlay:M}),(s,r)=>{const k=e.resolveComponent("SvgIcon");return e.openBlock(),e.createElementBlock("div",{ref_key:"playerWrap",ref:m,id:"playerWrap",class:e.normalizeClass(["player-wrap",{"web-full-screen":t.webFullScreen,"is-lightoff":t.lightOff,"player-wrap-hover":t.playBtnState=="play"||t.isVideoHovering}]),onMousemove:T},[e.createElementVNode("div",xe,[e.createElementVNode("video",e.mergeProps({width:"100%",height:"100%",src:s.src,ref_key:"v",ref:n,controls:!!(e.unref($)&&t.speed),class:{"video-mirror":t.mirror}},e.unref(i),{class:"Player-video",id:"v","webkit-playsinline":a.playsinline,playsinline:a.playsinline,loop:t.loop,poster:s.poster,volume:t.volume,muted:t.muted,fill:"cover"})," 您的浏览器不支持Video标签。 ",16,Be)]),e.createVNode(e.Transition,{name:"fade-in"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",be,null,512),[[e.vShow,t.lightOff]])]),_:1}),e.unref($)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",_e,[e.createVNode(e.Transition,{name:"scale-out"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",Ce,[e.createVNode(k,{color:"#fff",name:"play",width:"40",height:"40"})],512),[[e.vShow,t.playBtnState=="play"]])]),_:1}),e.createVNode(ce,{state:t},null,8,["state"])])),e.unref($)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("input",{key:1,ref_key:"refInput",ref:w,readonly:!0,type:"input",onClick:M,onDblclick:E,onKeyup:[e.withKeys(E,["f"]),r[0]||(r[0]=e.withKeys(y=>t.webFullScreen=!1,["esc"])),O],onKeydown:[e.withKeys(M,["space"]),e.withKeys(Qe,["arrow-left"]),e.withKeys(Ze,["arrow-up","arrow-down"]),O],class:"player-input",maxlength:"0"},null,544)),e.createVNode(te,{loadType:t.loadStateType},null,8,["loadType"]),e.createVNode(Ne),!e.unref($)&&t.control?(e.openBlock(),e.createElementBlock("div",{key:2,class:"player-control",ref:"refPlayerControl",onClick:B},[e.createElementVNode("div",Pe,[e.createVNode(F,{class:"progress-bar",onOnMousemove:V,onChange:p,modelValue:t.playProgress,"onUpdate:modelValue":r[1]||(r[1]=y=>t.playProgress=y),preload:t.preloadBar,hoverText:t.progressCursorTime},null,8,["modelValue","preload","hoverText"])]),e.createElementVNode("div",{class:"control-tool",onClick:B},[e.createElementVNode("div",$e,[e.createElementVNode("div",{class:"tool-item",onClick:M},[e.createVNode(k,{color:"#fff",name:`${t.playBtnState}`,width:"24",height:"24"},null,8,["name"])]),e.createElementVNode("div",Fe,[e.createElementVNode("span",null,e.toDisplayString(t.currentTime),1),r[8]||(r[8]=e.createElementVNode("span",{style:{margin:"0 3px"}},"/",-1)),e.createElementVNode("span",De,e.toDisplayString(t.totalTime),1)])]),e.createElementVNode("div",ze,[r[15]||(r[15]=e.createElementVNode("div",{class:"tool-item quality-btn"},[e.createElementVNode("div",{class:"tool-item-main"},[e.createElementVNode("ul",{class:"speed-main",style:{"text-align":"center"}},[e.createElementVNode("li")])])],-1)),a.controlBtns.includes("speedRate")?(e.openBlock(),e.createElementBlock("div",Ie,[e.createTextVNode(e.toDisplayString(t.speedActive=="1.0"?"倍速":t.speedActive+"x")+" ",1),e.createElementVNode("div",Me,[e.createElementVNode("ul",Le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.speedRate,y=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass({"speed-active":t.speedActive==y}),onClick:ct=>x(y)},e.toDisplayString(y)+"X ",11,He))),256))])])])):e.createCommentVNode("",!0),a.controlBtns.includes("volume")?(e.openBlock(),e.createElementBlock("div",Re,[e.createElementVNode("div",Ae,[e.createElementVNode("div",{class:e.normalizeClass(["volume-main",{"is-muted":t.muted}])},[e.createElementVNode("span",qe,e.toDisplayString(t.muted?0:~~(t.volume*100))+"% ",1),e.createVNode(F,{onChange:r[2]||(r[2]=y=>t.muted=!1),hover:!1,size:"5px",vertical:!0,modelValue:t.volume,"onUpdate:modelValue":r[3]||(r[3]=y=>t.volume=y)},null,8,["modelValue"])],2)]),e.createElementVNode("span",{onClick:z,class:"biggerAni",style:{display:"flex",position:"relative",left:"5px"}},[e.createVNode(k,{name:`volume-${t.volume==0||t.muted?"mute":t.volume>.5?"up":"down"}`,width:"26",height:"26",color:"#fff"},null,8,["name"])])])):e.createCommentVNode("",!0),e.createElementVNode("div",We,[e.createElementVNode("span",Oe,[e.createVNode(k,{name:"settings",width:"26",height:"26",color:"#fff"})]),e.createElementVNode("div",Ke,[e.createElementVNode("ul",Ue,[e.createElementVNode("li",null,[r[9]||(r[9]=e.createTextVNode(" 镜像画面 ")),e.createVNode(H,{onChange:d,modelValue:t.mirror,"onUpdate:modelValue":r[4]||(r[4]=y=>t.mirror=y)},null,8,["modelValue"])]),e.createElementVNode("li",null,[r[10]||(r[10]=e.createTextVNode(" 循环播放 ")),e.createVNode(H,{onChange:g,modelValue:t.loop,"onUpdate:modelValue":r[5]||(r[5]=y=>t.loop=y)},null,8,["modelValue"])]),e.createElementVNode("li",null,[r[11]||(r[11]=e.createTextVNode(" 关灯模式")),e.createVNode(H,{onChange:N,modelValue:t.lightOff,"onUpdate:modelValue":r[6]||(r[6]=y=>t.lightOff=y)},null,8,["modelValue"])])])])]),a.controlBtns.includes("pip")?(e.openBlock(),e.createElementBlock("div",{key:2,class:"tool-item pip-btn",onClick:b},[e.createVNode(Te,{class:"biggerAni"}),r[12]||(r[12]=e.createElementVNode("div",{class:"tool-item-main"},"画中画",-1))])):e.createCommentVNode("",!0),a.controlBtns.includes("pageFullScreen")?(e.openBlock(),e.createElementBlock("div",{key:3,class:"tool-item pip-btn",onClick:r[7]||(r[7]=y=>t.webFullScreen=!t.webFullScreen)},[e.createElementVNode("span",Xe,[e.createVNode(k,{name:"webfullscreen",width:"20",height:"20",color:"#fff"})]),r[13]||(r[13]=e.createElementVNode("div",{class:"tool-item-main"},"网页全屏",-1))])):e.createCommentVNode("",!0),a.controlBtns.includes("fullScreen")?(e.openBlock(),e.createElementBlock("div",{key:4,class:"tool-item fullScreen-btn",onClick:E},[e.createElementVNode("span",je,[e.createVNode(k,{name:"fullscreen",width:"20",height:"20",color:"#fff"})]),r[14]||(r[14]=e.createElementVNode("div",{class:"tool-item-main"},"全屏",-1))])):e.createCommentVNode("",!0)])])],512)):e.createCommentVNode("",!0)],34)}}}),q={VueVideoPlus:_(Ye,[["__scopeId","data-v-50d8ebe5"]]),SvgIcon:D,Icon:_(Object.assign({name:"icon"},{props:{icon:String,size:[Number,String]},setup(o){const l=o,c=e.computed(()=>({fontSize:/^\d+$/.test(l.size)?l.size+"px":l.size}));return(a,t)=>(e.openBlock(),e.createElementBlock("i",{class:e.normalizeClass(["icon iconfont",o.icon]),style:e.normalizeStyle(c.value)},null,6))}}),[["__scopeId","data-v-7d306b2a"]])};return{install(o){Object.keys(q).forEach(l=>{o.component(l,q[l])})}}});
|
|
1
|
+
(function(C,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("//at.alicdn.com/t/c/font_4726673_sgkem61p1m8.js")):typeof define=="function"&&define.amd?define(["exports","vue","//at.alicdn.com/t/c/font_4726673_sgkem61p1m8.js"],e):(C=typeof globalThis<"u"?globalThis:C||self,e(C["vueVideo++"]={},C.Vue))})(this,function(C,e){"use strict";const R=["loadstart","play","pause","playing","seeking","seeked","canplay","waiting","durationchange","progress","timeupdate","ended","error","stalled"],j={width:{type:String,default:"800px"},height:{type:String,default:"450px"},color:{type:String,default:"#409eff"},src:{required:!0,type:String,default:""},title:{type:String,default:""},type:{type:String,default:"video/mp4"},poster:{type:String,default:""},webFullScreen:{type:Boolean,default:!1},speed:{type:Boolean,default:!0},currentTime:{type:Number,default:0},playsinline:{type:Boolean,default:!1},muted:{type:Boolean,default:!0},speedRate:{type:Array,default:()=>["2.0","1.5","1.25","1.0","0.75","0.5"]},autoPlay:{type:Boolean,default:!1},loop:{type:Boolean,default:!1},mirror:{type:Boolean,default:!1},lightOff:{type:Boolean,default:!1},volume:{type:Number,default:.3},control:{type:Boolean,default:!0},controlBtns:{type:Array,default:["audioTrack","quality","speedRate","volume","setting","pip","pageFullScreen","fullScreen"]},preload:{type:String,default:"auto"}},Y=o=>`${parseInt("0x"+o.slice(1,3))},${parseInt("0x"+o.slice(3,5))},${parseInt("0x"+o.slice(5,7))}`,G=o=>o.charAt(0).toUpperCase()+o.slice(1),$="ontouchstart"in window,L=o=>{let l=~~(o/3600),c=~~(o%3600/60),a=~~(o%60);return l=l<10?"0"+l:l,c=c<10?"0"+c:c,a=a<10?"0"+a:a,`${l}:${c}:${a}`},J=o=>{document.pictureInPictureElement?document.exitPictureInPicture().catch(l=>{console.log(l,"Video failed to leave Picture-in-Picture mode.")}):o.requestPictureInPicture().catch(l=>{console.log(l,"Video failed to enter Picture-in-Picture mode.")})},Q=o=>{let l=document,c=document.fullscreenElement;return c?(document.exitFullscreen||l.webkitExitFullScreen).call(l):o.requestFullscreen.call(o),!c},Z=["xlink:href","fill"],v=e.defineComponent({__name:"SvgIcon",props:{prefix:{type:String,default:"#icon-"},name:String,color:{type:String},width:{type:String,default:"16px"},height:{type:String,default:"16px"},class:{type:String}},setup(o){return(l,c)=>(e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",o.class]),style:e.normalizeStyle({width:o.width,height:o.height})},[e.createElementVNode("use",{"xlink:href":o.prefix+o.name,fill:o.color},null,8,Z)],6))]))}}),_=(o,l)=>{const c=o.__vccOpts||o;for(const[a,t]of l)c[a]=t;return c},D=_(v,[["__scopeId","data-v-7fc789fa"]]),ee={key:0},te={class:"mr5"},oe={class:"mr5"},le=_(e.defineComponent({__name:"Loading",props:{loadType:String,text:{type:String,default:""}},setup(o){const{proxy:l}=e.getCurrentInstance(),c=["loadstart","waiting","ended","error","stalled"],a=o,t=()=>{l.$parent.play()},u=e.computed(()=>{let n="background: rgba(0, 0, 0, .1);z-index:1";return a.loadType=="loadstart"&&(n="background: rgba(0, 0, 0, 1);;z-index:3"),n});return(n,m)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"loading",style:e.normalizeStyle(u.value)},[e.createElementVNode("div",null,[o.loadType=="loadstart"?(e.openBlock(),e.createElementBlock("span",ee,[m[0]||(m[0]=e.createElementVNode("i",{class:"rotating iconfont icon-loading f50"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(o.text),1)])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("span",null,[e.createVNode(D,{color:"#fff",name:"loading",width:"40",height:"40",class:"rotating"}),m[1]||(m[1]=e.createElementVNode("p",{style:{"margin-top":"6px"}},"正在缓冲...",-1))],512),[[e.vShow,o.loadType=="waiting"]]),e.withDirectives(e.createElementVNode("span",null,[e.createElementVNode("p",{onClick:t,class:"d-flex-x d-pointer"},[e.createElementVNode("span",te,[e.createVNode(D,{color:"#fff",name:"replay",width:"26",height:"26"}),m[2]||(m[2]=e.createTextVNode("重新播放 "))])])],512),[[e.vShow,o.loadType=="ended"]]),e.withDirectives(e.createElementVNode("span",null,[e.createElementVNode("p",{onClick:t,class:"d-flex-x d-pointer"},[e.createElementVNode("span",oe,[e.createVNode(D,{color:"#fff",name:"replay",width:"26",height:"26"}),m[3]||(m[3]=e.createTextVNode(" 请求错误 "))])])],512),[[e.vShow,o.loadType=="error"||o.loadType=="stalled"]])])],4)),[[e.vShow,c.includes(o.loadType)]])}}),[["__scopeId","data-v-139d9272"]]),P=function(o,l,c,a=!1){o&&l&&c&&o.addEventListener(l,c,a)},E=function(o,l,c,a=!1){o&&l&&c&&o.removeEventListener(l,c,a)},F=_(e.defineComponent({__name:"ProgressBar",props:{modelValue:{required:!0,type:Number,default:0},disabled:{type:Boolean,default:!1},vertical:{type:Boolean,default:!1},hover:{type:Boolean,default:!0},hoverText:{type:String,default:""},preload:{type:Number,default:0},size:{type:String,default:"10px"}},emits:["update:modelValue","change","onMousemove"],setup(o,{emit:l}){e.useCssVars(d=>({"56f40db4":o.size}));const c=e.ref(),a=e.ref(),t=o,u=l,n=e.reactive({dragging:!1,mousePosition:0,hoverTipsPos:"50%"}),m=e.computed(()=>{let d=t.modelValue<0?0:t.modelValue>1?1:t.modelValue;return t.vertical?`height:${d*100}%`:`width:${d*100}%`}),w=e.computed(()=>{let d=t.preload<0?0:t.preload>1?1:t.preload;return t.vertical?`height:${d*100}%`:`width:${d*100}%`}),h=e.computed(()=>{let d=n.mousePosition<0?0:n.mousePosition>1?1:n.mousePosition;return t.vertical?`bottom:${d*100}%`:`left:${d*100}%`}),i=d=>{d.preventDefault()},p=d=>{t.disabled||(d.preventDefault(),n.dragging=!0,f(d),P(window,"mousemove",b),P(window,"touchmove",b),P(window,"mouseup",x),P(window,"touchend",x))},V=d=>{if(!t.hover)return;let g=T(d);if(u("onMousemove",d,g),n.mousePosition=g,t.vertical)return;let N=c.value,B=a.value.clientWidth/2,S=d.clientX-N.getBoundingClientRect().left;S<B?(console.log("11"),n.hoverTipsPos=B-S+"px"):N.clientWidth-S<B?(console.log("22"),n.hoverTipsPos=N.clientWidth-S-B+"px"):n.hoverTipsPos="50%"},f=d=>{let g=T(d);u("update:modelValue",g),u("change",d,g)},T=d=>{let g=c.value,N=0;if(t.vertical){let B=g.clientHeight;N=(g.getBoundingClientRect().bottom-d.clientY)/B}else N=(d.clientX-g.getBoundingClientRect().left)/g.clientWidth;return N<0?0:N>1?1:N},b=d=>{f(d)},x=d=>{n.dragging&&(E(window,"mousemove",b),E(window,"touchmove",b),E(window,"mouseup",x),E(window,"touchend",x),E(window,"contextmenu",x),setTimeout(()=>{n.dragging=!1},0))};return(d,g)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"refProgress",ref:c,class:e.normalizeClass(["progress",{"is-vertical":t.vertical}]),onMousedown:e.withModifiers(p,["stop"]),onContextmenu:i},[e.createElementVNode("div",{class:"progress__runway",onMousemove:V},[e.withDirectives(e.createElementVNode("div",{class:"progress__cursor",style:e.normalizeStyle(h.value)},[e.withDirectives(e.createElementVNode("div",{class:"progress__tips",ref_key:"refTips",ref:a,style:e.normalizeStyle({left:n.hoverTipsPos})},e.toDisplayString(o.hoverText),5),[[e.vShow,t.hoverText]])],4),[[e.vShow,o.hover]]),e.createElementVNode("div",{class:"progress__preload",style:e.normalizeStyle(w.value)},null,4),e.createElementVNode("div",{class:"progress__bar",style:e.normalizeStyle(m.value)},null,4)],32)],34))}}),[["__scopeId","data-v-39bb7042"]]);function ne(o,l,c){var a=c||{},t=a.noTrailing,u=t===void 0?!1:t,n=a.noLeading,m=n===void 0?!1:n,w=a.debounceMode,h=w===void 0?void 0:w,i,p=!1,V=0;function f(){i&&clearTimeout(i)}function T(x){var d=x||{},g=d.upcomingOnly,N=g===void 0?!1:g;f(),p=!N}function b(){for(var x=arguments.length,d=new Array(x),g=0;g<x;g++)d[g]=arguments[g];var N=this,B=Date.now()-V;if(p)return;function S(){V=Date.now(),l.apply(N,d)}function z(){i=void 0}!m&&h&&!i&&S(),f(),h===void 0&&B>o?m?(V=Date.now(),u||(i=setTimeout(h?z:S,o))):S():u!==!0&&(i=setTimeout(h?z:S,h===void 0?o-B:o))}return b.cancel=T,b}function A(o,l,c){var a={},t=a.atBegin,u=t===void 0?!1:t;return ne(o,l,{debounceMode:u!==!1})}const ae=["checked"],H=_(e.defineComponent({__name:"Switch",props:{modelValue:{type:[Number,String,Boolean]},width:{type:String,default:"40px"},trueValue:{type:[Number,String,Boolean],default:!0},falseValue:{type:[Number,String,Boolean],default:!0},activeColor:{type:[String],default:"#409EFF"}},emits:["update:modelValue","change"],setup(o,{emit:l}){e.useCssVars(m=>({"8eab8736":o.width,"7a1ce148":o.activeColor}));const c=o,a=l,t=e.ref(),u=e.computed(()=>c.modelValue===c.trueValue),n=m=>{e.nextTick(()=>{const w=m.target.checked;a("update:modelValue",w),a("change",w)})};return(m,w)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["switch",{"is-checked":u.value}])},[e.createElementVNode("input",{type:"checkbox",class:"switch_input",ref_key:"input",ref:t,checked:u.value,onChange:w[0]||(w[0]=h=>n(h))},null,40,ae),w[1]||(w[1]=e.createElementVNode("span",{class:"switch_action"},null,-1))],2))}}),[["__scopeId","data-v-4ddca1e1"]]),re={class:"status"},se={class:"flex-center"},ie={class:"status-icon"},ce={class:"flex-center"},de={style:{"margin-right":"5px"}},pe=_(e.defineComponent({__name:"Handle",props:["state"],setup(o){return e.ref(!0),(l,c)=>{const a=e.resolveComponent("SvgIcon");return e.withDirectives((e.openBlock(),e.createElementBlock("div",re,[e.withDirectives(e.createElementVNode("li",se,[e.createElementVNode("span",ie,[e.createVNode(a,{name:`volume-${o.state.volume==0||o.state.muted?"mute":o.state.volume>.5?"up":"down"}`,width:"25",height:"25",color:"#fff"},null,8,["name"])]),e.createTextVNode(" "+e.toDisplayString(~~(o.state.volume*100))+"% ",1)],512),[[e.vShow,o.state.handleType=="volume"]]),e.withDirectives(e.createElementVNode("li",ce,[e.createVNode(a,{color:"#fff",name:"play",width:"16",height:"16"}),e.createElementVNode("span",de,[e.createVNode(a,{color:"#fff",name:"play",width:"16",height:"16"})]),c[0]||(c[0]=e.createTextVNode(" 5倍速播放中 "))],512),[[e.vShow,o.state.handleType=="playbackRate"||o.state.isMultiplesPlay]])],512)),[[e.vShow,o.state.handleType||o.state.isMultiplesPlay]])}}}),[["__scopeId","data-v-7b4544a3"]]),q="1.2.3",me={key:0,class:"player-dialog"},fe={class:"player-dialog-body"},ue={class:"player-dialog-title"},ye={class:"player-hotkey-panel"},ge={class:"player-hotkey-panel-item"},he={class:"player-filter-panel"},Ve={class:"player-filter-panel-item"},we={class:"player-filter-panel-item"},ke={class:"player-filter-panel-item"},Ne={key:0,class:"player-contextmenu"},Se=["playerKeyCode"],Ee=_(e.defineComponent({__name:"Contextmenu",setup(o){const l=e.reactive({show:!1,dialogType:"",dialogTitle:"11",version:q,mouseX:0,mouseY:0}),c=[{label:"视频色彩调整",key:"filter"},{label:"快捷键说明",key:"hotkey"},{label:"复制视频网址",key:"copy"},{label:"版本:"+q,key:"version"}],a=[{key:"Space",label:"播放/暂停"},{key:"→",label:"单次快进10s,长按5倍速播放"},{key:"←",label:"快退5s"},{key:"↑",label:"音量增加10%"},{key:"↓",label:"音量增加降低10%"},{key:"Esc",label:"退出全屏/退出网页全屏"},{key:"F",label:"全屏/退出全屏"}],t=e.reactive({saturate:.392,brightness:.392,contrast:.392}),u=e.computed(()=>({left:l.mouseX+"px",top:l.mouseY+"px"}));e.watch(t,i=>{console.log(i.saturate,"newval");let p=document.querySelector("#PlayerVideo"),V=(i.saturate*2.55).toFixed(2),f=(i.brightness*2.55).toFixed(2),T=(i.contrast*2.55).toFixed(2);p.style.filter=`saturate(${V}) brightness(${f}) contrast(${T})`});const n=()=>{t.saturate=.392,t.brightness=.392,t.contrast=.392},m=i=>{i.key=="Escape"&&h(0)},w=i=>{i.preventDefault();let p=document.querySelector("#playerWrap");P(window,"keydown",m),P(window,"click",h);let V=p.clientWidth;l.mouseX=i.clientX-p.getBoundingClientRect().left,V-l.mouseX<130&&(l.mouseX=l.mouseX+(V-l.mouseX-130)),l.mouseY=i.clientY-p.getBoundingClientRect().top,l.show=!0},h=async i=>{let p=i.target.nodeName=="LI",V=i.target.attributes.playerKeyCode&&i.target.attributes.playerKeyCode.value,f=c.map(T=>T.key);if(p&&f.includes(V))if(l.dialogTitle=i.target.innerText,l.dialogType=V,V=="copy"){try{await navigator.clipboard.writeText(window.location.href),alert("网址信息已复制到剪切板")}catch(T){console.log("复制失败: ",T)}l.dialogType=""}else V=="version"&&(l.dialogType="");l.show=!1,E(window,"keydown",m),E(window,"click",h)};return e.onMounted(()=>{let i=document.querySelector("#playerWrap");E(window,"click",h),E(window,"keydown",m),P(i,"contextmenu",w)}),e.onUnmounted(()=>{let i=document.querySelector("#playerWrap");E(window,"keydown",m),E(window,"click",h),E(i,"contextmenu",w)}),(i,p)=>{const V=e.resolveComponent("SvgIcon");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.Transition,{name:"fade-in"},{default:e.withCtx(()=>[l.dialogType?(e.openBlock(),e.createElementBlock("div",me,[e.createElementVNode("div",fe,[e.createElementVNode("h5",ue,[e.createTextVNode(e.toDisplayString(l.dialogTitle)+" ",1),e.createElementVNode("span",{class:"icon-close",onClick:p[0]||(p[0]=f=>l.dialogType="")},[e.createVNode(V,{color:"#fff",name:"x-copy",width:"25",height:"25",class:"icon-close"})])]),e.withDirectives(e.createElementVNode("ul",ye,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(a,f=>e.createElementVNode("li",ge,[e.createElementVNode("span",null,e.toDisplayString(f.key),1),e.createElementVNode("span",null,e.toDisplayString(f.label),1)])),64))],512),[[e.vShow,l.dialogType=="hotkey"]]),e.withDirectives(e.createElementVNode("ul",he,[e.createElementVNode("li",Ve,[p[4]||(p[4]=e.createElementVNode("span",null,"饱和度",-1)),e.createVNode(F,{class:"filter-panel-progress",size:"5px",modelValue:t.saturate,"onUpdate:modelValue":p[1]||(p[1]=f=>t.saturate=f)},null,8,["modelValue"]),e.createElementVNode("span",null,e.toDisplayString(Math.round(t.saturate*255)),1)]),e.createElementVNode("li",we,[p[5]||(p[5]=e.createElementVNode("span",null,"亮度",-1)),e.createVNode(F,{class:"filter-panel-progress",size:"5px",modelValue:t.brightness,"onUpdate:modelValue":p[2]||(p[2]=f=>t.brightness=f)},null,8,["modelValue"]),e.createElementVNode("span",null,e.toDisplayString(Math.round(t.brightness*255)),1)]),e.createElementVNode("li",ke,[p[6]||(p[6]=e.createElementVNode("span",null,"对比度",-1)),e.createVNode(F,{class:"filter-panel-progress",size:"5px",modelValue:t.contrast,"onUpdate:modelValue":p[3]||(p[3]=f=>t.contrast=f)},null,8,["modelValue"]),e.createElementVNode("span",null,e.toDisplayString(Math.round(t.contrast*255)),1)]),e.createElementVNode("span",{onClick:n,title:"重置","aria-label":"重置",class:"player-filter-reset"},"重置")],512),[[e.vShow,l.dialogType=="filter"]])])])):e.createCommentVNode("",!0)]),_:1}),l.show?(e.openBlock(),e.createElementBlock("div",Ne,[e.createElementVNode("ul",{class:"player-contextmenu-body",style:e.normalizeStyle(u.value)},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(c,f=>e.createElementVNode("li",{playerKeyCode:f.key,key:f.key},e.toDisplayString(f.label),9,Se)),64))],4),p[7]||(p[7]=e.createElementVNode("input",{class:"player-copyText"},null,-1))])):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-0633897a"]]),Te={};function xe(o,l){return e.openBlock(),e.createElementBlock("div",null,l[0]||(l[0]=[e.createStaticVNode('<svg width="20px" height="20px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="pc" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="鼠标悬浮态" transform="translate(-1011.000000, -614.000000)"><g id="编组-3备份" transform="translate(-0.000000, 0.000000)"><g id="编组-9" transform="translate(771.000000, 614.000000)"><g id="网页全屏icon备份" transform="translate(240.000000, 0.000000)"><rect id="矩形" fill="#D8D8D8" opacity="0" x="0" y="0" width="24" height="24"></rect><g id="编组-16" transform="translate(3.000000, 3.000000)"><path d="M6.02375417,18 L4.41666657,18 C1.97740898,18 2.987229e-16,16.022591 0,13.5833334 L0,4.41666657 C-2.987229e-16,1.97740898 1.97740898,-4.4009407e-16 4.41666657,0 L13.5277779,0 C15.9670355,-4.4808435e-16 17.9444444,1.97740898 17.9444444,4.41666657 L17.9444444,6.94881161 L17.9444444,6.94881161" id="路径" stroke="#FFFFFF" stroke-width="2.2" stroke-linecap="square" stroke-linejoin="round"></path><rect id="矩形" stroke="#FFFFFF" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" x="10.5555556" y="11.6470588" width="8.44444444" height="6.35294118" rx="2.10317456"></rect><polyline id="路径-4备份" stroke="#FFFFFF" stroke-width="2.2" stroke-linecap="square" stroke-linejoin="round" transform="translate(6.838734, 6.948812) scale(-1, -1) translate(-6.838734, -6.948812) " points="5.25540107 8.5370469 5.25540107 5.36057631 8.42206774 5.36057631"></polyline><polygon id="矩形" fill="#FFFFFF" transform="translate(6.163971, 6.008746) rotate(-45.000000) translate(-6.163971, -6.008746) " points="5.07520753 2.83865288 7.26397133 2.83570116 7.25273513 9.17883841 5.06397133 9.18179013"></polygon></g></g></g></g></g></g></svg>',1)]))}const be=_(Te,[["render",xe]]),Be={class:"Player",id:"PlayerVideo"},_e=["src","controls","webkit-playsinline","playsinline","loop","poster","volume","muted"],Ce={class:"player-lightoff"},Pe={key:0,class:"player-state"},$e={class:"play-btn"},Fe={class:"control-progress"},De={class:"tool-bar"},ze={class:"tool-item tool-time audioTrack-btn"},Ie={class:"total-time"},Me={class:"tool-bar"},Le={key:0,style:{position:"relative",top:"-2px"},class:"tool-item speedRate-btn"},He={class:"tool-item-main"},Re={class:"speed-main"},Ae=["onClick"],qe={key:1,class:"tool-item volume-btn"},Oe={class:"tool-item-main volume-box",style:{width:"52px"}},We={class:"volume-text-size"},Ke={class:"tool-item setting-btn"},Ue={class:"biggerAni"},Xe={class:"tool-item-main"},je={class:"speed-main"},Ye={class:"biggerAni"},Ge={class:"biggerAni"},Je=e.defineComponent({__name:"VueVideoPlus",props:j,emits:[...R,"mirrorChange","loopChange","lightOffChange"],setup(o,{expose:l,emit:c}){e.useCssVars(s=>({"3c74652b":e.unref(ve),"48c06094":s.width,"95068fce":s.height}));const a=o,t=e.reactive({Video:null,...a,muted:a.muted,playBtnState:a.autoPlay?"pause":"play",loadStateType:"loadstart",fullScreen:!1,handleType:"",currentTime:"00:00:00",preloadBar:0,totalTime:"00:00:00",isVideoHovering:!0,speedActive:"1.0",playProgress:0,isMultiplesPlay:!1,longPressTimeout:0,progressCursorTime:"00:00:00",qualityLevels:[],currentLevel:0}),u=c,n=e.ref(),m=e.ref(),w=e.ref(),h=(...s)=>r=>s.reverse().reduce((k,y)=>y(k),r),i=R.reduce((s,r)=>{let k=`on${G(r)}`;return s[k]=y=>{t.loadStateType=r,u(r,y)},s},{});i.onCanplay=h(i.onCanplay,()=>{t.playBtnState!="play"&&n.value.play(),t.autoPlay&&(n.value.play(),t.playBtnState="pause")}),i.onDurationchange=s=>{u("durationchange",s),a.currentTime!=0&&(n.value.currentTime=a.currentTime),i.onTimeupdate(s)},i.onEnded=h(i.onEnded,()=>{t.playBtnState="replay"}),i.onError=h(i.onError,()=>{t.playBtnState="replay"}),i.onProgress=s=>{u("progress",s);let r=s.target.duration,k=s.target.buffered,y=s.target.buffered.length&&s.target.buffered.end(k-1);t.preloadBar=y/r};const p=(s,r)=>{let k=n.value.duration||n.value.target.duration;n.value.currentTime=k*r,t.playBtnState=="play"&&(n.value.play(),t.playBtnState="pause")},V=(s,r)=>{t.progressCursorTime=L(n.value.duration*r)},f=A(2500,()=>{t.isVideoHovering=!1}),T=s=>{t.isVideoHovering=!0,f()},b=()=>{$||w.value.focus()},x=s=>{t.speedActive=s,n.value.playbackRate=s},d=s=>{u("mirrorChange",s,n.value)},g=s=>{u("loopChange",s,n.value)},N=s=>{u("lightOffChange",s,n.value)},B=()=>{J(n.value)},S=()=>{t.fullScreen=Q(m.value)},z=()=>{t.muted=!t.muted,t.volume==0&&(t.volume=.05)};i.onTimeupdate=s=>{u("timeupdate",s);let r=s.duration||s.target.duration||0,k=s.currentTime||s.target.currentTime;t.playProgress=k/r,t.currentTime=L(k),t.totalTime=L(r)};const Ze=()=>{n.value.canPlayType(a.type)||console.error("vue3-video-play: Format not supported,Check the [type] parameter"),(n.value.canPlayType(a.type)||n.value.canPlayType("application/vnd.apple.mpegurl"))&&(t.muted=a.autoPlay)};e.watch(()=>a.src,s=>{e.nextTick(()=>{Ze()})},{immediate:!0});const ve=Y(t.color),K=A(500,()=>{t.handleType=""}),et=s=>{console.log(i.onTimeupdate,"left"),a.speed&&(n.value.currentTime=n.value.currentTime<10?.1:n.value.currentTime-10,i.onTimeupdate(n.value),I())},tt=s=>{s.preventDefault(),s.code=="ArrowUp"?t.volume=t.volume+.1>1?1:t.volume+.1:t.volume=t.volume-.1<0?0:t.volume-.1,t.muted=!1,t.handleType="volume",K()},U=s=>{s.preventDefault;let r=s.type;if(s.key=="ArrowRight"){if(I(),r=="keyup"){if(clearTimeout(t.longPressTimeout),!a.speed&&!t.longPressTimeout)return;t.isMultiplesPlay?(n.value.playbackRate=t.speedActive,t.isMultiplesPlay=!1):(n.value.currentTime=n.value.currentTime+10,i.onTimeupdate(n.value))}else if(r=="keydown"){if(!a.speed)return;t.isMultiplesPlay&&clearTimeout(t.longPressTimeout),t.longPressTimeout=setTimeout(()=>{t.isMultiplesPlay=!0,n.value.playbackRate=5,t.handleType="playbackRate",K()},500)}}},I=()=>{t.loadStateType="play",n.value.play().catch(()=>{n.value.load(),console.log(n.value.readyState,"readysat."),console.log(n.value.networkState,"netwoir"),n.value.readyState&&setTimeout(()=>{n.value.play().catch(()=>{console.log(n.value.readyState),t.playBtnState="replay",t.loadStateType="error"})},200)}),t.playBtnState="pause"},X=()=>{n.value.pause(),t.playBtnState="play"},M=s=>{s&&s.preventDefault(),t.playBtnState=="play"||t.playBtnState=="replay"?I():t.playBtnState=="pause"&&X()};return e.onMounted(()=>{t.Video=n.value,b()}),l({play:I,pause:X,togglePlay:M}),(s,r)=>{const k=e.resolveComponent("SvgIcon");return e.openBlock(),e.createElementBlock("div",{ref_key:"playerWrap",ref:m,id:"playerWrap",class:e.normalizeClass(["player-wrap",{"web-full-screen":t.webFullScreen,"is-lightoff":t.lightOff,"player-wrap-hover":t.playBtnState=="play"||t.isVideoHovering}]),onMousemove:T},[e.createElementVNode("div",Be,[e.createElementVNode("video",e.mergeProps({width:"100%",height:"100%",src:s.src,ref_key:"v",ref:n,controls:!!(e.unref($)&&t.speed),class:{"video-mirror":t.mirror}},e.unref(i),{class:"Player-video",id:"v","webkit-playsinline":a.playsinline,playsinline:a.playsinline,loop:t.loop,poster:s.poster,volume:t.volume,muted:t.muted,fill:"cover"})," 您的浏览器不支持Video标签。 ",16,_e)]),e.createVNode(e.Transition,{name:"fade-in"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",Ce,null,512),[[e.vShow,t.lightOff]])]),_:1}),e.unref($)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Pe,[e.createVNode(e.Transition,{name:"scale-out"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",$e,[e.createVNode(k,{color:"#fff",name:"play",width:"40",height:"40"})],512),[[e.vShow,t.playBtnState=="play"]])]),_:1}),e.createVNode(pe,{state:t},null,8,["state"])])),e.unref($)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("input",{key:1,ref_key:"refInput",ref:w,readonly:!0,type:"input",onClick:M,onDblclick:S,onKeyup:[e.withKeys(S,["f"]),r[0]||(r[0]=e.withKeys(y=>t.webFullScreen=!1,["esc"])),U],onKeydown:[e.withKeys(M,["space"]),e.withKeys(et,["arrow-left"]),e.withKeys(tt,["arrow-up","arrow-down"]),U],class:"player-input",maxlength:"0"},null,544)),e.createVNode(le,{loadType:t.loadStateType},null,8,["loadType"]),e.createVNode(Ee),!e.unref($)&&t.control?(e.openBlock(),e.createElementBlock("div",{key:2,class:"player-control",ref:"refPlayerControl",onClick:b},[e.createElementVNode("div",Fe,[e.createVNode(F,{class:"progress-bar",onOnMousemove:V,onChange:p,modelValue:t.playProgress,"onUpdate:modelValue":r[1]||(r[1]=y=>t.playProgress=y),preload:t.preloadBar,hoverText:t.progressCursorTime},null,8,["modelValue","preload","hoverText"])]),e.createElementVNode("div",{class:"control-tool",onClick:b},[e.createElementVNode("div",De,[e.createElementVNode("div",{class:"tool-item",onClick:M},[e.createVNode(k,{color:"#fff",name:`${t.playBtnState}`,width:"24",height:"24"},null,8,["name"])]),e.createElementVNode("div",ze,[e.createElementVNode("span",null,e.toDisplayString(t.currentTime),1),r[8]||(r[8]=e.createElementVNode("span",{style:{margin:"0 3px"}},"/",-1)),e.createElementVNode("span",Ie,e.toDisplayString(t.totalTime),1)])]),e.createElementVNode("div",Me,[r[15]||(r[15]=e.createElementVNode("div",{class:"tool-item quality-btn"},[e.createElementVNode("div",{class:"tool-item-main"},[e.createElementVNode("ul",{class:"speed-main",style:{"text-align":"center"}},[e.createElementVNode("li")])])],-1)),a.controlBtns.includes("speedRate")?(e.openBlock(),e.createElementBlock("div",Le,[e.createTextVNode(e.toDisplayString(t.speedActive=="1.0"?"倍速":t.speedActive+"x")+" ",1),e.createElementVNode("div",He,[e.createElementVNode("ul",Re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.speedRate,y=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass({"speed-active":t.speedActive==y}),onClick:dt=>x(y)},e.toDisplayString(y)+"X ",11,Ae))),256))])])])):e.createCommentVNode("",!0),a.controlBtns.includes("volume")?(e.openBlock(),e.createElementBlock("div",qe,[e.createElementVNode("div",Oe,[e.createElementVNode("div",{class:e.normalizeClass(["volume-main",{"is-muted":t.muted}])},[e.createElementVNode("span",We,e.toDisplayString(t.muted?0:~~(t.volume*100))+"% ",1),e.createVNode(F,{onChange:r[2]||(r[2]=y=>t.muted=!1),hover:!1,size:"5px",vertical:!0,modelValue:t.volume,"onUpdate:modelValue":r[3]||(r[3]=y=>t.volume=y)},null,8,["modelValue"])],2)]),e.createElementVNode("span",{onClick:z,class:"biggerAni",style:{display:"flex",position:"relative",left:"5px"}},[e.createVNode(k,{name:`volume-${t.volume==0||t.muted?"mute":t.volume>.5?"up":"down"}`,width:"26",height:"26",color:"#fff"},null,8,["name"])])])):e.createCommentVNode("",!0),e.createElementVNode("div",Ke,[e.createElementVNode("span",Ue,[e.createVNode(k,{name:"settings",width:"26",height:"26",color:"#fff"})]),e.createElementVNode("div",Xe,[e.createElementVNode("ul",je,[e.createElementVNode("li",null,[r[9]||(r[9]=e.createTextVNode(" 镜像画面 ")),e.createVNode(H,{onChange:d,modelValue:t.mirror,"onUpdate:modelValue":r[4]||(r[4]=y=>t.mirror=y)},null,8,["modelValue"])]),e.createElementVNode("li",null,[r[10]||(r[10]=e.createTextVNode(" 循环播放 ")),e.createVNode(H,{onChange:g,modelValue:t.loop,"onUpdate:modelValue":r[5]||(r[5]=y=>t.loop=y)},null,8,["modelValue"])]),e.createElementVNode("li",null,[r[11]||(r[11]=e.createTextVNode(" 关灯模式")),e.createVNode(H,{onChange:N,modelValue:t.lightOff,"onUpdate:modelValue":r[6]||(r[6]=y=>t.lightOff=y)},null,8,["modelValue"])])])])]),a.controlBtns.includes("pip")?(e.openBlock(),e.createElementBlock("div",{key:2,class:"tool-item pip-btn",onClick:B},[e.createVNode(be,{class:"biggerAni"}),r[12]||(r[12]=e.createElementVNode("div",{class:"tool-item-main"},"画中画",-1))])):e.createCommentVNode("",!0),a.controlBtns.includes("pageFullScreen")?(e.openBlock(),e.createElementBlock("div",{key:3,class:"tool-item pip-btn",onClick:r[7]||(r[7]=y=>t.webFullScreen=!t.webFullScreen)},[e.createElementVNode("span",Ye,[e.createVNode(k,{name:"webfullscreen",width:"20",height:"20",color:"#fff"})]),r[13]||(r[13]=e.createElementVNode("div",{class:"tool-item-main"},"网页全屏",-1))])):e.createCommentVNode("",!0),a.controlBtns.includes("fullScreen")?(e.openBlock(),e.createElementBlock("div",{key:4,class:"tool-item fullScreen-btn",onClick:S},[e.createElementVNode("span",Ge,[e.createVNode(k,{name:"fullscreen",width:"20",height:"20",color:"#fff"})]),r[14]||(r[14]=e.createElementVNode("div",{class:"tool-item-main"},"全屏",-1))])):e.createCommentVNode("",!0)])])],512)):e.createCommentVNode("",!0)],34)}}}),O=_(Je,[["__scopeId","data-v-50d8ebe5"]]),W={VueVideoPlus:O,SvgIcon:D,Icon:_(Object.assign({name:"icon"},{props:{icon:String,size:[Number,String]},setup(o){const l=o,c=e.computed(()=>({fontSize:/^\d+$/.test(l.size)?l.size+"px":l.size}));return(a,t)=>(e.openBlock(),e.createElementBlock("i",{class:e.normalizeClass(["icon iconfont",o.icon]),style:e.normalizeStyle(c.value)},null,6))}}),[["__scopeId","data-v-7d306b2a"]])},Qe={install(o){Object.keys(W).forEach(l=>{o.component(l,W[l])})}};C.VueVideoPlus=O,C.default=Qe,Object.defineProperties(C,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/package.json
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-video-plus",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/vueVideo-es.js",
|
|
7
|
-
"style":"dist/style.css",
|
|
8
|
-
"
|
|
7
|
+
"style": "dist/style.css",
|
|
8
|
+
"types": "dist/types/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
9
12
|
"scripts": {
|
|
10
13
|
"dev": "vite",
|
|
11
14
|
"build": "run-p type-check \"build-only {@}\" --",
|
|
12
15
|
"preview": "vite preview",
|
|
13
16
|
"build-only": "vite build",
|
|
14
17
|
"type-check": "vue-tsc --build --force",
|
|
15
|
-
"build:lib":"vite build --config ./build/lib.config.ts"
|
|
18
|
+
"build:lib": "vite build --config ./build/lib.config.ts"
|
|
16
19
|
},
|
|
17
20
|
"dependencies": {
|
|
18
21
|
"svg-icon-yyx": "^1.2.1",
|
|
@@ -29,6 +32,7 @@
|
|
|
29
32
|
"npm-run-all2": "^7.0.1",
|
|
30
33
|
"typescript": "~5.6.0",
|
|
31
34
|
"vite": "^5.4.10",
|
|
35
|
+
"vite-plugin-dts": "^4.5.0",
|
|
32
36
|
"vue-tsc": "^2.1.6"
|
|
33
37
|
}
|
|
34
38
|
}
|