Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: player state not being updated to completed (#1257)
This is regression introduced in 1.0.0. In 0.2.0, this logic was: case 'audio.onComplete': player.state = PlayerState.COMPLETED; player._completionController.add(null); So along with the completionController stream being update, the state was set to completed. In 1.0.0 there is no such functionality: case 'audio.onComplete': emitComplete(playerId); Since audioplayers_platform_interface package doesn't have a reference to player.state anymore because it's now in audioplayers package, my fix consisted of simply listening to this same stream in audioplayers package and updating the state.
- Loading branch information