Skip to content
This repository has been archived by the owner on May 23, 2019. It is now read-only.

How to change to another source #10

Open
qymspace opened this issue Sep 25, 2018 · 0 comments
Open

How to change to another source #10

qymspace opened this issue Sep 25, 2018 · 0 comments

Comments

@qymspace
Copy link

qymspace commented Sep 25, 2018

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}  
          />```
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant