Chore: rework ad props (#4220)

* fix: move ad configuration in source
This commit is contained in:
Olivier Bouillet
2024-10-10 23:53:39 +02:00
committed by GitHub
parent 9a3fcda3b8
commit d86adc52f3
14 changed files with 171 additions and 76 deletions

View File

@@ -38,6 +38,7 @@ export type ReactVideoSourceProperties = {
cmcd?: Cmcd; // android
textTracksAllowChunklessPreparation?: boolean;
textTracks?: TextTracks;
ad?: AdConfig;
};
export type ReactVideoSource = Readonly<
@@ -73,6 +74,11 @@ export enum DRMType {
FAIRPLAY = 'fairplay',
}
export type AdConfig = Readonly<{
adTagUrl?: string;
adLanguage?: ISO639_1;
}>;
export type Drm = Readonly<{
type?: DRMType;
licenseServer?: string;
@@ -276,7 +282,9 @@ export interface ReactVideoProps extends ReactVideoEvents, ViewProps {
/** @deprecated Use source.drm */
drm?: Drm;
style?: StyleProp<ViewStyle>;
/** @deprecated Use source.ad.adTagUrl */
adTagUrl?: string;
/** @deprecated Use source.ad.adLanguage */
adLanguage?: ISO639_1;
audioOutput?: AudioOutput; // Mobile
automaticallyWaitsToMinimizeStalling?: boolean; // iOS