react-native-jw-media-player icon indicating copy to clipboard operation
react-native-jw-media-player copied to clipboard

Android app crash when pass array of media items to playlist in config props

Open vijaygojiya opened this issue 1 year ago • 3 comments

in IOS it working find in Android when i pass playlist as array of media items it will crash but if i pass playlistItem.sources (array of source) it working fine,i need to pass track array how can i pass `import {StyleSheet, Text, View} from 'react-native'; import React, {useRef} from 'react'; import JWPlayer from 'react-native-jw-media-player';

const App = () => { const ref = useRef(null);

const playlistItem = { title: 'Track', mediaId: '1', image: 'http://image.com/image.png', description: 'My beautiful track', startTime: 0, file: 'http://file.com/file.mp3', autostart: true, repeat: false, displayDescription: true, displayTitle: true, tracks: [ { file: 'http://file.com/english.vtt', label: 'en', }, { file: 'http://file.com/spanish.srt', label: 'es', }, ], sources: [ { file: 'http://file.com/file.mp3', label: 'audio', }, { file: 'http://file.com/file.mp4', label: 'video', default: true, }, ], };

return ( <View style={{flex: 1}}> <JWPlayer style={{flex: 1}} ref={ref} config={{ // license: 'sadf', autostart: true, playlist: [playlistItem], // <-- if playlistItem.sources pass this it work fine. }} /> </View> );

};

export default App; ` 1671793278419

versions : "react": "18.1.0", "react-native": "0.70.6", "react-native-jw-media-player": "^0.2.32" also i tried in example which is given in repo not working check below video. https://user-images.githubusercontent.com/101892538/209339694-48408ba7-482f-4a6c-8390-92997f7ef34e.mp4

vijaygojiya avatar Dec 23 '22 11:12 vijaygojiya