Skip to content

fix: normalize event payloads across iOS and Android#226

Open
Jmilham21 wants to merge 1 commit intomasterfrom
task/normalize-event-payloads
Open

fix: normalize event payloads across iOS and Android#226
Jmilham21 wants to merge 1 commit intomasterfrom
task/normalize-event-payloads

Conversation

@Jmilham21
Copy link
Copy Markdown
Collaborator

Summary

  • Add missing event properties to achieve cross-platform parity — onRateChanged (Android adds at), onPlayerError/onPlayerWarning/onPlayerAdError (iOS adds code/description), onCasting (iOS now sends device/active/available)
  • Update TypeScript types: add index to PlaylistItemEventProps, add tracks array to CaptionsListEventProps, add interfaces and PropsType entries for iOS-only events (casting, idle, visible, screen tap, buffer, size change)
  • No breaking changes — all additions are new optional fields or properties

Refs #225

Test plan

  • Verify onRateChanged includes at on Android
  • Verify onPlayerError includes description on iOS
  • Verify onPlayerWarning includes code on iOS
  • Verify onPlayerAdError includes code on iOS
  • Verify onCasting includes device/active/available on iOS
  • Confirm no regressions on existing event consumers on either platform
  • Confirm TypeScript compiles with updated types

Add missing event properties to achieve parity between platforms:
- onRateChanged: Android now includes `at` (playback position)
- onPlayerError: iOS now includes `description`
- onPlayerWarning: iOS now includes `code`
- onPlayerAdError: iOS now includes `code`
- onCasting: iOS now sends `device`, `active`, `available` (was empty)

Update TypeScript types:
- Add `index` to PlaylistItemEventProps
- Add `tracks` array to CaptionsListEventProps (deprecate flat fields)
- Add CaptionTrack, CastingEventProps, and other missing interfaces
- Add iOS-only events to PropsType with @platform annotations
- Add casting event types for iOS-specific granular cast events

No breaking changes — all additions are new optional fields or properties.

Refs #225
@Jmilham21 Jmilham21 requested a review from a team as a code owner April 15, 2026 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant