xref: /MusicFree/src/constants/commonConst.ts (revision 2aa881935ca35b8fb1abc4206e0dc35149231456)
1export const internalSymbolKey = Symbol.for('$');
2export const internalSerializeKey = '$';
3export const localMusicSheetId = 'local-music-sheet';
4
5export const localPluginPlatform = '本地';
6export const localPluginHash = 'local-plugin-hash';
7
8export const internalFakeSoundKey = 'fake-key';
9
10const emptyFunction = () => {};
11Object.freeze(emptyFunction);
12export {emptyFunction};
13
14export enum RequestStateCode {
15    /** 空闲 */
16    IDLE = 0,
17    /** 检索首页 */
18    PENDING_FP = 1,
19    /** 检索中 */
20    PENDING = 2,
21    /** 部分结束 */
22    PARTLY_DONE = 4,
23    /** 全部结束 */
24    FINISHED = 5,
25}
26
27export const StorageKeys = {
28    MediaMetaKeys: 'media-meta-keys',
29    PluginMetaKey: 'plugin-meta',
30    MediaCache: 'media-cache',
31    LocalMusicSheet: 'local-music-sheet',
32};
33
34export const CacheControl = {
35    Cache: 'cache',
36    NoCache: 'no-cache',
37    NoStore: 'no-store',
38};
39
40export const supportLocalMediaType = [
41    '.mp3',
42    '.flac',
43    '.wma',
44    '.wav',
45    '.m4a',
46    '.ogg',
47    '.acc',
48    '.aac',
49    '.ape',
50    '.opus',
51];
52