Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: type VideoPlayerRef Import Not Available in react-native-video-player #209

Open
AndyDesign999 opened this issue Dec 20, 2024 · 6 comments
Labels

Comments

@AndyDesign999
Copy link

AndyDesign999 commented Dec 20, 2024

Version

0.15.0

What platforms are you having the problem on?

iOS, Android

On what device are you experiencing the issue?

Real device

Architecture

New architecture

What happened?

I am using the react-native-video-player library in my project, and I encountered an issue with the VideoPlayerRef type. According to the example in the documentation, it is imported as:
import VideoPlayer, { type VideoPlayerRef } from 'react-native-video-player';
However, the type VideoPlayerRef is not available in the library, and it causes a red error in my IDE.

Reproduction

Steps to Reproduce:
Install the library: npm install react-native-video-player
Import VideoPlayer and type VideoPlayerRef as per the documentation example:
import VideoPlayer, { type VideoPlayerRef } from 'react-native-video-player';
Observe that the IDE (e.g., VSCode) highlights an error indicating VideoPlayerRef is not exported.

Expected Behavior:
The type VideoPlayerRef should be available for import as shown in the documentation, allowing proper type-checking and usage with useRef.

Actual Behavior:
An error occurs because type VideoPlayerRef is not exported by the library.

Workaround:
Currently, I am unable to use the VideoPlayerRef type, and there is no clear guidance on how to handle this.

Copy link
Contributor

github-actions bot commented Dec 20, 2024

Previous bot comment (click to expand)
Previous bot comment (click to expand)

Thank you for your issue report. Please note that the following information is missing or incomplete:

  • what happened?
  • reproduction link

Please update your issue with this information to help us address it more effectively.

Note: issues without complete information have a lower priority

There is a newer version of the library available. You are using version 0.15.0, while the latest stable version is 6.8.2. Please update to the latest version and check if the issue still exists.

Note: If the issue still exists, please update the issue report with the latest information.

Copy link
Contributor

github-actions bot commented Dec 20, 2024

Previous bot comment (click to expand)

Thank you for your issue report. Please note that the following information is missing or incomplete:

  • what happened?
  • reproduction link

Please update your issue with this information to help us address it more effectively.

Note: issues without complete information have a lower priority

There is a newer version of the library available. You are using version 0.15.0, while the latest stable version is 6.8.2. Please update to the latest version and check if the issue still exists.

Note: If the issue still exists, please update the issue report with the latest information.

Copy link
Contributor

Thank you for your issue report. Please note that the following information is missing or incomplete:

  • system version
  • what happened?
  • reproduction link

Please update your issue with this information to help us address it more effectively.

Note: issues without complete information have a lower priority

There is a newer version of the library available. You are using version 0.15.0, while the latest stable version is 6.8.2. Please update to the latest version and check if the issue still exists.

Note: If the issue still exists, please update the issue report with the latest information.

@moskalakamil
Copy link
Member

do you have installed react-native-video library?

@AndyDesign999
Copy link
Author

@moskalakamil Yes

@phazei
Copy link

phazei commented Jan 16, 2025

I have a similar issue. We've been using react-native-video, it's been implemented for years, we just want better video controls in full screen on Android. I added this package, and I have:
import VideoPlayer from 'react-native-video-player'
But it doesn't detect any typing on it. I'm using VS Code, and I haven't had this issue with the other 300 some dependencies in our project. Clicking on the import doesn't find it's source either. I can click through on the import package and it takes me to the commonjs index.js. I don't know why it doesn't see the type files, our project is typescript ejs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants