chore: skeleton for MusicKitJS abstractions

This commit is contained in:
2026-08-19 16:02:45 +02:00
parent cb0db033ea
commit 494eef6cd2
28 changed files with 1606 additions and 37 deletions
View File
+17
View File
@@ -0,0 +1,17 @@
export const useMusicKit = () => {
const init = () => {
isInit = true;
};
let isInit = false;
if ( !window.MusicKit ) {
document.addEventListener( 'musickitloaded', () => {
init();
} );
} else {
init();
}
return {};
};
+9
View File
@@ -0,0 +1,9 @@
export const play = () => {};
export const pause = () => {};
export const skip10 = () => {};
export const back10 = () => {};
export const playSong = ( id: string ) => {};
+3
View File
@@ -0,0 +1,3 @@
export const login = async () => {
};
View File
+21
View File
@@ -0,0 +1,21 @@
import {
type Ref,
ref
} from 'vue';
import type {
Playlist
} from '../dtype/playlist';
export const queueIdx = ref( 0 );
export const queue: Ref<Playlist> = ref( [] );
export const isPlaying = ref( false );
export const shuffle = ref( false );
export const repeat: Ref<'off' | 'one' | 'all'> = ref( 'off' );
export const playbackPercentage = ref( 0 );
export const duration = ref( 0 );