Fabric (New Architecture) codegen support (#3487)
* feat: implemented codegenConfig on package.json * chore: moved directory location of Fabric component * fix: typefix FabricExample * chore: pod instaslled FabricExample iOS app * feat: implemented codegen config on package.json * feat: implemented codegen of specs/VideoNativeComponent * chore: removed not using type Filter * feat: removed unnecessary export on codegen tyepes * Revert "feat: removed unnecessary export on codegen tyepes" This reverts commit fc243b0ac5c565eda4886cd865c32ba4e812d7ff. * refactor: fixed types on Video component and modified types with codegen types * feat: modified codegenNativeComponent naming (RCTVideo) * feat: pod installed example basic app * feat: bump up react-native dev dependency version to 0.73.2 for supporting codegen array event params * feat: support array param types on event callback function codegen types * chore: pod installed ios basic example * feat: modified source prop as optional type * feat: add original src/VideoComponent.ts again * Revert "feat: add original src/VideoComponent.ts again" This reverts commit d63ac94e5330f7c7fb50374f65f8f3f4e0a225d7. * feat: add original src/VideoComponent.ts again with original file name * feat: git rm src/specs/VideoNativeComponent.ts * feat: git mv VideoNativeComponent.ts * feat: git mv src/specs/VideoNativeComponent.ts * feat: git mv src/VideoNativeComponent.ts src/specs/VideoNativeComponent.ts * feat: implemented array type handling on android JAVA * feat: updated iOS requestHeaders parsing native * feat: use safeGetArray on android, removed not using import too * feat: temporary commit - reusing enum types for remaining docs types * feat: implemented mixed type of SelectedTrack.value for JS layer
This commit is contained in:
@@ -1,160 +1,28 @@
|
||||
import type Orientation from './Orientation';
|
||||
import type {AdEvent} from './Ads';
|
||||
import type {
|
||||
OnAudioFocusChangedData,
|
||||
OnAudioTracksData,
|
||||
OnBandwidthUpdateData,
|
||||
OnBufferData,
|
||||
OnExternalPlaybackChangeData,
|
||||
OnLoadData,
|
||||
OnLoadStartData,
|
||||
OnPictureInPictureStatusChangedData,
|
||||
OnPlaybackData,
|
||||
OnPlaybackStateChangedData,
|
||||
OnProgressData,
|
||||
OnReceiveAdEventData,
|
||||
OnSeekData,
|
||||
OnTextTrackDataChangedData,
|
||||
OnTextTracksData,
|
||||
OnTimedMetadataData,
|
||||
OnVideoAspectRatioData,
|
||||
OnVideoErrorData,
|
||||
OnVideoTracksData,
|
||||
OnVolumeChangeData,
|
||||
} from '../specs/VideoNativeComponent';
|
||||
|
||||
export type OnLoadData = Readonly<{
|
||||
currentTime: number;
|
||||
duration: number;
|
||||
naturalSize: Readonly<{
|
||||
width: number;
|
||||
height: number;
|
||||
orientation: Orientation;
|
||||
}>;
|
||||
}> &
|
||||
OnAudioTracksData &
|
||||
OnTextTracksData;
|
||||
|
||||
export type OnVideoAspectRatioData = Readonly<{
|
||||
width: number;
|
||||
height: number;
|
||||
}>;
|
||||
|
||||
export type OnLoadStartData = Readonly<{
|
||||
isNetwork: boolean;
|
||||
type: string;
|
||||
uri: string;
|
||||
}>;
|
||||
|
||||
export type OnProgressData = Readonly<{
|
||||
currentTime: number;
|
||||
playableDuration: number;
|
||||
seekableDuration: number;
|
||||
}>;
|
||||
|
||||
export type OnSeekData = Readonly<{
|
||||
currentTime: number;
|
||||
seekTime: number;
|
||||
}>;
|
||||
|
||||
export type OnPlaybackStateChangedData = Readonly<{
|
||||
isPlaying: boolean;
|
||||
}>;
|
||||
|
||||
export type OnTimedMetadataData = Readonly<{
|
||||
metadata: ReadonlyArray<
|
||||
Readonly<{
|
||||
value?: string;
|
||||
identifier: string;
|
||||
}>
|
||||
>;
|
||||
}>;
|
||||
|
||||
export type AudioTrack = Readonly<{
|
||||
index: number;
|
||||
title?: string;
|
||||
language?: string;
|
||||
bitrate?: number;
|
||||
type?: string;
|
||||
selected?: boolean;
|
||||
}>;
|
||||
|
||||
export type OnAudioTracksData = Readonly<{
|
||||
audioTracks: ReadonlyArray<AudioTrack>;
|
||||
}>;
|
||||
|
||||
export enum OnTextTracksTypeData {
|
||||
SRT = 'srt',
|
||||
TTML = 'ttml',
|
||||
VTT = 'vtt',
|
||||
}
|
||||
|
||||
export type TextTrack = Readonly<{
|
||||
index: number;
|
||||
title?: string;
|
||||
language?: string;
|
||||
type?: OnTextTracksTypeData;
|
||||
selected?: boolean;
|
||||
}>;
|
||||
|
||||
export type OnTextTracksData = Readonly<{
|
||||
textTracks: ReadonlyArray<TextTrack>;
|
||||
}>;
|
||||
|
||||
export type OnTextTrackDataChangedData = Readonly<{
|
||||
subtitleTracks: string;
|
||||
}>;
|
||||
|
||||
export type OnVideoTracksData = Readonly<{
|
||||
videoTracks: ReadonlyArray<
|
||||
Readonly<{
|
||||
trackId: number;
|
||||
codecs?: string;
|
||||
width?: number;
|
||||
height?: number;
|
||||
bitrate?: number;
|
||||
selected?: boolean;
|
||||
}>
|
||||
>;
|
||||
}>;
|
||||
|
||||
export type OnPlaybackData = Readonly<{
|
||||
playbackRate: number;
|
||||
}>;
|
||||
|
||||
export type OnVolumeChangeData = Readonly<{
|
||||
volume: number;
|
||||
}>;
|
||||
|
||||
export type OnExternalPlaybackChangeData = Readonly<{
|
||||
isExternalPlaybackActive: boolean;
|
||||
}>;
|
||||
|
||||
export type OnGetLicenseData = Readonly<{
|
||||
licenseUrl: string;
|
||||
contentId: string;
|
||||
spcBase64: string;
|
||||
}>;
|
||||
|
||||
export type OnPictureInPictureStatusChangedData = Readonly<{
|
||||
isActive: boolean;
|
||||
}>;
|
||||
|
||||
export type OnReceiveAdEventData = Readonly<{
|
||||
data?: Record<string, string>;
|
||||
event: AdEvent;
|
||||
}>;
|
||||
|
||||
export type OnVideoErrorData = Readonly<{
|
||||
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;
|
||||
}>;
|
||||
|
||||
export type OnBufferData = Readonly<{isBuffering: boolean}>;
|
||||
|
||||
export type OnBandwidthUpdateData = Readonly<
|
||||
| {
|
||||
bitrate: number;
|
||||
width: number;
|
||||
height: number;
|
||||
trackId: number;
|
||||
}
|
||||
| {bitrate: number}
|
||||
>;
|
||||
export type AudioTrack = OnAudioTracksData['audioTracks'][number];
|
||||
export type TextTrack = OnTextTracksData['textTracks'][number];
|
||||
|
||||
export interface ReactVideoEvents {
|
||||
onAudioBecomingNoisy?: () => void; //Android, iOS
|
||||
|
@@ -6,3 +6,4 @@ export {default as Orientation} from './Orientation';
|
||||
export {default as ResizeMode} from './ResizeMode';
|
||||
export {default as TextTrackType} from './TextTrackType';
|
||||
export * from './video';
|
||||
export * from '../specs/VideoNativeComponent';
|
||||
|
Reference in New Issue
Block a user