Skip to content

Add API to add and delete a list of mediaitems #174

@DylanXie123

Description

@DylanXie123

Is your feature request related to a problem? Please describe.
In my own BackgroundAudioTask, I override onAddQueueItem` like this:

  @override
  void onAddQueueItem(MediaItem mediaItem) {
    if (!_queue.contains(mediaItem)) {
      _queue.add(mediaItem);
      AudioServiceBackground.setQueue(_queue);
    }
  }

But I need to add a list of MediaItem in my project constantly, I believe it's not the best practice to call AudioService.addQueueItem for each MediaItem in my list because that will cause unnecessary Widget rebuild. Same problems occurs when I try to clear queue.

Describe the solution you'd like
I hope there is API to add and delete list of mediaitems.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions