jwplayer / jwplayer-react-native

MIT License
32 stars 9 forks source link

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

Open normtronics opened 1 month ago

normtronics commented 1 month ago

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?

Jmilham21 commented 1 month ago

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.

normtronics commented 1 month ago

@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 commented 1 month ago

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 commented 1 month ago

@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.