mirror of
https://github.com/austinried/subtracks.git
synced 2025-12-27 17:19:27 +01:00
* get all song coverArt as they are rendered doing it all up front was too heavy temporarily disabled mapping artwork in setQueue, need to fix this * use cache data for track artwork when available * fix round art in context menu for songs * set only the first artwork at play time then set the rest in the playback service * handle both cached images and fetching images * remove commented code * fix shuffle fix first thumbnail not being updated on shuffle for now playing background
19 lines
709 B
TypeScript
19 lines
709 B
TypeScript
/* eslint-disable no-dupe-class-members */
|
|
import { EmitterSubscription, NativeEventEmitter } from 'react-native'
|
|
import { TrackExt } from './models/trackplayer'
|
|
|
|
class QueueService extends NativeEventEmitter {
|
|
addListener(eventType: 'set', listener: (event: { queue: TrackExt[] }) => void): EmitterSubscription
|
|
addListener(eventType: string, listener: (event: any) => void, context?: Object): EmitterSubscription {
|
|
return super.addListener(eventType, listener, context)
|
|
}
|
|
|
|
emit(eventType: 'set', event: { queue: TrackExt[] }): void
|
|
emit(eventType: string, ...params: any[]): void {
|
|
super.emit(eventType, ...params)
|
|
}
|
|
}
|
|
|
|
const queueService = new QueueService()
|
|
export default queueService
|