This commit is contained in:
Boof2015
2026-06-19 17:45:31 -04:00
parent 96702ba7f0
commit 0e3e46293c
26 changed files with 1644 additions and 9 deletions
+29
View File
@@ -0,0 +1,29 @@
import { requireOptionalNativeModule, type NativeModule } from 'expo-modules-core';
import type { PlaybackState } from '@/types/audio';
export interface AstraWidgetNowPlayingState {
title?: string | null;
artist?: string | null;
artworkUri?: string | null;
playbackState: PlaybackState;
hasTrack: boolean;
recentlyPlayed?: AstraWidgetRecentItem[];
replaceRecentlyPlayed?: boolean;
}
export interface AstraWidgetRecentItem {
title?: string | null;
artist?: string | null;
artworkUri?: string | null;
}
declare class AstraWidgetModuleType extends NativeModule {
setNowPlaying(state: AstraWidgetNowPlayingState): void;
}
const native = requireOptionalNativeModule<AstraWidgetModuleType>('AstraWidget');
export const AstraWidget = (native ?? {
setNowPlaying: () => {},
}) as AstraWidgetModuleType;