Skip to content

[TASK] Normalize native event payloads across iOS and Android #225

@Jmilham21

Description

@Jmilham21

Several native events have inconsistent payloads between iOS and Android, or are missing TypeScript type definitions. This umbrella issue tracks the work to normalize them.

Property mismatches (both platforms fire the event, but payloads differ)

Event Issue
onRateChanged Android missing at (time position when rate changed)
onPlayerError iOS missing description
onPlayerAdError iOS sends only error; Android sends code, adErrorCode, error
onPlayerAdWarning iOS missing adErrorCode; sends warning + code
onAdEvent Android sends reason on adPause/adPlay; iOS does not
onCasting Android sends device/active/available; iOS sends empty dict
onCaptionsList Android tracks include file; iOS tracks do not

Events only one platform fires

Event Fires on Missing from
onPlaylist iOS Android (no-op handler)
onPlayerWarning iOS Android
onIdle iOS Android (no-op handler)
onVisible iOS only Android
onAttemptPlay iOS only Android
onUpdateBuffer iOS only Android
onScreenTapped iOS only Android
onPlayerSizeChange iOS only Android
8 Cast-specific events iOS (granular) Android (uses single onCasting)

TypeScript type issues

Issue Details
PlaylistItemEventProps missing index Both platforms send it for onPlaylistItem and onBeforeNextPlaylistItem
CaptionsListEventProps is flat, not array Both platforms send tracks as an array, TS type has flat label/default/file
Multiple iOS-only events not in TS types onVisible, onAttemptPlay, onUpdateBuffer, onScreenTapped, onPlayerSizeChange, plus cast events
onCasting not in TS types Both platforms fire it but with different payloads
onIdle not in TS types iOS fires it; Android has empty handler

Already fixed

Metadata

Metadata

Assignees

No one assigned

    Labels

    GroomedJWP team has reviewed the ticket and deemed it necessary

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions