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

Accessing view manager configs directly off UIManager via UIManager['RCTVideo'] is no longer supported. Use UIManager.getViewManagerConfig('RCTVideo') instead. #1463

Closed
omercanyigit opened this issue Jan 30, 2019 · 9 comments
Labels
stale Closed due to inactivity or lack or resources

Comments

@omercanyigit
Copy link

I can not use the library. It is saying that

" Accessing view manager configs directly off UIManager via UIManager['RCTVideo'] is no longer supported. Use UIManager.getViewManagerConfig('RCTVideo') instead. "

what can i do?

Thanx

jakks-team added a commit to jakks-team/react-native-video that referenced this issue Jan 31, 2019
Fix for Issue, directly accessing NativeModules.UIManager is no longer supported.
Propose to add import to UIManager directly from 'react-native' module on top and change the code from NativeModules.UIManager.RCTVideo.~~~ to UIManager.getViewManagerConfig('RCTVideo').~~~ as suggested from react-native's warning.
@jakks-team
Copy link

I'm getting just a warning for this same issue, made a fix for it on my own device.
After the fix it is able to play Audio correctly. Haven't tested for Video.

e830128
This is the commit for my changes.

@alphabikram
Copy link

please somebody update this ?

@omercanyigit
Copy link
Author

@jakks-team reason is correct but you have to update from the node_modules. It must be updated from the author.

@jakks-team
Copy link

@jakks-team reason is correct but you have to update from the node_modules. It must be updated from the author.

any guide on how to update from node_modules?
I'm new to committing changes for github projects.

@zacwasielewski
Copy link

zacwasielewski commented Feb 13, 2019

@jakks-team You should submit a pull request with your change.

Here are the guidelines for this specific project: https://github.com/react-native-community/react-native-video/blob/master/.github/PULL_REQUEST_TEMPLATE.md

And here are instructions for creating a pull request on Github: https://help.github.com/articles/creating-a-pull-request/

Hope that helps!

@jgreen01su
Copy link

jgreen01su commented Feb 13, 2019

@jakks-team reason is correct but you have to update from the node_modules. It must be updated from the author.

any guide on how to update from node_modules?
I'm new to committing changes for github projects.

I think @omercanyigit means installing git commit as npm package. ¯_(ツ)_/¯

I've tested this commit and it works on Android and iOS. Thank you so much @jakks-team !

This is a critical bug fix!

@mhtoyoda
Copy link

mhtoyoda commented Feb 14, 2019

When will this commit @jakks-team ?

@jakks-team
Copy link

jakks-team commented Feb 15, 2019

When will this commit @jakks-team ?

I'm not sure.
As I don't have write access to merge my commit to the master branch.
Please check here for the status as someone else helped to open a PR to merge my commit already.

And I think someone should close this issue and check on the PR to have someone with write access to master branch to merge this there.

@luisnaranjo733
Copy link

According to the PR @jakks-team linked above, this is fixed with 4.4.0, but I'm still seeing this issue on that version.

I see a different fix than the one that jakks-team presented in my node_modules 4.4.40

let nativeResizeMode;
const RCTVideoInstance = this.getViewManagerConfig('RCTVideo');

if (resizeMode === VideoResizeMode.stretch) {
  nativeResizeMode = RCTVideoInstance.Constants.ScaleToFill;
} else if (resizeMode === VideoResizeMode.contain) {
  nativeResizeMode = RCTVideoInstance.Constants.ScaleAspectFit;
} else if (resizeMode === VideoResizeMode.cover) {
  nativeResizeMode = RCTVideoInstance.Constants.ScaleAspectFill;
} else {
  nativeResizeMode = RCTVideoInstance.Constants.ScaleNone;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Closed due to inactivity or lack or resources
Projects
None yet
Development

No branches or pull requests

8 participants