LrcLib
No description provided
LrcLib
| Parameter | Type | Optional | Description | 
|---|---|---|---|
| player | Player | ❌ | The player instance | 
Properties
public api: any
The API URL
public bucket: any
The request bucket
public player: any
The player instance
public timeout: any
The request timeout. Default is 15 seconds.
Methods
public get(params): Promise<LrcSearchResult>
Gets lyrics
| Parameter | Type | Optional | Description | 
|---|---|---|---|
| params | LrcGetParams | ❌ | The get params | 
public getById(id): Promise<LrcSearchResult>
Gets lyrics by ID
| Parameter | Type | Optional | Description | 
|---|---|---|---|
| id | number`${number}` | ❌ | The lyrics ID | 
public getCached(params): Promise<LrcSearchResult>
Gets cached lyrics
| Parameter | Type | Optional | Description | 
|---|---|---|---|
| params | LrcGetParams | ❌ | The get params | 
public request(path, options?): Promise<T>
Requests the API
| Parameter | Type | Optional | Description | 
|---|---|---|---|
| path | string | ❌ | The path | 
| options | RequestInit | ✅ | The request options | 
public search(params): Promise<Array<LrcSearchResult>>
Searches for lyrics
| Parameter | Type | Optional | Description | 
|---|---|---|---|
| params | LrcSearchParams | ❌ | The search params | 
public setRequestTimeout(timeout): void
Sets the request timeout
| Parameter | Type | Optional | Description | 
|---|---|---|---|
| timeout | number | ❌ | The timeout in milliseconds | 
public setRetryLimit(limit): void
Sets the retry limit. Default is 5.
| Parameter | Type | Optional | Description | 
|---|---|---|---|
| limit | number | ❌ | The retry limit |