react-flow-player icon indicating copy to clipboard operation
react-flow-player copied to clipboard

How to change to another source

Open qymspace opened this issue 7 years ago • 0 comments

I have an array of sources in my state which wish to dynamically assign to react-flow-player depending on user click. Should doing this work? So that I dynamically change this.state.current to an array containining a new link

<ReactFlowPlayer  
            title={this.state.title}  
            playerId="reactFlowPlayer"  
            playerInitScript="http://releases.flowplayer.org/7.2.1/flowplayer.min.js"  
            live={true}  
            hlsPlugin={true}  
            hlsUrl={  
              'https://releases.flowplayer.org/hlsjs/flowplayer.hlsjs.light.min.js'
            }  
            autoplay={true}  
            className=""  
            onError={(event, config, error) => {  
              console.log(  
                'Player.jsx::error::event',  
                event,  
                'config',  
                config,  
                'error',  
                error  
              );  
            }}  
            onResume={(event, config) => {  
              console.log('Player.jsx::resume::event', event, 'config', config);  
            }}  
            sources={this.state.current}  
          />```

qymspace avatar Sep 25 '18 19:09 qymspace