Playback diagnostics, Events and Error handling#2581
Open
ghenry22 wants to merge 3 commits intodoublesymmetry:mainfrom
Open
Playback diagnostics, Events and Error handling#2581ghenry22 wants to merge 3 commits intodoublesymmetry:mainfrom
ghenry22 wants to merge 3 commits intodoublesymmetry:mainfrom
Conversation
iOS: - Add EventType cases: PlaybackStalled, PlaybackErrorLog, PlaybackBufferEmpty, PlaybackBufferFull - Register listeners for new SwiftAudioEx events in TrackPlayer.swift init - Implement handler functions that emit events with track/position/entry data Android: - Add MusicEvents constants for all four new events - Implement stall detection in MusicService (PLAYING->BUFFERING transition) - Implement buffer empty detection with recovery tracking JS/TS: - Add Event enum values with JSDoc documentation - Create TypeScript interfaces: PlaybackStalledEvent, PlaybackErrorLogEvent, PlaybackBufferEmptyEvent, PlaybackBufferFullEvent - Wire up EventPayloadByEvent type map for type-safe event handling Requires SwiftAudioEx feature/playback-diagnostics branch for iOS support. Co-authored-by: Cursor <cursoragent@cursor.com>
Allow compatible versions so the Podfile override to the forked SwiftAudioEx resolves without version conflicts. Co-authored-by: Cursor <cursoragent@cursor.com>
iOS: - Forward SwiftAudioEx seek and playbackEnd events to JS - Include position in PlaybackError emission - Add PlaybackSeekCompleted and PlaybackEndedWithReason EventType cases Android: - Collect positionChanged flow for seek completed events - Collect playbackEnd flow for ended reason events - Include position in PlaybackError bundle - Add PLAYBACK_SEEK_COMPLETED and PLAYBACK_ENDED_REASON MusicEvents JS/TS: - Add PlaybackSeekCompleted and PlaybackEndedWithReason Event enum values - Create PlaybackSeekCompletedEvent and PlaybackEndedWithReasonEvent interfaces - Add position field to PlaybackErrorEvent - Wire new events into EventPayloadByEvent type map - Exclude web/ from tsconfig.build to fix declaration generation Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add playback diagnostic events to iOS, Android, and JS layers
iOS:
Add EventType cases: PlaybackStalled, PlaybackErrorLog, PlaybackBufferEmpty, PlaybackBufferFull
Register listeners for new SwiftAudioEx events in TrackPlayer.swift init
Implement handler functions that emit events with track/position/entry data
Android:
Add MusicEvents constants for all four new events
Implement stall detection in MusicService (PLAYING->BUFFERING transition)
Implement buffer empty detection with recovery tracking
JS/TS:
Add Event enum values with JSDoc documentation
Create TypeScript interfaces: PlaybackStalledEvent, PlaybackErrorLogEvent, PlaybackBufferEmptyEvent, PlaybackBufferFullEvent
Wire up EventPayloadByEvent type map for type-safe event handling
Relax SwiftAudioEx version pin to ~> 1.1.0
Allow compatible versions so the Podfile override to the forked SwiftAudioEx resolves without version conflicts.
Add seek completed, playback ended reason events and error position
iOS:
Forward SwiftAudioEx seek and playbackEnd events to JS
Include position in PlaybackError emission
Add PlaybackSeekCompleted and PlaybackEndedWithReason EventType cases
Android:
Collect positionChanged flow for seek completed events
Collect playbackEnd flow for ended reason events
Include position in PlaybackError bundle
Add PLAYBACK_SEEK_COMPLETED and PLAYBACK_ENDED_REASON MusicEvents
JS/TS:
Add PlaybackSeekCompleted and PlaybackEndedWithReason Event enum values
Create PlaybackSeekCompletedEvent and PlaybackEndedWithReasonEvent interfaces
Add position field to PlaybackErrorEvent
Wire new events into EventPayloadByEvent type map
Exclude web/ from tsconfig.build to fix declaration generation
NOTE: Needs the corresponding SwiftAudioEx PR merged to work, or just use the fork of that with this.