-
Notifications
You must be signed in to change notification settings - Fork 100
Expand file tree
/
Copy pathconsts.js
More file actions
157 lines (133 loc) · 3.98 KB
/
consts.js
File metadata and controls
157 lines (133 loc) · 3.98 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
/* eslint-disable no-useless-escape,max-len */
export const musicdexURL = window.location.origin === "https://holodex.net" ? "https://music.holodex.net" : "https://music-staging.holodex.net";
export const CHANNEL_TYPES = Object.freeze({
VTUBER: "vtuber",
SUBBER: "subber",
});
export const VIDEO_TYPES = Object.freeze({
CLIP: "clip",
STREAM: "stream",
});
export const MUSIC_PLAYER_STATE = Object.freeze({
PLAYING: 1,
PAUSED: 0,
});
export const MUSIC_PLAYBACK_MODE = Object.freeze({
LOOP: 0,
LOOPONE: 1,
SHUFFLE: 2,
NATURAL: 4,
});
export const ORGS_PREFIX = Object.freeze({
// "AniMare",
"Atelier Live": "Atelier",
Chukorara: "Chuko",
"Eilene Family": "Eilene",
"Hanayori Joshiryo": "Hana",
Hololive: "Holo",
// "HoneyStrap",
Independents: "Indie",
// "Iridori",
"Kizuna Ai Inc.": "Kizuna",
Marbl_s: "Marbl",
Nijisanji: "Niji",
Masquerade: "Masq",
"Riot Music": "Riot",
"Nori Pro": "Nori",
"Aogiri Highschool": "Aogiri",
KAMITSUBAKI: "KT",
"VOICE-ORE": "V.O.",
"Hoshimeguri Gakuen": "Stellar",
// "ReACT",
// "SugarLyric",
// "upd8",
// "VApArt",
"V Dimension.Creators": "VDC",
// "ViViD",
// "VOMS",
Tsunderia: "Tsun",
"Unreal Night Girls": "UNG",
// "VShojo",
"X enc'ount": "X'",
"Yuni Create": "Yuni",
"All Vtubers": "Vtuber",
});
export const CHANNEL_URL_REGEX = /(?:(?:https?:|)\/\/|)(?:www\.|)(?:youtube\.com\/|\/?)channel\/(?<id>[\w-]+)/i;
export const CHANNEL_OR_HANDLE_REGEX = /(?:(?:https?:|)\/\/|)(?:www\.|)(?:youtube\.com\/|\/?)(?:channel\/|@)(?<id>[\w-]+)/i;
export const VIDEO_URL_REGEX = /(?:(?:https?:|)\/\/|)((?:www|m)\.|)(?<domain>youtube\.com|youtu\.be|holodex\.net)\/(?:[\w-]+\?v=|embed|v|watch|live|)\/?(?<id>[\w-]{11})/i;
export const TWITCH_VIDEO_URL_REGEX = /(?:(?:https?:|)\/\/|)twitch\.tv\/(?<id>[\w-]+)/i;
export const TWITCH_UNLIVE_VIDEO_URL_REGEX = /(?:https:\/\/)?twitch\.tv\/videos\/([\w\-_]*)/i;
export const TWITCAST_VIDEO_URL_REGEX = /(?:https:\/\/)?twitcasting\.tv\/(.*)/i;
export const TWITCAST_UNLIVE_VIDEO_URL_REGEX = /(?:https:\/\/)?twitcasting\.tv\/(.*)\/movie\/([\w\-_]*)/i;
export const NICONICO_VIDEO_URL_REGEX = /(?:https:\/\/)?live\.nicovideo\.jp\/watch\/([\w\-_]*)/i;
export const NICONICO_UNLIVE_VIDEO_URL_REGEX = /(?:https:\/\/)?nicovideo\.jp\/watch\/([\w\-_]*)/i;
export const BILIBILI_VIDEO_URL_REGEX = /(?:https:\/\/)?live\.bilibili\.com\/([\w\-_]*)/i;
export const BILIBILI_UNLIVE_VIDEO_URL_REGEX = /(?:https:\/\/)?bilibili\.com\/video\/([\w\-_]*)/i;
export const TL_LANGS = Object.freeze([
{
text: "English",
value: "en",
},
{
text: "日本語",
value: "ja",
},
{
text: "Español",
value: "es",
},
{
text: "中文",
value: "zh",
},
{
text: "Bahasa Indonesia / Melayu",
value: "id",
},
{
text: "Русский язык",
value: "ru",
},
{
text: "한국어",
value: "ko",
},
{
text: "Tiếng Việt",
value: "vi",
},
{
text: "TLDex-LIVE (test system)",
value: "tl",
},
]);
// exports.CHANNEL_TYPE_TO_VIDEO_TYPE = {
// [this.CHANNEL_TYPES.VTUBER]: this.VIDEO_TYPES.STREAM,
// [this.CHANNEL_TYPES.SUBBER]: this.VIDEO_TYPES.CLIP,
// };
// exports.RELATIONSHIP_TYPES = {
// REFER: "refer",
// SIMULCAST: "simulcast",
// CLIP: "clip",
// };
// exports.STATUSES = {
// NEW: "new",
// LIVE: "live",
// UPCOMING: "upcoming",
// PAST: "past",
// MISSING: "missing",
// };
// Language code conversion for YouTube frame
export const langConversion = Object.freeze({
"lol-PEKO": "en",
"lol-UWU": "en",
zh: "zh-Hant",
"zh-CN": "zh-Hans",
"en-GB": "enm",
});
export const companionExtensionId = "jkdnofimdhpbhdjbcdlgnccfjjkidlgp";
export const MESSAGE_TYPES = Object.freeze({
TOKEN: "token",
FAVORITES: "favorites",
});
export const MAX_PLAYLIST_LENGTH = 500;