Skip to content

Commit

Permalink
fix: update onError definition to match implementation (#3349)
Browse files Browse the repository at this point in the history
Co-authored-by: olivier <[email protected]>
  • Loading branch information
freeboub and olivier authored Nov 16, 2023
1 parent abd73dc commit fdbd6a6
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 11 deletions.
20 changes: 15 additions & 5 deletions src/VideoNativeComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,21 @@ export type OnReceiveAdEventData = Readonly<{
}>;

export type OnVideoErrorData = Readonly<{
errorString: string;
errorException: string;
errorStackTrace: string;
errorCode: string;
error: string;
error: OnVideoErrorDataDetails;
target?: number; // ios
}>;

export type OnVideoErrorDataDetails = Readonly<{
errorString?: string; // android
errorException?: string; // android
errorStackTrace?: string; // android
errorCode?: string; // android
error?: string; // ios
code?: number; // ios
localizedDescription?: string; // ios
localizedFailureReason?: string; // ios
localizedRecoverySuggestion?: string; // ios
domain?: string; // ios
}>;

export type OnAudioFocusChangedData = Readonly<{
Expand Down
21 changes: 15 additions & 6 deletions src/types/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,22 @@ export type OnReceiveAdEventData = Readonly<{
}>;

export type OnVideoErrorData = Readonly<{
errorString: string;
errorException: string;
errorStackTrace: string;
errorCode: string;
error: string;
error: OnVideoErrorDataDetails;
target?: number; // ios
}>;

export type OnVideoErrorDataDetails = Readonly<{
errorString?: string; // android
errorException?: string; // android
errorStackTrace?: string; // android
errorCode?: string; // android
error?: string; // ios
code?: number; // ios
localizedDescription?: string; // ios
localizedFailureReason?: string; // ios
localizedRecoverySuggestion?: string; // ios
domain?: string; // ios
}>;

export type OnAudioFocusChangedData = Readonly<{
hasAudioFocus: boolean;
}>;
Expand Down

0 comments on commit fdbd6a6

Please sign in to comment.