xref: /MusicFree/src/constants/commonConst.ts (revision 8fc75cb25962e0a0650cc63f69d7b7d33e542b16)
121f1ca13S猫头猫export const internalSymbolKey = Symbol.for('$');
20e4173cdS猫头猫export const internalSerializeKey = '$';
3c99a59f8S猫头猫export const localMusicSheetId = 'local-music-sheet';
47993f90eS猫头猫
57993f90eS猫头猫export const localPluginPlatform = '本地';
67993f90eS猫头猫export const localPluginHash = 'local-plugin-hash';
7ebadf528S猫头猫
8ebadf528S猫头猫export const internalFakeSoundKey = 'fake-key';
9e08d37a3S猫头猫
10e08d37a3S猫头猫const emptyFunction = () => {};
11e08d37a3S猫头猫Object.freeze(emptyFunction);
12e08d37a3S猫头猫export {emptyFunction};
13e08d37a3S猫头猫
1420e2869eS猫头猫export enum RequestStateCode {
152d0ec5c1S猫头猫    /** 空闲 */
1620e2869eS猫头猫    IDLE = 0,
172d0ec5c1S猫头猫    /** 检索首页 */
1820e2869eS猫头猫    PENDING_FP = 1,
1920e2869eS猫头猫    /** 检索中 */
2020e2869eS猫头猫    PENDING = 2,
2120e2869eS猫头猫    /** 部分结束 */
2220e2869eS猫头猫    PARTLY_DONE = 4,
2320e2869eS猫头猫    /** 全部结束 */
2420e2869eS猫头猫    FINISHED = 5,
25be474dd8S猫头猫}
262d0ec5c1S猫头猫
272d0ec5c1S猫头猫export const StorageKeys = {
2824e5e74aS猫头猫    MediaMetaKeys: 'media-meta-keys',
29e08d37a3S猫头猫    PluginMetaKey: 'plugin-meta',
304060c00aS猫头猫    MediaCache: 'media-cache',
31afb5c234S猫头猫    LocalMusicSheet: 'local-music-sheet',
322d0ec5c1S猫头猫};
33cfa0fc07S猫头猫
34cfa0fc07S猫头猫export const CacheControl = {
35cfa0fc07S猫头猫    Cache: 'cache',
36cfa0fc07S猫头猫    NoCache: 'no-cache',
37cfa0fc07S猫头猫    NoStore: 'no-store',
38cfa0fc07S猫头猫};
39*8fc75cb2S猫头猫
40*8fc75cb2S猫头猫export const supportLocalMediaType = [
41*8fc75cb2S猫头猫    '.mp3',
42*8fc75cb2S猫头猫    '.flac',
43*8fc75cb2S猫头猫    '.wma',
44*8fc75cb2S猫头猫    '.wav',
45*8fc75cb2S猫头猫    '.m4a',
46*8fc75cb2S猫头猫    '.ogg',
47*8fc75cb2S猫头猫    '.acc',
48*8fc75cb2S猫头猫    '.aac',
49*8fc75cb2S猫头猫    '.ape',
50*8fc75cb2S猫头猫    '.opus',
51*8fc75cb2S猫头猫];
52