Skip to content

Review system state change messages. #30

Closed

Description

@bsutton

The SoundPlayer emits events when a state changes:

onStarted
onStopped
onPaused
onResume

It looks like there may be some inconsistency in how these are generated and from where.

It looks like the SoundPlayer will generate these events (in some situations) and the plugin code (java/object-c) will generate them in some cases.

It would seem more appropriate that these events are generated via the plugin in all cases as it really is the primary source and there are some situations where the plugin will generate these events without action in the dart code.

It also looks like we don't have a 'resume' event coming up from the plugin.

So I think the correct action.

The java/object plugin logic should generate the events.
The only circumstances where the dart code should generate the events is if we find some scenario where a state change needs to be reflected by the plugin can't possibly know about it. At this point I can't think of any valid circumstances.

Activity

  1. bsutton commented on Aug 16, 2020

    @bsutton
    OwnerAuthor

    Starting point in the java code is:

    PlaybackStateUpdater

  2. bsutton commented on Oct 9, 2020

    @bsutton
    OwnerAuthor

    This code has been rewritten as part of the pigeon upgrade.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions