feat: add onAdError event listener (#3381)

* feat: add onAdError event listener
* feat: remove onAdError event listener and use already existing
* feat: add ERROR event to docs
This commit is contained in:
Axel Vencatareddy
2023-12-02 13:52:01 +01:00
committed by GitHub
parent 4d9334b477
commit 596c02d2b3
10 changed files with 73 additions and 8 deletions

View File

@@ -13,7 +13,6 @@ import NativeVideoComponent, {
} from './VideoNativeComponent';
import type {StyleProp, ImageStyle, NativeSyntheticEvent} from 'react-native';
import type {ReactVideoProps} from './types/video';
import {getReactTag, resolveAssetSourceForVideo} from './utils';
import {VideoManager} from './VideoNativeComponent';
import type {
@@ -35,7 +34,8 @@ import type {
OnVideoAspectRatioData,
OnVideoErrorData,
OnVideoTracksData,
} from './types/events';
ReactVideoProps,
} from './types';
export type VideoSaveData = {
uri: string;

View File

@@ -63,6 +63,10 @@ export enum AdEvent {
* Android only: Fires when the ad's duration changes.
*/
DURATION_CHANGE = 'DURATION_CHANGE',
/**
* Fires when an error is encountered and the ad can't be played.
*/
ERROR = 'ERROR',
/**
* Fires when the ad playhead crosses first quartile.
*/