@nodefinity/react-native-music-library
Version:
Access local music files in React Native with full metadata support.
48 lines • 2.16 kB
TypeScript
import MusicLibrary from './NativeMusicLibrary';
import type { AssetsOptions, TrackResult, AlbumResult, ArtistResult, TrackMetadata, Track, Album } from './NativeMusicLibrary';
export * from './NativeMusicLibrary';
/**
* Get all tracks from the music library.
* @param assetsOptions - The options for the query.
* @returns A promise that resolves to an array of track info.
*/
export declare function getTracksAsync(assetsOptions?: AssetsOptions): Promise<TrackResult>;
/**
* Get the metadata of a track.
* @param trackId - The ID of the track.
* @returns A promise that resolves to the metadata of the track.
*/
export declare function getTrackMetadataAsync(trackId: string): Promise<TrackMetadata>;
/**
* Get all tracks from a specific album.
* @param albumId - The ID of the album.
* @returns A promise that resolves to an array of tracks in the album.
*/
export declare function getTracksByAlbumAsync(albumId: string): Promise<Track[]>;
/**
* Get all tracks from a specific artist with pagination.
* @param artistId - The ID of the artist.
* @param assetsOptions - The options for the query (pagination, etc.).
* @returns A promise that resolves to a paginated result of tracks by the artist.
*/
export declare function getTracksByArtistAsync(artistId: string, assetsOptions?: AssetsOptions): Promise<TrackResult>;
/**
* Get all albums from the music library.
* @param options - The options for the query.
* @returns A promise that resolves to an array of album info.
*/
export declare function getAlbumsAsync(assetsOptions?: AssetsOptions): Promise<AlbumResult>;
/**
* Get all albums from a specific artist.
* @param artistId - The ID of the artist.
* @returns A promise that resolves to an array of albums by the artist.
*/
export declare function getAlbumsByArtistAsync(artistId: string): Promise<Album[]>;
/**
* Get all artists from the music library.
* @param options - The options for the query.
* @returns A promise that resolves to an array of artist info.
*/
export declare function getArtistsAsync(assetsOptions?: AssetsOptions): Promise<ArtistResult>;
export default MusicLibrary;
//# sourceMappingURL=index.d.ts.map