diff --git a/src/VideoNativeComponent.ts b/src/VideoNativeComponent.ts index 8e6b2792..c13991c9 100644 --- a/src/VideoNativeComponent.ts +++ b/src/VideoNativeComponent.ts @@ -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<{ diff --git a/src/types/events.ts b/src/types/events.ts index 6da4856f..d0437c1e 100644 --- a/src/types/events.ts +++ b/src/types/events.ts @@ -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; }>;