Implemented the AmazonMusicObserverEmitter, which is responsible for watching for when the player state, current song, or queue changes so the mini player can stay up-to-date. There were three general strategies employed to enable this in order of preference:
Use Maestro's events to react to pause/play and current time updates
Use the Redux store's subscribe method to trigger a comparison method that checks for specific application state changes for everything else except the queue
Use a timer for the queue because the queue's state only updates after some other things get triggered that can't easily be listened for
Updated the no-op event handlers to return undefined because it was causing a chrome API handler by having no response.
Overview
AmazonMusicObserverEmitter
, which is responsible for watching for when the player state, current song, or queue changes so the mini player can stay up-to-date. There were three general strategies employed to enable this in order of preference:chrome
API handler by having no response.