expo-libvlc-player 7.0.5 → 7.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -86,17 +86,18 @@ export interface LibVlcPlayerViewRef {
86
86
  readonly stopPictureInPicture: () => Promise<void>;
87
87
  }
88
88
  export type LibVlcSource = string | number | null;
89
+ export type LibVlcSlaveSource = string | number;
89
90
  export interface Tracks {
90
91
  audio?: number;
91
92
  video?: number;
92
93
  subtitle?: number;
93
94
  }
94
95
  export interface Slave {
95
- source: NonNullable<LibVlcSource>;
96
+ source: LibVlcSlaveSource;
96
97
  type: "audio" | "subtitle";
97
98
  selected?: boolean;
98
99
  }
99
- export type VideoAspectRatio = "auto" | string | number;
100
+ export type VideoAspectRatio = "auto" | (string & {}) | number;
100
101
  export type VideoContentFit = "contain" | "cover" | "fill";
101
102
  export type AudioMixingMode = "mixWithOthers" | "duckOthers" | "auto" | "doNotMix";
102
103
  export interface NativeEventProps {
@@ -106,18 +107,18 @@ export interface NativeEvent<T> {
106
107
  nativeEvent: T & NativeEventProps;
107
108
  }
108
109
  export type LibVlcEvent<T> = Omit<T & NativeEventProps, "target">;
109
- export type Error = {
110
+ export interface Error {
110
111
  message: string;
111
- };
112
- export type Time = {
112
+ }
113
+ export interface Time {
113
114
  value: number;
114
- };
115
- export type Position = {
115
+ }
116
+ export interface Position {
116
117
  value: number;
117
- };
118
- export type Snapshot = {
118
+ }
119
+ export interface Snapshot {
119
120
  path: string;
120
- };
121
+ }
121
122
  export interface Dialog {
122
123
  title: string;
123
124
  text: string;
@@ -247,6 +248,14 @@ export interface LibVlcPlayerViewNativeProps extends ViewProps {
247
248
  onPictureInPictureStop?: PictureInPictureStopListener;
248
249
  }
249
250
  export interface LibVlcPlayerViewProps extends ViewProps {
251
+ /**
252
+ * Allows getting a ref to the component instance.
253
+ *
254
+ * Once the component unmounts, React will set `ref.current` to `null`
255
+ *
256
+ * @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}
257
+ */
258
+ ref: React.RefObject<LibVlcPlayerViewRef | null>;
250
259
  /**
251
260
  * Sets the source of the media to be played. Set to `null` to release the player
252
261
  *
@@ -261,11 +270,9 @@ export interface LibVlcPlayerViewProps extends ViewProps {
261
270
  */
262
271
  source: LibVlcSource;
263
272
  /**
264
- * Sets the options to initialize the media with.
265
- *
266
- * See the VideoLAN Wiki for more:
273
+ * Sets the options to initialize the media with
267
274
  *
268
- * https://wiki.videolan.org/VLC_command-line_help/
275
+ * @see {@link https://wiki.videolan.org/VLC_command-line_help/ VideoLAN Wiki}
269
276
  *
270
277
  * @example
271
278
  *
@@ -1 +1 @@
1
- {"version":3,"file":"LibVlcPlayer.types.d.ts","sourceRoot":"","sources":["../src/LibVlcPlayer.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,MAAM,MAAM,wBAAwB,GAAG,EAAE,CAAC;AAE1C,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC;;;;;;;OAOG;IACH,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5E;;;;;;OAMG;IACH,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAClD;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,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
@@ -1 +1 @@
1
- {"version":3,"file":"LibVlcPlayer.types.js","sourceRoot":"","sources":["../src/LibVlcPlayer.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ViewProps } from \"react-native\";\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport type LibVlcPlayerModuleEvents = {};\n\nexport interface LibVlcPlayerViewRef {\n /**\n * Starts playback of the current player\n *\n * @returns A promise which resolves to `void`\n */\n readonly play: () => Promise<void>;\n /**\n * Pauses playback of the current player\n *\n * @returns A promise which resolves to `void`\n */\n readonly pause: () => Promise<void>;\n /**\n * Stops playback of the current player\n *\n * @returns A promise which resolves to `void`\n */\n readonly stop: () => Promise<void>;\n /**\n * Sets the time or position of the current player\n *\n * @param value - Must be a number equal or greater than `0`\n * @param type - Defaults to `\"time\"`\n *\n * @returns A promise which resolves to `void`\n */\n readonly seek: (value: number, type?: \"time\" | \"position\") => Promise<void>;\n /**\n * Starts or stops recording the current media\n *\n * @param path - Must be a valid directory path string or `undefined` to stop recording\n *\n * @returns A promise which resolves to `void`\n */\n readonly record: (path?: string) => Promise<void>;\n /**\n * Takes a snapshot of the current media\n *\n * @param path - Must be a valid directory path string\n *\n * @returns A promise which resolves to `void`\n */\n readonly snapshot: (path: string) => Promise<void>;\n /**\n * Posts an answer to a `Dialog`\n *\n * @param action - Must be an integer of `1` or `2`\n *\n * @returns A promise which resolves to `void`\n */\n readonly postAction: (action: 1 | 2) => Promise<void>;\n /**\n * Posts a username and password to a login `Dialog`\n *\n * @param username - Must be a valid username, can't be empty\n * @param password - Must be a valid password, can be empty\n * @param store - If `true`, store the credentials\n *\n * @returns A promise which resolves to `void`\n */\n readonly postLogin: (username: string, password: string, store?: boolean) => Promise<void>;\n /**\n * Dismisses a `Dialog`\n *\n * @returns A promise which resolves to `void`\n */\n readonly dismiss: () => Promise<void>;\n /**\n * Enters Picture-in-Picture (PiP) mode\n *\n * @note Config plugin has to be configured for Picture-in-Picture (PiP) to work\n *\n * @returns A promise which resolves to `void`\n */\n readonly startPictureInPicture: () => Promise<void>;\n /**\n * Exits Picture-in-Picture (PiP) mode\n *\n * @platform ios\n *\n * @returns A promise which resolves to `void`\n */\n readonly stopPictureInPicture: () => Promise<void>;\n}\n\nexport type LibVlcSource = string | number | null;\n\nexport interface Tracks {\n audio?: number;\n video?: number;\n subtitle?: number;\n}\n\nexport interface Slave {\n source: NonNullable<LibVlcSource>;\n type: \"audio\" | \"subtitle\";\n selected?: boolean;\n}\n\nexport type VideoAspectRatio = \"auto\" | string | number;\n\nexport type VideoContentFit = \"contain\" | \"cover\" | \"fill\";\n\nexport type AudioMixingMode = \"mixWithOthers\" | \"duckOthers\" | \"auto\" | \"doNotMix\";\n\nexport interface NativeEventProps {\n target: number;\n}\n\nexport interface NativeEvent<T> {\n nativeEvent: T & NativeEventProps;\n}\n\nexport type LibVlcEvent<T> = Omit<T & NativeEventProps, \"target\">;\n\nexport type Error = { message: string };\n\nexport type Time = { value: number };\n\nexport type Position = { value: number };\n\nexport type Snapshot = { path: string };\n\nexport interface Dialog {\n title: string;\n text: string;\n type: \"error\" | \"login\" | \"question\";\n cancelText?: string;\n action1Text?: string;\n action2Text?: string;\n}\n\nexport interface Recording {\n path: string | null;\n isRecording: boolean;\n}\n\nexport interface Track {\n id: number;\n name: string;\n}\n\nexport interface MediaTracks {\n audio: Track[];\n video: Track[];\n subtitle: Track[];\n}\n\nexport interface MediaInfo {\n width: number;\n height: number;\n length: number;\n seekable: boolean;\n}\n\n/**\n * @hidden\n */\ntype BufferingListener = () => void;\n\n/**\n * @hidden\n */\ntype PlayingListener = () => void;\n\n/**\n * @hidden\n */\ntype PausedListener = () => void;\n\n/**\n * @hidden\n */\ntype StoppedListener = () => void;\n\n/**\n * @hidden\n */\ntype EncounteredErrorListener = (event: NativeEvent<Error>) => void;\n\n/**\n * @hidden\n */\ntype TimeChangedListener = (event: NativeEvent<Time>) => void;\n\n/**\n * @hidden\n */\ntype PositionChangedListener = (event: NativeEvent<Position>) => void;\n\n/**\n * @hidden\n */\ntype ESAddedListener = (event: NativeEvent<MediaTracks>) => void;\n\n/**\n * @hidden\n */\ntype RecordChangedListener = (event: NativeEvent<Recording>) => void;\n\n/**\n * @hidden\n */\ntype SnapshotTakenListener = (event: NativeEvent<Snapshot>) => void;\n\n/**\n * @hidden\n */\ntype DialogDisplayListener = (event: NativeEvent<Dialog>) => void;\n\n/**\n * @hidden\n */\ntype FirstPlayListener = (event: NativeEvent<MediaInfo>) => void;\n\n/**\n * @hidden\n */\ntype ForegroundListener = () => void;\n\n/**\n * @hidden\n */\ntype BackgroundListener = () => void;\n\n/**\n * @hidden\n */\ntype PictureInPictureStartListener = () => void;\n\n/**\n * @hidden\n */\ntype PictureInPictureStopListener = () => void;\n\n/**\n * @hidden\n */\nexport interface LibVlcPlayerViewNativeProps extends ViewProps {\n ref?: React.Ref<LibVlcPlayerViewRef>;\n source?: LibVlcSource;\n options?: string[];\n tracks?: Tracks;\n slaves?: Slave[];\n scale?: number;\n aspectRatio?: VideoAspectRatio;\n contentFit?: VideoContentFit;\n rate?: number;\n time?: number;\n volume?: number;\n mute?: boolean;\n audioMixingMode?: AudioMixingMode;\n repeat?: boolean;\n autoplay?: boolean;\n pictureInPicture?: boolean;\n onBuffering?: BufferingListener;\n onPlaying?: PlayingListener;\n onPaused?: PausedListener;\n onStopped?: StoppedListener;\n onEncounteredError?: EncounteredErrorListener;\n onDialogDisplay?: DialogDisplayListener;\n onTimeChanged?: TimeChangedListener;\n onPositionChanged?: PositionChangedListener;\n onESAdded?: ESAddedListener;\n onRecordChanged?: RecordChangedListener;\n onSnapshotTaken?: SnapshotTakenListener;\n onFirstPlay?: FirstPlayListener;\n onForeground?: ForegroundListener;\n onBackground?: BackgroundListener;\n onPictureInPictureStart?: PictureInPictureStartListener;\n onPictureInPictureStop?: PictureInPictureStopListener;\n}\n\nexport interface LibVlcPlayerViewProps extends ViewProps {\n /**\n * Sets the source of the media to be played. Set to `null` to release the player\n *\n * @example\n *\n * ```tsx\n * const BIG_BUCK_BUNNY =\n * \"https://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_720p_h264.mov\";\n *\n * <LibVlcPlayerView source={BIG_BUCK_BUNNY} />\n * ```\n */\n source: LibVlcSource;\n /**\n * Sets the options to initialize the media with.\n *\n * See the VideoLAN Wiki for more:\n *\n * https://wiki.videolan.org/VLC_command-line_help/\n *\n * @example\n *\n * ```tsx\n * const options = [\"--network-caching=1000\"];\n *\n * <LibVlcPlayerView\n * source={BIG_BUCK_BUNNY}\n * options={options}\n * />\n * ```\n *\n * @default []\n */\n options?: string[];\n /**\n * Sets the player audio, video and subtitle tracks\n *\n * @example\n *\n * ```tsx\n * const tracks = {\n * audio: -1,\n * video: 1,\n * subtitle: 1,\n * };\n *\n * <LibVlcPlayerView\n * source={BIG_BUCK_BUNNY}\n * tracks={tracks}\n * />\n * ```\n *\n * @default undefined\n */\n tracks?: Tracks;\n /**\n * Sets the player audio and subtitle slaves\n *\n * @example\n *\n * ```tsx\n * const slaves = [\n * {\n * source: \"file://path/to/subtitle.srt\",\n * type: \"subtitle\",\n * selected: true,\n * },\n * ];\n *\n * <LibVlcPlayerView\n * source={BIG_BUCK_BUNNY}\n * slaves={slaves}\n * />\n * ```\n *\n * @default []\n */\n slaves?: Slave[];\n /**\n * Sets the player scaling factor. Must be a float equal or greater than `0`\n *\n * @default 0\n */\n scale?: number;\n /**\n * Sets the container aspect ratio. Must be a valid ratio string or number\n *\n * @example \"16:9\"\n *\n * @default undefined\n */\n aspectRatio?: VideoAspectRatio;\n /**\n * Sets how the video should be scaled to fit in the container\n *\n * @example \"cover\"\n *\n * @default \"contain\"\n */\n contentFit?: VideoContentFit;\n /**\n * Sets the player rate. Must be a float equal or greater than `1`\n *\n * @default 1\n */\n rate?: number;\n /**\n * Sets the initial player time. Must be an integer in milliseconds\n *\n * @default 0\n */\n time?: number;\n /**\n * Sets the player volume. Must be an integer between `0` and `100`\n *\n * @default 100\n */\n volume?: number;\n /**\n * Sets the player volume to `0` when `true`. Previous value is set when `false`\n *\n * @default false\n */\n mute?: boolean;\n /**\n * Determines how the player will interact with other audio playing in the system\n *\n * @example \"doNotMix\"\n *\n * @default \"auto\"\n */\n audioMixingMode?: AudioMixingMode;\n /**\n * Determines whether the media should repeat once ended\n *\n * @default false\n */\n repeat?: boolean;\n /**\n * Determines whether the media should autoplay once created\n *\n * @default true\n */\n autoplay?: boolean;\n /**\n * Determines whether the player should allow Picture-in-Picture (PiP) mode\n *\n * @default false\n */\n pictureInPicture?: boolean;\n /**\n * Called after the `Buffering` player event\n */\n onBuffering?: () => void;\n /**\n * Called after the `Playing` player event\n */\n onPlaying?: () => void;\n /**\n * Called after the `Paused` player event\n */\n onPaused?: () => void;\n /**\n * Called after the `Stopped` player event\n */\n onStopped?: () => void;\n /**\n * Called after the `EncounteredError` player event\n */\n onEncounteredError?: (event: Error) => void;\n /**\n * Called after a `Dialog` needs to be displayed\n */\n onDialogDisplay?: (event: Dialog) => void;\n /**\n * Called after the `TimeChanged` player event\n */\n onTimeChanged?: (event: Time) => void;\n /**\n * Called after the `PositionChanged` player event\n */\n onPositionChanged?: (event: Position) => void;\n /**\n * Called after the `ESAdded` player event\n */\n onESAdded?: (event: MediaTracks) => void;\n /**\n * Called after the `RecordChanged` player event\n */\n onRecordChanged?: (event: Recording) => void;\n /**\n * Called after a media snapshot is taken\n */\n onSnapshotTaken?: (event: Snapshot) => void;\n /**\n * Called after the player first playing event\n */\n onFirstPlay?: (event: MediaInfo) => void;\n /**\n * Called after the player enters the foreground\n */\n onForeground?: () => void;\n /**\n * Called after the player enters the background\n */\n onBackground?: () => void;\n /**\n * Called after the player enters Picture-in-Picture (PiP) mode\n */\n onPictureInPictureStart?: () => void;\n /**\n * Called after the player exits Picture-in-Picture (PiP) mode\n */\n onPictureInPictureStop?: () => void;\n}\n"]}
1
+ {"version":3,"file":"LibVlcPlayer.types.js","sourceRoot":"","sources":["../src/LibVlcPlayer.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ViewProps } from \"react-native\";\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type, @typescript-eslint/consistent-type-definitions\nexport type LibVlcPlayerModuleEvents = {};\n\nexport interface LibVlcPlayerViewRef {\n /**\n * Starts playback of the current player\n *\n * @returns A promise which resolves to `void`\n */\n readonly play: () => Promise<void>;\n /**\n * Pauses playback of the current player\n *\n * @returns A promise which resolves to `void`\n */\n readonly pause: () => Promise<void>;\n /**\n * Stops playback of the current player\n *\n * @returns A promise which resolves to `void`\n */\n readonly stop: () => Promise<void>;\n /**\n * Sets the time or position of the current player\n *\n * @param value - Must be a number equal or greater than `0`\n * @param type - Defaults to `\"time\"`\n *\n * @returns A promise which resolves to `void`\n */\n readonly seek: (value: number, type?: \"time\" | \"position\") => Promise<void>;\n /**\n * Starts or stops recording the current media\n *\n * @param path - Must be a valid directory path string or `undefined` to stop recording\n *\n * @returns A promise which resolves to `void`\n */\n readonly record: (path?: string) => Promise<void>;\n /**\n * Takes a snapshot of the current media\n *\n * @param path - Must be a valid directory path string\n *\n * @returns A promise which resolves to `void`\n */\n readonly snapshot: (path: string) => Promise<void>;\n /**\n * Posts an answer to a `Dialog`\n *\n * @param action - Must be an integer of `1` or `2`\n *\n * @returns A promise which resolves to `void`\n */\n readonly postAction: (action: 1 | 2) => Promise<void>;\n /**\n * Posts a username and password to a login `Dialog`\n *\n * @param username - Must be a valid username, can't be empty\n * @param password - Must be a valid password, can be empty\n * @param store - If `true`, store the credentials\n *\n * @returns A promise which resolves to `void`\n */\n readonly postLogin: (username: string, password: string, store?: boolean) => Promise<void>;\n /**\n * Dismisses a `Dialog`\n *\n * @returns A promise which resolves to `void`\n */\n readonly dismiss: () => Promise<void>;\n /**\n * Enters Picture-in-Picture (PiP) mode\n *\n * @note Config plugin has to be configured for Picture-in-Picture (PiP) to work\n *\n * @returns A promise which resolves to `void`\n */\n readonly startPictureInPicture: () => Promise<void>;\n /**\n * Exits Picture-in-Picture (PiP) mode\n *\n * @platform ios\n *\n * @returns A promise which resolves to `void`\n */\n readonly stopPictureInPicture: () => Promise<void>;\n}\n\nexport type LibVlcSource = string | number | null;\n\nexport type LibVlcSlaveSource = string | number;\n\nexport interface Tracks {\n audio?: number;\n video?: number;\n subtitle?: number;\n}\n\nexport interface Slave {\n source: LibVlcSlaveSource;\n type: \"audio\" | \"subtitle\";\n selected?: boolean;\n}\n\nexport type VideoAspectRatio = \"auto\" | (string & {}) | number;\n\nexport type VideoContentFit = \"contain\" | \"cover\" | \"fill\";\n\nexport type AudioMixingMode = \"mixWithOthers\" | \"duckOthers\" | \"auto\" | \"doNotMix\";\n\nexport interface NativeEventProps {\n target: number;\n}\n\nexport interface NativeEvent<T> {\n nativeEvent: T & NativeEventProps;\n}\n\nexport type LibVlcEvent<T> = Omit<T & NativeEventProps, \"target\">;\n\nexport interface Error {\n message: string;\n}\n\nexport interface Time {\n value: number;\n}\n\nexport interface Position {\n value: number;\n}\n\nexport interface Snapshot {\n path: string;\n}\n\nexport interface Dialog {\n title: string;\n text: string;\n type: \"error\" | \"login\" | \"question\";\n cancelText?: string;\n action1Text?: string;\n action2Text?: string;\n}\n\nexport interface Recording {\n path: string | null;\n isRecording: boolean;\n}\n\nexport interface Track {\n id: number;\n name: string;\n}\n\nexport interface MediaTracks {\n audio: Track[];\n video: Track[];\n subtitle: Track[];\n}\n\nexport interface MediaInfo {\n width: number;\n height: number;\n length: number;\n seekable: boolean;\n}\n\n/**\n * @hidden\n */\ntype BufferingListener = () => void;\n\n/**\n * @hidden\n */\ntype PlayingListener = () => void;\n\n/**\n * @hidden\n */\ntype PausedListener = () => void;\n\n/**\n * @hidden\n */\ntype StoppedListener = () => void;\n\n/**\n * @hidden\n */\ntype EncounteredErrorListener = (event: NativeEvent<Error>) => void;\n\n/**\n * @hidden\n */\ntype TimeChangedListener = (event: NativeEvent<Time>) => void;\n\n/**\n * @hidden\n */\ntype PositionChangedListener = (event: NativeEvent<Position>) => void;\n\n/**\n * @hidden\n */\ntype ESAddedListener = (event: NativeEvent<MediaTracks>) => void;\n\n/**\n * @hidden\n */\ntype RecordChangedListener = (event: NativeEvent<Recording>) => void;\n\n/**\n * @hidden\n */\ntype SnapshotTakenListener = (event: NativeEvent<Snapshot>) => void;\n\n/**\n * @hidden\n */\ntype DialogDisplayListener = (event: NativeEvent<Dialog>) => void;\n\n/**\n * @hidden\n */\ntype FirstPlayListener = (event: NativeEvent<MediaInfo>) => void;\n\n/**\n * @hidden\n */\ntype ForegroundListener = () => void;\n\n/**\n * @hidden\n */\ntype BackgroundListener = () => void;\n\n/**\n * @hidden\n */\ntype PictureInPictureStartListener = () => void;\n\n/**\n * @hidden\n */\ntype PictureInPictureStopListener = () => void;\n\n/**\n * @hidden\n */\nexport interface LibVlcPlayerViewNativeProps extends ViewProps {\n ref?: React.Ref<LibVlcPlayerViewRef>;\n source?: LibVlcSource;\n options?: string[];\n tracks?: Tracks;\n slaves?: Slave[];\n scale?: number;\n aspectRatio?: VideoAspectRatio;\n contentFit?: VideoContentFit;\n rate?: number;\n time?: number;\n volume?: number;\n mute?: boolean;\n audioMixingMode?: AudioMixingMode;\n repeat?: boolean;\n autoplay?: boolean;\n pictureInPicture?: boolean;\n onBuffering?: BufferingListener;\n onPlaying?: PlayingListener;\n onPaused?: PausedListener;\n onStopped?: StoppedListener;\n onEncounteredError?: EncounteredErrorListener;\n onDialogDisplay?: DialogDisplayListener;\n onTimeChanged?: TimeChangedListener;\n onPositionChanged?: PositionChangedListener;\n onESAdded?: ESAddedListener;\n onRecordChanged?: RecordChangedListener;\n onSnapshotTaken?: SnapshotTakenListener;\n onFirstPlay?: FirstPlayListener;\n onForeground?: ForegroundListener;\n onBackground?: BackgroundListener;\n onPictureInPictureStart?: PictureInPictureStartListener;\n onPictureInPictureStop?: PictureInPictureStopListener;\n}\n\nexport interface LibVlcPlayerViewProps extends ViewProps {\n /**\n * Allows getting a ref to the component instance.\n *\n * Once the component unmounts, React will set `ref.current` to `null`\n *\n * @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}\n */\n ref: React.RefObject<LibVlcPlayerViewRef | null>;\n /**\n * Sets the source of the media to be played. Set to `null` to release the player\n *\n * @example\n *\n * ```tsx\n * const BIG_BUCK_BUNNY =\n * \"https://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_720p_h264.mov\";\n *\n * <LibVlcPlayerView source={BIG_BUCK_BUNNY} />\n * ```\n */\n source: LibVlcSource;\n /**\n * Sets the options to initialize the media with\n *\n * @see {@link https://wiki.videolan.org/VLC_command-line_help/ VideoLAN Wiki}\n *\n * @example\n *\n * ```tsx\n * const options = [\"--network-caching=1000\"];\n *\n * <LibVlcPlayerView\n * source={BIG_BUCK_BUNNY}\n * options={options}\n * />\n * ```\n *\n * @default []\n */\n options?: string[];\n /**\n * Sets the player audio, video and subtitle tracks\n *\n * @example\n *\n * ```tsx\n * const tracks = {\n * audio: -1,\n * video: 1,\n * subtitle: 1,\n * };\n *\n * <LibVlcPlayerView\n * source={BIG_BUCK_BUNNY}\n * tracks={tracks}\n * />\n * ```\n *\n * @default undefined\n */\n tracks?: Tracks;\n /**\n * Sets the player audio and subtitle slaves\n *\n * @example\n *\n * ```tsx\n * const slaves = [\n * {\n * source: \"file://path/to/subtitle.srt\",\n * type: \"subtitle\",\n * selected: true,\n * },\n * ];\n *\n * <LibVlcPlayerView\n * source={BIG_BUCK_BUNNY}\n * slaves={slaves}\n * />\n * ```\n *\n * @default []\n */\n slaves?: Slave[];\n /**\n * Sets the player scaling factor. Must be a float equal or greater than `0`\n *\n * @default 0\n */\n scale?: number;\n /**\n * Sets the container aspect ratio. Must be a valid ratio string or number\n *\n * @example \"16:9\"\n *\n * @default undefined\n */\n aspectRatio?: VideoAspectRatio;\n /**\n * Sets how the video should be scaled to fit in the container\n *\n * @example \"cover\"\n *\n * @default \"contain\"\n */\n contentFit?: VideoContentFit;\n /**\n * Sets the player rate. Must be a float equal or greater than `1`\n *\n * @default 1\n */\n rate?: number;\n /**\n * Sets the initial player time. Must be an integer in milliseconds\n *\n * @default 0\n */\n time?: number;\n /**\n * Sets the player volume. Must be an integer between `0` and `100`\n *\n * @default 100\n */\n volume?: number;\n /**\n * Sets the player volume to `0` when `true`. Previous value is set when `false`\n *\n * @default false\n */\n mute?: boolean;\n /**\n * Determines how the player will interact with other audio playing in the system\n *\n * @example \"doNotMix\"\n *\n * @default \"auto\"\n */\n audioMixingMode?: AudioMixingMode;\n /**\n * Determines whether the media should repeat once ended\n *\n * @default false\n */\n repeat?: boolean;\n /**\n * Determines whether the media should autoplay once created\n *\n * @default true\n */\n autoplay?: boolean;\n /**\n * Determines whether the player should allow Picture-in-Picture (PiP) mode\n *\n * @default false\n */\n pictureInPicture?: boolean;\n /**\n * Called after the `Buffering` player event\n */\n onBuffering?: () => void;\n /**\n * Called after the `Playing` player event\n */\n onPlaying?: () => void;\n /**\n * Called after the `Paused` player event\n */\n onPaused?: () => void;\n /**\n * Called after the `Stopped` player event\n */\n onStopped?: () => void;\n /**\n * Called after the `EncounteredError` player event\n */\n onEncounteredError?: (event: Error) => void;\n /**\n * Called after a `Dialog` needs to be displayed\n */\n onDialogDisplay?: (event: Dialog) => void;\n /**\n * Called after the `TimeChanged` player event\n */\n onTimeChanged?: (event: Time) => void;\n /**\n * Called after the `PositionChanged` player event\n */\n onPositionChanged?: (event: Position) => void;\n /**\n * Called after the `ESAdded` player event\n */\n onESAdded?: (event: MediaTracks) => void;\n /**\n * Called after the `RecordChanged` player event\n */\n onRecordChanged?: (event: Recording) => void;\n /**\n * Called after a media snapshot is taken\n */\n onSnapshotTaken?: (event: Snapshot) => void;\n /**\n * Called after the player first playing event\n */\n onFirstPlay?: (event: MediaInfo) => void;\n /**\n * Called after the player enters the foreground\n */\n onForeground?: () => void;\n /**\n * Called after the player enters the background\n */\n onBackground?: () => void;\n /**\n * Called after the player enters Picture-in-Picture (PiP) mode\n */\n onPictureInPictureStart?: () => void;\n /**\n * Called after the player exits Picture-in-Picture (PiP) mode\n */\n onPictureInPictureStop?: () => void;\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import { NativeModule } from "expo";
2
- import { LibVlcPlayerModuleEvents } from "./LibVlcPlayer.types";
2
+ import { type LibVlcPlayerModuleEvents } from "./LibVlcPlayer.types";
3
3
  declare class LibVlcPlayerModule extends NativeModule<LibVlcPlayerModuleEvents> {
4
4
  /** Attempts to trigger the local network privacy alert
5
5
  *
@@ -1 +1 @@
1
- {"version":3,"file":"LibVlcPlayerModule.d.ts","sourceRoot":"","sources":["../src/LibVlcPlayerModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAuB,MAAM,MAAM,CAAC;AAEzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAEhE,OAAO,OAAO,kBAAmB,SAAQ,YAAY,CAAC,wBAAwB,CAAC;IAC7E;;;;;OAKG;IACH,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC;IACpC;;;;OAIG;IACH,2BAA2B,IAAI,OAAO;CACvC;;AAED,wBAA2E"}
1
+ {"version":3,"file":"LibVlcPlayerModule.d.ts","sourceRoot":"","sources":["../src/LibVlcPlayerModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAuB,MAAM,MAAM,CAAC;AAEzD,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAErE,OAAO,OAAO,kBAAmB,SAAQ,YAAY,CAAC,wBAAwB,CAAC;IAC7E;;;;;OAKG;IACH,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC;IACpC;;;;OAIG;IACH,2BAA2B,IAAI,OAAO;CACvC;;AAED,wBAA2E"}
@@ -1 +1 @@
1
- {"version":3,"file":"LibVlcPlayerModule.js","sourceRoot":"","sources":["../src/LibVlcPlayerModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,mBAAmB,EAAE,MAAM,MAAM,CAAC;AAoBzD,eAAe,mBAAmB,CAAqB,kBAAkB,CAAC,CAAC","sourcesContent":["import { NativeModule, requireNativeModule } from \"expo\";\n\nimport { LibVlcPlayerModuleEvents } from \"./LibVlcPlayer.types\";\n\ndeclare class LibVlcPlayerModule extends NativeModule<LibVlcPlayerModuleEvents> {\n /** Attempts to trigger the local network privacy alert\n *\n * @returns A promise which resolves to `void`\n *\n * @platform ios\n */\n triggerNetworkAlert(): Promise<void>;\n /**\n * Checks whether the device supports Picture-in-Picture (PiP)\n *\n * @returns A `boolean` indicating Picture-in-Picture (PiP) support\n */\n isPictureInPictureSupported(): boolean;\n}\n\nexport default requireNativeModule<LibVlcPlayerModule>(\"ExpoLibVlcPlayer\");\n"]}
1
+ {"version":3,"file":"LibVlcPlayerModule.js","sourceRoot":"","sources":["../src/LibVlcPlayerModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,mBAAmB,EAAE,MAAM,MAAM,CAAC;AAoBzD,eAAe,mBAAmB,CAAqB,kBAAkB,CAAC,CAAC","sourcesContent":["import { NativeModule, requireNativeModule } from \"expo\";\n\nimport { type LibVlcPlayerModuleEvents } from \"./LibVlcPlayer.types\";\n\ndeclare class LibVlcPlayerModule extends NativeModule<LibVlcPlayerModuleEvents> {\n /** Attempts to trigger the local network privacy alert\n *\n * @returns A promise which resolves to `void`\n *\n * @platform ios\n */\n triggerNetworkAlert(): Promise<void>;\n /**\n * Checks whether the device supports Picture-in-Picture (PiP)\n *\n * @returns A `boolean` indicating Picture-in-Picture (PiP) support\n */\n isPictureInPictureSupported(): boolean;\n}\n\nexport default requireNativeModule<LibVlcPlayerModule>(\"ExpoLibVlcPlayer\");\n"]}
@@ -1,4 +1,4 @@
1
- import { LibVlcPlayerViewProps, LibVlcPlayerViewRef } from "./LibVlcPlayer.types";
2
- declare const LibVlcPlayerView: import("react").ForwardRefExoticComponent<LibVlcPlayerViewProps & import("react").RefAttributes<LibVlcPlayerViewRef>>;
1
+ import { type LibVlcPlayerViewProps } from "./LibVlcPlayer.types";
2
+ declare const LibVlcPlayerView: ({ ref, ...props }: LibVlcPlayerViewProps) => import("react").JSX.Element;
3
3
  export default LibVlcPlayerView;
4
4
  //# sourceMappingURL=LibVlcPlayerView.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LibVlcPlayerView.d.ts","sourceRoot":"","sources":["../src/LibVlcPlayerView.tsx"],"names":[],"mappings":"AAIA,OAAO,EAEL,qBAAqB,EACrB,mBAAmB,EAWpB,MAAM,sBAAsB,CAAC;AAe9B,QAAA,MAAM,gBAAgB,uHAqGpB,CAAC;AAEH,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"LibVlcPlayerView.d.ts","sourceRoot":"","sources":["../src/LibVlcPlayerView.tsx"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,qBAAqB,EAW3B,MAAM,sBAAsB,CAAC;AAe9B,QAAA,MAAM,gBAAgB,GAAI,mBAAmB,qBAAqB,gCAqGjE,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { requireNativeView } from "expo";
2
- import { forwardRef, useRef } from "react";
2
+ import { useRef } from "react";
3
3
  import { View } from "react-native";
4
4
  import { convertAspectRatio } from "./utils/aspect";
5
5
  import { parseNativeSource } from "./utils/assets";
@@ -8,7 +8,7 @@ const NativeView = requireNativeView("ExpoLibVlcPlayer");
8
8
  const RENDERING_CHILDREN_WARNING = "The <LibVlcPlayerView> component does not support children. This may lead to inconsistent behaviour or crashes. If you want to render content on top of the LibVlcPlayer, consider using absolute positioning.";
9
9
  let loggedRenderingChildrenWarning = false;
10
10
  const FALLBACK_RATIO = 16 / 9;
11
- const LibVlcPlayerView = forwardRef((props, ref) => {
11
+ const LibVlcPlayerView = ({ ref, ...props }) => {
12
12
  const defaultRatio = useRef(FALLBACK_RATIO);
13
13
  if (props.children && !loggedRenderingChildrenWarning) {
14
14
  console.warn(RENDERING_CHILDREN_WARNING);
@@ -73,6 +73,6 @@ const LibVlcPlayerView = forwardRef((props, ref) => {
73
73
  source: parseNativeSource(slave.source),
74
74
  }))} onEncounteredError={onEncounteredError} onDialogDisplay={onDialogDisplay} onTimeChanged={onTimeChanged} onPositionChanged={onPositionChanged} onESAdded={onESAdded} onRecordChanged={onRecordChanged} onSnapshotTaken={onSnapshotTaken} onFirstPlay={onFirstPlay}/>
75
75
  </View>);
76
- });
76
+ };
77
77
  export default LibVlcPlayerView;
78
78
  //# sourceMappingURL=LibVlcPlayerView.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LibVlcPlayerView.js","sourceRoot":"","sources":["../src/LibVlcPlayerView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAsB,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAiBpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD,MAAM,UAAU,GACd,iBAAiB,CAAC,kBAAkB,CAAC,CAAC;AAExC,MAAM,0BAA0B,GAC9B,gNAAgN,CAAC;AAEnN,IAAI,8BAA8B,GAAY,KAAK,CAAC;AAEpD,MAAM,cAAc,GAAG,EAAE,GAAG,CAAC,CAAC;AAE9B,MAAM,gBAAgB,GAAG,UAAU,CAA6C,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IAC7F,MAAM,YAAY,GAAG,MAAM,CAAmB,cAAc,CAAC,CAAC;IAE9D,IAAI,KAAK,CAAC,QAAQ,IAAI,CAAC,8BAA8B,EAAE,CAAC;QACtD,OAAO,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;QACzC,8BAA8B,GAAG,IAAI,CAAC;IACxC,CAAC;IAED,MAAM,kBAAkB,GAAG,CAAC,KAAyB,EAAE,EAAE;QACvD,MAAM,WAAW,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;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K,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YACpC,GAAG,KAAK;YACR,MAAM,EAAE,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAE;SACzC,CAAC,CAAC,CAAC,CACJ,kBAAkB,CAAC,CAAC,kBAAkB,CAAC,CACvC,eAAe,CAAC,CAAC,eAAe,CAAC,CACjC,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,eAAe,CAAC,CAAC,eAAe,CAAC,CACjC,eAAe,CAAC,CAAC,eAAe,CAAC,CACjC,WAAW,CAAC,CAAC,WAAW,CAAC,EAE7B;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,gBAAgB,CAAC","sourcesContent":["import { requireNativeView } from \"expo\";\nimport { forwardRef, useRef, type ComponentType } from \"react\";\nimport { View } from \"react-native\";\n\nimport {\n LibVlcPlayerViewNativeProps,\n LibVlcPlayerViewProps,\n LibVlcPlayerViewRef,\n type Dialog,\n type Error,\n type MediaInfo,\n type MediaTracks,\n type NativeEvent,\n type Position,\n type Recording,\n type Snapshot,\n type Time,\n type VideoAspectRatio,\n} from \"./LibVlcPlayer.types\";\nimport { convertAspectRatio } from \"./utils/aspect\";\nimport { parseNativeSource } from \"./utils/assets\";\nimport { convertNativeEvent } from \"./utils/events\";\n\nconst NativeView: ComponentType<LibVlcPlayerViewNativeProps> =\n requireNativeView(\"ExpoLibVlcPlayer\");\n\nconst RENDERING_CHILDREN_WARNING =\n \"The <LibVlcPlayerView> component does not support children. This may lead to inconsistent behaviour or crashes. If you want to render content on top of the LibVlcPlayer, consider using absolute positioning.\";\n\nlet loggedRenderingChildrenWarning: boolean = false;\n\nconst FALLBACK_RATIO = 16 / 9;\n\nconst LibVlcPlayerView = forwardRef<LibVlcPlayerViewRef, LibVlcPlayerViewProps>((props, ref) => {\n const defaultRatio = useRef<VideoAspectRatio>(FALLBACK_RATIO);\n\n if (props.children && !loggedRenderingChildrenWarning) {\n console.warn(RENDERING_CHILDREN_WARNING);\n loggedRenderingChildrenWarning = true;\n }\n\n const onEncounteredError = (event: NativeEvent<Error>) => {\n const nativeEvent = convertNativeEvent(event);\n\n if (props.onEncounteredError) {\n props.onEncounteredError(nativeEvent);\n }\n };\n\n const onDialogDisplay = (event: NativeEvent<Dialog>) => {\n const nativeEvent = convertNativeEvent(event);\n\n if (props.onDialogDisplay) {\n props.onDialogDisplay(nativeEvent);\n }\n };\n\n const onTimeChanged = (event: NativeEvent<Time>) => {\n const nativeEvent = convertNativeEvent(event);\n\n if (props.onTimeChanged) {\n props.onTimeChanged(nativeEvent);\n }\n };\n\n const onPositionChanged = (event: NativeEvent<Position>) => {\n const nativeEvent = convertNativeEvent(event);\n\n if (props.onPositionChanged) {\n props.onPositionChanged(nativeEvent);\n }\n };\n\n const onESAdded = (event: NativeEvent<MediaTracks>) => {\n const nativeEvent = convertNativeEvent(event);\n\n if (props.onESAdded) {\n props.onESAdded(nativeEvent);\n }\n };\n\n const onRecordChanged = (event: NativeEvent<Recording>) => {\n const nativeEvent = convertNativeEvent(event);\n\n if (props.onRecordChanged) {\n props.onRecordChanged(nativeEvent);\n }\n };\n\n const onSnapshotTaken = (event: NativeEvent<Snapshot>) => {\n const nativeEvent = convertNativeEvent(event);\n\n if (props.onSnapshotTaken) {\n props.onSnapshotTaken(nativeEvent);\n }\n };\n\n const onFirstPlay = (event: NativeEvent<MediaInfo>) => {\n const nativeEvent = convertNativeEvent(event);\n const mediaRatio = nativeEvent.width / nativeEvent.height;\n\n if (props.onFirstPlay) {\n props.onFirstPlay(nativeEvent);\n }\n\n defaultRatio.current = mediaRatio || FALLBACK_RATIO;\n };\n\n const propRatio = props.aspectRatio;\n const aspectRatio = propRatio === \"auto\" ? defaultRatio.current : propRatio;\n const nativeRatio = convertAspectRatio(aspectRatio);\n\n return (\n <View style={[props.style, { aspectRatio: nativeRatio }]}>\n <NativeView\n {...props}\n ref={ref}\n style={[props.style, { height: \"100%\" }]}\n source={parseNativeSource(props.source)}\n slaves={props.slaves?.map((slave) => ({\n ...slave,\n source: parseNativeSource(slave.source)!,\n }))}\n onEncounteredError={onEncounteredError}\n onDialogDisplay={onDialogDisplay}\n onTimeChanged={onTimeChanged}\n onPositionChanged={onPositionChanged}\n onESAdded={onESAdded}\n onRecordChanged={onRecordChanged}\n onSnapshotTaken={onSnapshotTaken}\n onFirstPlay={onFirstPlay}\n />\n </View>\n );\n});\n\nexport default LibVlcPlayerView;\n"]}
1
+ {"version":3,"file":"LibVlcPlayerView.js","sourceRoot":"","sources":["../src/LibVlcPlayerView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,EAAE,MAAM,EAAsB,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAgBpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD,MAAM,UAAU,GACd,iBAAiB,CAAC,kBAAkB,CAAC,CAAC;AAExC,MAAM,0BAA0B,GAC9B,gNAAgN,CAAC;AAEnN,IAAI,8BAA8B,GAAG,KAAK,CAAC;AAE3C,MAAM,cAAc,GAAG,EAAE,GAAG,CAAC,CAAC;AAE9B,MAAM,gBAAgB,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,KAAK,EAAyB,EAAE,EAAE;IACpE,MAAM,YAAY,GAAG,MAAM,CAAmB,cAAc,CAAC,CAAC;IAE9D,IAAI,KAAK,CAAC,QAAQ,IAAI,CAAC,8BAA8B,EAAE,CAAC;QACtD,OAAO,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;QAC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AAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CACzC,MAAM,CAAC,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CACxC,MAAM,CAAC,CAAC,KAAK,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YACpC,GAAG,KAAK;YACR,MAAM,EAAE,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC;SACxC,CAAC,CAAC,CAAC,CACJ,kBAAkB,CAAC,CAAC,kBAAkB,CAAC,CACvC,eAAe,CAAC,CAAC,eAAe,CAAC,CACjC,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,eAAe,CAAC,CAAC,eAAe,CAAC,CACjC,eAAe,CAAC,CAAC,eAAe,CAAC,CACjC,WAAW,CAAC,CAAC,WAAW,CAAC,EAE7B;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["import { requireNativeView } from \"expo\";\nimport { useRef, type ComponentType } from \"react\";\nimport { View } from \"react-native\";\n\nimport {\n type LibVlcPlayerViewNativeProps,\n type LibVlcPlayerViewProps,\n type Dialog,\n type Error,\n type MediaInfo,\n type MediaTracks,\n type NativeEvent,\n type Position,\n type Recording,\n type Snapshot,\n type Time,\n type VideoAspectRatio,\n} from \"./LibVlcPlayer.types\";\nimport { convertAspectRatio } from \"./utils/aspect\";\nimport { parseNativeSource } from \"./utils/assets\";\nimport { convertNativeEvent } from \"./utils/events\";\n\nconst NativeView: ComponentType<LibVlcPlayerViewNativeProps> =\n requireNativeView(\"ExpoLibVlcPlayer\");\n\nconst RENDERING_CHILDREN_WARNING =\n \"The <LibVlcPlayerView> component does not support children. This may lead to inconsistent behaviour or crashes. If you want to render content on top of the LibVlcPlayer, consider using absolute positioning.\";\n\nlet loggedRenderingChildrenWarning = false;\n\nconst FALLBACK_RATIO = 16 / 9;\n\nconst LibVlcPlayerView = ({ ref, ...props }: LibVlcPlayerViewProps) => {\n const defaultRatio = useRef<VideoAspectRatio>(FALLBACK_RATIO);\n\n if (props.children && !loggedRenderingChildrenWarning) {\n console.warn(RENDERING_CHILDREN_WARNING);\n loggedRenderingChildrenWarning = true;\n }\n\n const onEncounteredError = (event: NativeEvent<Error>) => {\n const nativeEvent = convertNativeEvent(event);\n\n if (props.onEncounteredError) {\n props.onEncounteredError(nativeEvent);\n }\n };\n\n const onDialogDisplay = (event: NativeEvent<Dialog>) => {\n const nativeEvent = convertNativeEvent(event);\n\n if (props.onDialogDisplay) {\n props.onDialogDisplay(nativeEvent);\n }\n };\n\n const onTimeChanged = (event: NativeEvent<Time>) => {\n const nativeEvent = convertNativeEvent(event);\n\n if (props.onTimeChanged) {\n props.onTimeChanged(nativeEvent);\n }\n };\n\n const onPositionChanged = (event: NativeEvent<Position>) => {\n const nativeEvent = convertNativeEvent(event);\n\n if (props.onPositionChanged) {\n props.onPositionChanged(nativeEvent);\n }\n };\n\n const onESAdded = (event: NativeEvent<MediaTracks>) => {\n const nativeEvent = convertNativeEvent(event);\n\n if (props.onESAdded) {\n props.onESAdded(nativeEvent);\n }\n };\n\n const onRecordChanged = (event: NativeEvent<Recording>) => {\n const nativeEvent = convertNativeEvent(event);\n\n if (props.onRecordChanged) {\n props.onRecordChanged(nativeEvent);\n }\n };\n\n const onSnapshotTaken = (event: NativeEvent<Snapshot>) => {\n const nativeEvent = convertNativeEvent(event);\n\n if (props.onSnapshotTaken) {\n props.onSnapshotTaken(nativeEvent);\n }\n };\n\n const onFirstPlay = (event: NativeEvent<MediaInfo>) => {\n const nativeEvent = convertNativeEvent(event);\n const mediaRatio = nativeEvent.width / nativeEvent.height;\n\n if (props.onFirstPlay) {\n props.onFirstPlay(nativeEvent);\n }\n\n defaultRatio.current = mediaRatio || FALLBACK_RATIO;\n };\n\n const propRatio = props.aspectRatio;\n const aspectRatio = propRatio === \"auto\" ? defaultRatio.current : propRatio;\n const nativeRatio = convertAspectRatio(aspectRatio);\n\n return (\n <View style={[props.style, { aspectRatio: nativeRatio }]}>\n <NativeView\n {...props}\n ref={ref}\n style={[props.style, { height: \"100%\" }]}\n source={parseNativeSource(props.source)}\n slaves={props.slaves?.map((slave) => ({\n ...slave,\n source: parseNativeSource(slave.source),\n }))}\n onEncounteredError={onEncounteredError}\n onDialogDisplay={onDialogDisplay}\n onTimeChanged={onTimeChanged}\n onPositionChanged={onPositionChanged}\n onESAdded={onESAdded}\n onRecordChanged={onRecordChanged}\n onSnapshotTaken={onSnapshotTaken}\n onFirstPlay={onFirstPlay}\n />\n </View>\n );\n};\n\nexport default LibVlcPlayerView;\n"]}
@@ -1,3 +1,3 @@
1
- import { VideoAspectRatio } from "../LibVlcPlayer.types";
1
+ import { type VideoAspectRatio } from "../LibVlcPlayer.types";
2
2
  export declare function convertAspectRatio(ratio?: VideoAspectRatio): VideoAspectRatio | undefined;
3
3
  //# sourceMappingURL=aspect.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"aspect.d.ts","sourceRoot":"","sources":["../../src/utils/aspect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,wBAAgB,kBAAkB,CAAC,KAAK,CAAC,EAAE,gBAAgB,GAAG,gBAAgB,GAAG,SAAS,CAgBzF"}
1
+ {"version":3,"file":"aspect.d.ts","sourceRoot":"","sources":["../../src/utils/aspect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,wBAAgB,kBAAkB,CAAC,KAAK,CAAC,EAAE,gBAAgB,GAAG,gBAAgB,GAAG,SAAS,CAgBzF"}
@@ -1 +1 @@
1
- {"version":3,"file":"aspect.js","sourceRoot":"","sources":["../../src/utils/aspect.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,kBAAkB,CAAC,KAAwB;IACzD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAEjC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACzB,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YAE5C,MAAM,YAAY,GAAG,KAAK,GAAG,CAAC,IAAI,MAAM,GAAG,CAAC,CAAC;YAE7C,IAAI,YAAY,EAAE,CAAC;gBACjB,OAAO,KAAK,GAAG,MAAM,CAAC;YACxB,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import { VideoAspectRatio } from \"../LibVlcPlayer.types\";\n\nexport function convertAspectRatio(ratio?: VideoAspectRatio): VideoAspectRatio | undefined {\n if (typeof ratio === \"string\") {\n const numbers = ratio.split(\":\");\n\n if (numbers.length === 2) {\n const [width, height] = numbers.map(Number);\n\n const hasVideoSize = width > 0 && height > 0;\n\n if (hasVideoSize) {\n return width / height;\n }\n }\n }\n\n return ratio;\n}\n"]}
1
+ {"version":3,"file":"aspect.js","sourceRoot":"","sources":["../../src/utils/aspect.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,kBAAkB,CAAC,KAAwB;IACzD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAEjC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACzB,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YAE5C,MAAM,YAAY,GAAG,KAAK,GAAG,CAAC,IAAI,MAAM,GAAG,CAAC,CAAC;YAE7C,IAAI,YAAY,EAAE,CAAC;gBACjB,OAAO,KAAK,GAAG,MAAM,CAAC;YACxB,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import { type VideoAspectRatio } from \"../LibVlcPlayer.types\";\n\nexport function convertAspectRatio(ratio?: VideoAspectRatio): VideoAspectRatio | undefined {\n if (typeof ratio === \"string\") {\n const numbers = ratio.split(\":\");\n\n if (numbers.length === 2) {\n const [width, height] = numbers.map(Number);\n\n const hasVideoSize = width > 0 && height > 0;\n\n if (hasVideoSize) {\n return width / height;\n }\n }\n }\n\n return ratio;\n}\n"]}
@@ -1,3 +1,4 @@
1
- import { LibVlcSource } from "../LibVlcPlayer.types";
1
+ import { type LibVlcSlaveSource, type LibVlcSource } from "../LibVlcPlayer.types";
2
+ export declare function parseNativeSource(source: LibVlcSlaveSource): LibVlcSlaveSource;
2
3
  export declare function parseNativeSource(source: LibVlcSource): LibVlcSource;
3
4
  //# sourceMappingURL=assets.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../src/utils/assets.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,YAAY,GAAG,YAAY,CAMpE"}
1
+ {"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../src/utils/assets.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAElF,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,iBAAiB,GAAG,iBAAiB,CAAC;AAChF,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,YAAY,GAAG,YAAY,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"assets.js","sourceRoot":"","sources":["../../src/utils/assets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAIrC,MAAM,UAAU,iBAAiB,CAAC,MAAoB;IACpD,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC/B,OAAO,KAAK,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC;IAC9C,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import { Image } from \"react-native\";\n\nimport { LibVlcSource } from \"../LibVlcPlayer.types\";\n\nexport function parseNativeSource(source: LibVlcSource): LibVlcSource {\n if (typeof source === \"number\") {\n return Image.resolveAssetSource(source).uri;\n }\n\n return source;\n}\n"]}
1
+ {"version":3,"file":"assets.js","sourceRoot":"","sources":["../../src/utils/assets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAMrC,MAAM,UAAU,iBAAiB,CAAC,MAAoB;IACpD,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC/B,OAAO,KAAK,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC;IAC9C,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import { Image } from \"react-native\";\n\nimport { type LibVlcSlaveSource, type LibVlcSource } from \"../LibVlcPlayer.types\";\n\nexport function parseNativeSource(source: LibVlcSlaveSource): LibVlcSlaveSource;\nexport function parseNativeSource(source: LibVlcSource): LibVlcSource;\nexport function parseNativeSource(source: LibVlcSource): LibVlcSource {\n if (typeof source === \"number\") {\n return Image.resolveAssetSource(source).uri;\n }\n\n return source;\n}\n"]}
@@ -1,3 +1,3 @@
1
- import { LibVlcEvent, NativeEvent } from "../LibVlcPlayer.types";
1
+ import { type LibVlcEvent, type NativeEvent } from "../LibVlcPlayer.types";
2
2
  export declare function convertNativeEvent<T>(event: NativeEvent<T>): LibVlcEvent<T>;
3
3
  //# sourceMappingURL=events.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/utils/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEjE,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAG3E"}
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/utils/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAE3E,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAG3E"}
@@ -1 +1 @@
1
- {"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/utils/events.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,kBAAkB,CAAI,KAAqB;IACzD,MAAM,EAAE,MAAM,EAAE,GAAG,WAAW,EAAE,GAAG,KAAK,CAAC,WAAW,CAAC;IACrD,OAAO,WAAW,CAAC;AACrB,CAAC","sourcesContent":["import { LibVlcEvent, NativeEvent } from \"../LibVlcPlayer.types\";\n\nexport function convertNativeEvent<T>(event: NativeEvent<T>): LibVlcEvent<T> {\n const { target, ...nativeEvent } = event.nativeEvent;\n return nativeEvent;\n}\n"]}
1
+ {"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/utils/events.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,kBAAkB,CAAI,KAAqB;IACzD,MAAM,EAAE,MAAM,EAAE,GAAG,WAAW,EAAE,GAAG,KAAK,CAAC,WAAW,CAAC;IACrD,OAAO,WAAW,CAAC;AACrB,CAAC","sourcesContent":["import { type LibVlcEvent, type NativeEvent } from \"../LibVlcPlayer.types\";\n\nexport function convertNativeEvent<T>(event: NativeEvent<T>): LibVlcEvent<T> {\n const { target, ...nativeEvent } = event.nativeEvent;\n return nativeEvent;\n}\n"]}
@@ -223,11 +223,18 @@ class LibVlcPlayerView: ExpoView {
223
223
  }
224
224
 
225
225
  if volume != MediaPlayerConstants.maxPlayerVolume || mute {
226
- let newVolume = mute ?
227
- MediaPlayerConstants.minPlayerVolume :
228
- volume
226
+ // Audio instance not available, try again
227
+ retryUntil { [weak self] isLastAttempt in
228
+ guard let self else { return true }
229
229
 
230
- player.audio?.volume = Int32(newVolume)
230
+ let newVolume = mute ?
231
+ MediaPlayerConstants.minPlayerVolume :
232
+ volume
233
+
234
+ player.audio?.volume = Int32(newVolume)
235
+
236
+ return isLastAttempt
237
+ }
231
238
  }
232
239
 
233
240
  time = MediaPlayerConstants.defaultPlayerTime
package/package.json CHANGED
@@ -1,17 +1,16 @@
1
1
  {
2
2
  "name": "expo-libvlc-player",
3
- "version": "7.0.5",
3
+ "version": "7.0.7",
4
4
  "description": "LibVLC Player for Expo",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
7
7
  "scripts": {
8
- "build": "expo-module build",
9
- "clean": "expo-module clean",
10
- "lint": "expo-module lint",
11
- "prepare": "husky && expo-module prepare",
12
- "prepublishOnly": "expo-module prepublishOnly",
13
- "open:ios": "xed example/ios",
14
- "open:android": "open -a \"Android Studio\" example/android"
8
+ "build": "node internal/module_scripts/build.js",
9
+ "clean": "node internal/module_scripts/clean.js",
10
+ "lint": "eslint src/",
11
+ "prepare": "node internal/module_scripts/prepare.js",
12
+ "open:ios": "node internal/module_scripts/open-ios.js",
13
+ "open:android": "node internal/module_scripts/open-android.js"
15
14
  },
16
15
  "keywords": [
17
16
  "react-native",
@@ -32,21 +31,18 @@
32
31
  "author": "David Cornejo <davidcornejo1@live.com> (https://github.com/cornejobarraza)",
33
32
  "license": "MIT",
34
33
  "homepage": "https://github.com/cornejobarraza/expo-libvlc-player#readme",
35
- "dependencies": {},
36
34
  "devDependencies": {
37
- "@eslint/compat": "^1.4.1",
38
- "@eslint/eslintrc": "^3.3.5",
39
- "@eslint/js": "^9.39.4",
40
35
  "@types/react": "~19.2.10",
41
36
  "eslint": "^9.39.4",
37
+ "eslint-config-prettier": "^10.1.8",
38
+ "eslint-plugin-prettier": "^5.5.5",
42
39
  "expo": "~55.0.15",
43
- "expo-module-scripts": "^55.0.2",
44
- "globals": "^16.5.0",
45
40
  "husky": "^9.1.7",
46
- "lint-staged": "^16.3.2",
47
- "prettier": "^3.8.1",
41
+ "lint-staged": "^16.4.0",
42
+ "prettier": "^3.8.3",
48
43
  "react-native": "0.83.6",
49
- "typescript": "^5.9.3"
44
+ "typescript": "^5.9.3",
45
+ "typescript-eslint": "^8.59.0"
50
46
  },
51
47
  "peerDependencies": {
52
48
  "expo": "*",
@@ -4,7 +4,9 @@ const config_plugins_1 = require("expo/config-plugins");
4
4
  const LOCAL_NETWORK_USAGE = "Allow $(PRODUCT_NAME) to access your local network";
5
5
  const AUDIO_BACKGROUND_MODE = "audio";
6
6
  const PICTURE_CONFIG_MANIFEST = "android:supportsPictureInPicture";
7
- const withExpoLibVlcPlayer = (config, { localNetworkPermission, supportsPictureInPicture } = {}) => {
7
+ const withExpoLibVlcPlayer = (config,
8
+ // eslint-disable-next-line @typescript-eslint/no-useless-default-assignment
9
+ { localNetworkPermission, supportsPictureInPicture } = {}) => {
8
10
  config_plugins_1.IOSConfig.Permissions.createPermissionsPlugin({
9
11
  NSLocalNetworkUsageDescription: LOCAL_NETWORK_USAGE,
10
12
  })(config, {
@@ -32,7 +34,7 @@ const withExpoLibVlcPlayer = (config, { localNetworkPermission, supportsPictureI
32
34
  activity.$[PICTURE_CONFIG_MANIFEST] = "true";
33
35
  }
34
36
  else {
35
- delete activity.$[PICTURE_CONFIG_MANIFEST];
37
+ Reflect.deleteProperty(activity.$, PICTURE_CONFIG_MANIFEST);
36
38
  }
37
39
  }
38
40
  return config;
@@ -17,6 +17,7 @@ const PICTURE_CONFIG_MANIFEST = "android:supportsPictureInPicture";
17
17
 
18
18
  const withExpoLibVlcPlayer: ConfigPlugin<WithExpoLibVlcPlayerProps> = (
19
19
  config,
20
+ // eslint-disable-next-line @typescript-eslint/no-useless-default-assignment
20
21
  { localNetworkPermission, supportsPictureInPicture } = {}
21
22
  ) => {
22
23
  IOSConfig.Permissions.createPermissionsPlugin({
@@ -51,7 +52,7 @@ const withExpoLibVlcPlayer: ConfigPlugin<WithExpoLibVlcPlayerProps> = (
51
52
  if (supportsPictureInPicture) {
52
53
  activity.$[PICTURE_CONFIG_MANIFEST] = "true";
53
54
  } else {
54
- delete activity.$[PICTURE_CONFIG_MANIFEST];
55
+ Reflect.deleteProperty(activity.$, PICTURE_CONFIG_MANIFEST);
55
56
  }
56
57
  }
57
58
 
@@ -1,6 +1,13 @@
1
1
  {
2
- "extends": "expo-module-scripts/tsconfig.plugin",
3
2
  "compilerOptions": {
3
+ "lib": ["es2023"],
4
+ "module": "node16",
5
+ "target": "es2022",
6
+ "strict": true,
7
+ "esModuleInterop": true,
8
+ "skipLibCheck": true,
9
+ "moduleResolution": "node16",
10
+ "declaration": true,
4
11
  "rootDir": "src",
5
12
  "outDir": "build"
6
13
  },
@@ -1,6 +1,6 @@
1
1
  import type { ViewProps } from "react-native";
2
2
 
3
- // eslint-disable-next-line @typescript-eslint/no-empty-object-type
3
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type, @typescript-eslint/consistent-type-definitions
4
4
  export type LibVlcPlayerModuleEvents = {};
5
5
 
6
6
  export interface LibVlcPlayerViewRef {
@@ -91,6 +91,8 @@ export interface LibVlcPlayerViewRef {
91
91
 
92
92
  export type LibVlcSource = string | number | null;
93
93
 
94
+ export type LibVlcSlaveSource = string | number;
95
+
94
96
  export interface Tracks {
95
97
  audio?: number;
96
98
  video?: number;
@@ -98,12 +100,12 @@ export interface Tracks {
98
100
  }
99
101
 
100
102
  export interface Slave {
101
- source: NonNullable<LibVlcSource>;
103
+ source: LibVlcSlaveSource;
102
104
  type: "audio" | "subtitle";
103
105
  selected?: boolean;
104
106
  }
105
107
 
106
- export type VideoAspectRatio = "auto" | string | number;
108
+ export type VideoAspectRatio = "auto" | (string & {}) | number;
107
109
 
108
110
  export type VideoContentFit = "contain" | "cover" | "fill";
109
111
 
@@ -119,13 +121,21 @@ export interface NativeEvent<T> {
119
121
 
120
122
  export type LibVlcEvent<T> = Omit<T & NativeEventProps, "target">;
121
123
 
122
- export type Error = { message: string };
124
+ export interface Error {
125
+ message: string;
126
+ }
123
127
 
124
- export type Time = { value: number };
128
+ export interface Time {
129
+ value: number;
130
+ }
125
131
 
126
- export type Position = { value: number };
132
+ export interface Position {
133
+ value: number;
134
+ }
127
135
 
128
- export type Snapshot = { path: string };
136
+ export interface Snapshot {
137
+ path: string;
138
+ }
129
139
 
130
140
  export interface Dialog {
131
141
  title: string;
@@ -278,6 +288,14 @@ export interface LibVlcPlayerViewNativeProps extends ViewProps {
278
288
  }
279
289
 
280
290
  export interface LibVlcPlayerViewProps extends ViewProps {
291
+ /**
292
+ * Allows getting a ref to the component instance.
293
+ *
294
+ * Once the component unmounts, React will set `ref.current` to `null`
295
+ *
296
+ * @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}
297
+ */
298
+ ref: React.RefObject<LibVlcPlayerViewRef | null>;
281
299
  /**
282
300
  * Sets the source of the media to be played. Set to `null` to release the player
283
301
  *
@@ -292,11 +310,9 @@ export interface LibVlcPlayerViewProps extends ViewProps {
292
310
  */
293
311
  source: LibVlcSource;
294
312
  /**
295
- * Sets the options to initialize the media with.
296
- *
297
- * See the VideoLAN Wiki for more:
313
+ * Sets the options to initialize the media with
298
314
  *
299
- * https://wiki.videolan.org/VLC_command-line_help/
315
+ * @see {@link https://wiki.videolan.org/VLC_command-line_help/ VideoLAN Wiki}
300
316
  *
301
317
  * @example
302
318
  *
@@ -1,6 +1,6 @@
1
1
  import { NativeModule, requireNativeModule } from "expo";
2
2
 
3
- import { LibVlcPlayerModuleEvents } from "./LibVlcPlayer.types";
3
+ import { type LibVlcPlayerModuleEvents } from "./LibVlcPlayer.types";
4
4
 
5
5
  declare class LibVlcPlayerModule extends NativeModule<LibVlcPlayerModuleEvents> {
6
6
  /** Attempts to trigger the local network privacy alert
@@ -1,11 +1,10 @@
1
1
  import { requireNativeView } from "expo";
2
- import { forwardRef, useRef, type ComponentType } from "react";
2
+ import { useRef, type ComponentType } from "react";
3
3
  import { View } from "react-native";
4
4
 
5
5
  import {
6
- LibVlcPlayerViewNativeProps,
7
- LibVlcPlayerViewProps,
8
- LibVlcPlayerViewRef,
6
+ type LibVlcPlayerViewNativeProps,
7
+ type LibVlcPlayerViewProps,
9
8
  type Dialog,
10
9
  type Error,
11
10
  type MediaInfo,
@@ -27,11 +26,11 @@ const NativeView: ComponentType<LibVlcPlayerViewNativeProps> =
27
26
  const RENDERING_CHILDREN_WARNING =
28
27
  "The <LibVlcPlayerView> component does not support children. This may lead to inconsistent behaviour or crashes. If you want to render content on top of the LibVlcPlayer, consider using absolute positioning.";
29
28
 
30
- let loggedRenderingChildrenWarning: boolean = false;
29
+ let loggedRenderingChildrenWarning = false;
31
30
 
32
31
  const FALLBACK_RATIO = 16 / 9;
33
32
 
34
- const LibVlcPlayerView = forwardRef<LibVlcPlayerViewRef, LibVlcPlayerViewProps>((props, ref) => {
33
+ const LibVlcPlayerView = ({ ref, ...props }: LibVlcPlayerViewProps) => {
35
34
  const defaultRatio = useRef<VideoAspectRatio>(FALLBACK_RATIO);
36
35
 
37
36
  if (props.children && !loggedRenderingChildrenWarning) {
@@ -119,7 +118,7 @@ const LibVlcPlayerView = forwardRef<LibVlcPlayerViewRef, LibVlcPlayerViewProps>(
119
118
  source={parseNativeSource(props.source)}
120
119
  slaves={props.slaves?.map((slave) => ({
121
120
  ...slave,
122
- source: parseNativeSource(slave.source)!,
121
+ source: parseNativeSource(slave.source),
123
122
  }))}
124
123
  onEncounteredError={onEncounteredError}
125
124
  onDialogDisplay={onDialogDisplay}
@@ -132,6 +131,6 @@ const LibVlcPlayerView = forwardRef<LibVlcPlayerViewRef, LibVlcPlayerViewProps>(
132
131
  />
133
132
  </View>
134
133
  );
135
- });
134
+ };
136
135
 
137
136
  export default LibVlcPlayerView;
@@ -1,4 +1,4 @@
1
- import { VideoAspectRatio } from "../LibVlcPlayer.types";
1
+ import { type VideoAspectRatio } from "../LibVlcPlayer.types";
2
2
 
3
3
  export function convertAspectRatio(ratio?: VideoAspectRatio): VideoAspectRatio | undefined {
4
4
  if (typeof ratio === "string") {
@@ -1,7 +1,9 @@
1
1
  import { Image } from "react-native";
2
2
 
3
- import { LibVlcSource } from "../LibVlcPlayer.types";
3
+ import { type LibVlcSlaveSource, type LibVlcSource } from "../LibVlcPlayer.types";
4
4
 
5
+ export function parseNativeSource(source: LibVlcSlaveSource): LibVlcSlaveSource;
6
+ export function parseNativeSource(source: LibVlcSource): LibVlcSource;
5
7
  export function parseNativeSource(source: LibVlcSource): LibVlcSource {
6
8
  if (typeof source === "number") {
7
9
  return Image.resolveAssetSource(source).uri;
@@ -1,4 +1,4 @@
1
- import { LibVlcEvent, NativeEvent } from "../LibVlcPlayer.types";
1
+ import { type LibVlcEvent, type NativeEvent } from "../LibVlcPlayer.types";
2
2
 
3
3
  export function convertNativeEvent<T>(event: NativeEvent<T>): LibVlcEvent<T> {
4
4
  const { target, ...nativeEvent } = event.nativeEvent;
package/tsconfig.json CHANGED
@@ -1,6 +1,24 @@
1
1
  {
2
- "extends": "expo-module-scripts/tsconfig.base",
3
2
  "compilerOptions": {
3
+ "lib": ["dom", "DOM.Iterable", "esnext"],
4
+ "typeRoots": ["./ts-declarations", "./node_modules/@types"],
5
+ "jsx": "react-native",
6
+ "target": "esnext",
7
+ "moduleResolution": "bundler",
8
+ "module": "esnext",
9
+ "moduleDetection": "force",
10
+ "esModuleInterop": true,
11
+ "sourceMap": true,
12
+ "declaration": true,
13
+ "declarationMap": true,
14
+ "inlineSources": true,
15
+ "skipLibCheck": true,
16
+ "strict": true,
17
+ "noFallthroughCasesInSwitch": true,
18
+ "noPropertyAccessFromIndexSignature": false,
19
+ "noImplicitReturns": true,
20
+ "noUnusedLocals": true,
21
+ "noUnusedParameters": false,
4
22
  "rootDir": "./src",
5
23
  "outDir": "./build"
6
24
  },