Try to run local storage path in ios in react-native-jw-player

Viewed 96

I am trying to run the code using xcode with Simulator(iphone 11 pro).

I have done the all setup of React-Native-Jw-Player with pod and added the key and sdk as well

Issue - i am trying to play the video file from the local path of the simulator using ios in jw player but it's not reading the path -

file:'/Users/rishabh/Library/Developer/CoreSimulator/Devices/C20205E8-CCCD-4583-834F-87FA0420E4EB/data/Containers/Data/Application/F7317413-87CD-4EE2-9B96-4DAB807CFF2E/Documents/chunklist_w79586375.m3u8'

"or"

file:'file:///Users/rishabh/Library/Developer/CoreSimulator/Devices/C20205E8-CCCD-4583-834F-87FA0420E4EB/data/Containers/Data/Application/F7317413-87CD-4EE2-9B96-4DAB807CFF2E/Documents/chunklist_w79586375.m3u8'

Here is my code

<JWPlayer
    style={styles.player}
    playlistItem={{
        title: 'Track',
        mediaId: '1',
        file: '/Users/rishabh/Library/Developer/CoreSimulator/Devices/C20205E8-CCCD-4583-834F-87FA0420E4EB/data/Containers/Data/Application/F7317413-87CD-4EE2-9B96-4DAB807CFF2E/Documents/chunklist_w79586375.m3u8',
        autostart: false,

    }}

    onBeforePlay={(data) => this.onBeforePlay(data)}
    onPlay={() => this.onPlay()}
    onSetupPlayerError={(e) => this.onSetupPlayerError(e)}
    onPlayerError={(e) => this.onPlayerError(e)}
    onBuffer={(e) => this.onBuffer(e)}
    onTime={(time) => this.onTime(time)}
    nativeFullScreen={true} 
    onFullScreen={() => this.onFullScreen()}
    onFullScreenExit={() => this.onFullScreenExit()}
/>  

   

           
0 Answers
Related