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

[ASK] Migrating from react-native-jw-media-player to jwplayer-react-native #97

Open
normtronics opened this issue Oct 17, 2024 · 4 comments
Labels
delivered Work has been done. Awaiting acceptance

Comments

@normtronics
Copy link

normtronics commented Oct 17, 2024

What isn't clear?
There isn't a clear solution on migrating from from react-native-jw-media-player to jwplayer-react-native, specifically how to style the player in the same way. Is there guidance migrating from the old library to the new one?

@normtronics normtronics added the needs-grooming Has not been reviewed by codeowners for scope/validation label Oct 17, 2024
@Jmilham21
Copy link
Collaborator

Hi @normtronics, as of now, there aren't any massive changes from the legacy repository to this repository. All of the old props will still work, and if you continue to use the legacy repository props, you will want to add a prop to your config forceLegacyConfig: true. The biggest transition from the older repository to this in our 1.0.0 release was the support of props as defined by the JWP Delivery API.

If you have a need to use to older props with types like JwPlaylistItem or JwConfig, it should be possible but you may consider forking this repository to give yourself the control you desire.

@Jmilham21 Jmilham21 added delivered Work has been done. Awaiting acceptance and removed needs-grooming Has not been reviewed by codeowners for scope/validation labels Oct 21, 2024
@normtronics
Copy link
Author

@Jmilham21 Thanks for getting back to me. The issue I'm having mainly resolves around styling. With the old repo, my team uses CSS to style the player. In the new version, even with the legacy config parameter set to true, the styles passed into playerSkin don't work.

Do you have any guidance around moving from CSS styling of the player, to what you support now in the newer version of the player?

@Jmilham21
Copy link
Collaborator

Hey @normtronics, so it sounds like you may have been using a really old version of the legacy repository then as CSS in the JW SDKs has been deprecated since v3, and it hasn't been in that project for nearly two years as well.

The philosophy in the JWP V4 native SDKs was to go fully native in the UI. This means if your use case requires more customization than what's exposed in the configuration (via builders and some styling classes) than you could go with a custom UI. This repository is built on top of the V4 SDK, we only expose what is available for both platforms, which it sounds like is less than you'd desire. If it's crucial to your use case, I'd suggest considering customizing the player UI, or look at the Android and iOS styling guides for the native SDK. If something there isn't exposed, we can assist you, but if you need customization outside of that scope, you may need to fork this repository and create a custom implementation of a UI.

@normtronics
Copy link
Author

@Jmilham21 Thanks for getting back to me. Thanks for letting me know about the depreciation of the CSS.

I’ve been working on trying to style the player on the native side and use it in react native. It’s been challenging. The documentation isn’t very clear about how that works in conjunction with react native, so it’s been a bit of trial and error in my end.

Do you have any guides around creating custom player views on the native side and using those custom view in react native?

Just trying to get the best recommendation for my team to move forward with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delivered Work has been done. Awaiting acceptance
Projects
None yet
Development

No branches or pull requests

2 participants