forked from moefyit/vuepress-plugin-meting
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
58 lines (55 loc) · 1.32 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
const { resolve } = require("path")
module.exports = (options = {}, context) => ({
define() {
const {
metingApi,
meting: {
auto,
server,
type,
mid,
},
aplayer: {
mini,
autoplay,
theme,
loop,
order,
preload,
volume,
customAudioType,
mutex,
lrcType,
listFolded,
listMaxHeight,
storageName
}
} = options
return {
METING_API: metingApi || "https://api.i-meto.com/meting/api",
METING_OPTIONS: {
auto: auto || "",
server: server || "",
type: type || "",
mid: mid || ""
},
APLAYER_OPTIONS: {
mini: mini || null,
autoplay: autoplay || false,
theme: theme || '#b7daff',
loop: loop || 'all',
order: order || 'list',
preload: preload || 'auto',
volume: volume || 0.7,
customAudioType,
mutex: mutex || true,
lrcType: lrcType || 0,
listFolded: listFolded || false,
listMaxHeight: listMaxHeight || 250,
storageName: storageName || "vuepress-plugin-meting"
}
}
},
enhanceAppFiles: resolve(__dirname, "./bin/enhanceAppFile.js"),
globalUIComponents: options.meting !== undefined ? ["MetingGlobal"] : [],
})