Move video ref type to its own file
This commit is contained in:
parent
fa126de97f
commit
a72ab331dc
@ -37,8 +37,7 @@ import {
|
|||||||
resolveAssetSourceForVideo,
|
resolveAssetSourceForVideo,
|
||||||
} from './utils';
|
} from './utils';
|
||||||
import NativeVideoManager from './specs/NativeVideoManager';
|
import NativeVideoManager from './specs/NativeVideoManager';
|
||||||
import type {VideoSaveData} from './specs/NativeVideoManager';
|
import {ViewType, type VideoSaveData} from './types';
|
||||||
import {ViewType} from './types';
|
|
||||||
import type {
|
import type {
|
||||||
OnLoadData,
|
OnLoadData,
|
||||||
OnTextTracksData,
|
OnTextTracksData,
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import Video from './Video';
|
import Video from './Video';
|
||||||
export {VideoDecoderProperties} from './VideoDecoderProperties';
|
export {VideoDecoderProperties} from './VideoDecoderProperties';
|
||||||
export type * from './types';
|
export type * from './types';
|
||||||
export type {VideoRef} from './Video';
|
|
||||||
export default Video;
|
export default Video;
|
||||||
|
@ -4,10 +4,7 @@ import type {
|
|||||||
Float,
|
Float,
|
||||||
UnsafeObject,
|
UnsafeObject,
|
||||||
} from 'react-native/Libraries/Types/CodegenTypes';
|
} from 'react-native/Libraries/Types/CodegenTypes';
|
||||||
|
import type {VideoSaveData} from '../types/video-ref';
|
||||||
export type VideoSaveData = {
|
|
||||||
uri: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
// @TODO rename to "Spec" when applying new arch
|
// @TODO rename to "Spec" when applying new arch
|
||||||
export interface VideoManagerType {
|
export interface VideoManagerType {
|
||||||
|
@ -7,4 +7,5 @@ export {default as ResizeMode} from './ResizeMode';
|
|||||||
export {default as TextTrackType} from './TextTrackType';
|
export {default as TextTrackType} from './TextTrackType';
|
||||||
export {default as ViewType} from './ViewType';
|
export {default as ViewType} from './ViewType';
|
||||||
export * from './video';
|
export * from './video';
|
||||||
|
export * from './video-ref';
|
||||||
export * from '../specs/VideoNativeComponent';
|
export * from '../specs/VideoNativeComponent';
|
||||||
|
18
src/types/video-ref.ts
Normal file
18
src/types/video-ref.ts
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
export type VideoSaveData = {
|
||||||
|
uri: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export interface VideoRef {
|
||||||
|
seek: (time: number, tolerance?: number) => void;
|
||||||
|
resume: () => void;
|
||||||
|
pause: () => void;
|
||||||
|
presentFullscreenPlayer: () => void;
|
||||||
|
dismissFullscreenPlayer: () => void;
|
||||||
|
restoreUserInterfaceForPictureInPictureStopCompleted: (
|
||||||
|
restore: boolean,
|
||||||
|
) => void;
|
||||||
|
save: (options: object) => Promise<VideoSaveData>;
|
||||||
|
setVolume: (volume: number) => void;
|
||||||
|
getCurrentPosition: () => Promise<number>;
|
||||||
|
setFullScreen: (fullScreen: boolean) => void;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user