Open jmurth1234 opened 4 months ago
Hi @jmurth1234 , I have some work started on this here: https://github.com/jwplayer/jwplayer-react-native/tree/improvement/typing-and-updates-for-load-playlist
I ran into an issue where the iOS json parser didn't expose a method for the equivalent of a JwPlaylistItem
, and rather than write a parser from scratch, I've made an internal ticket to expose the method. This will be addressed soon, but in the meantime I've updated the typing in the linked branch, allowed for sending a playlist URL in the loadPlaylist
, and added the expected support for Android. So iOS should work right now, but passing in a JwPlaylistItem[]
may not load all the fields.
Describe the bug The
loadPlaylist
method in the JWPlayer React Native SDK is using an incorrect type for its parameter. Currently, it usesPlaylistItem[]
, but it should be usingJwPlaylistItem[]
Steps to reproduce the behavior:
loadPlaylist
method definitionPlaylistItem[]
instead ofJwPlaylistItem[]
Expected behavior The
loadPlaylist
method should accept a parameter of typeJwPlaylistItem[]
whenforceLegacyConfig
is false or not set. WhenforceLegacyConfig
is true, it should acceptPlaylistItem[]
.Screenshots / Visual evidence N/A (This is a TypeScript definition issue, no visual evidence required)
Desktop (please complete the following information): N/A (This is a TypeScript definition issue, not a build issue)
Device(s) affected All devices using the TypeScript definitions for the JWPlayer React Native SDK
Additional context The current type definitions show:
It should be: