diff --git a/example/src/components/PlaybackError.tsx b/example/src/components/PlaybackError.tsx index 0d469c6a8..2becb92e7 100644 --- a/example/src/components/PlaybackError.tsx +++ b/example/src/components/PlaybackError.tsx @@ -15,7 +15,7 @@ const styles = StyleSheet.create({ container: { width: '100%', marginVertical: 24, - alignSelf: 'center' + alignSelf: 'center', }, text: { color: 'red', diff --git a/web/TrackPlayerModule.ts b/web/TrackPlayerModule.ts index 9d198a11d..6150e2bf9 100644 --- a/web/TrackPlayerModule.ts +++ b/web/TrackPlayerModule.ts @@ -152,6 +152,11 @@ export class TrackPlayerModule extends PlaylistPlayer { return this.playlist; } + public async setQueue(queue: Track[]) { + await this.stop(); + this.playlist = queue; + } + public getActiveTrack(): Track | undefined { return this.current; }